Compare commits
2 Commits
b0650b59b7
...
5c7b5c8e9d
| Author | SHA1 | Date | |
|---|---|---|---|
|
5c7b5c8e9d
|
|||
|
d8b380a9c0
|
@@ -53,10 +53,46 @@ in
|
||||
{
|
||||
home.packages = [
|
||||
inputs.oh-my-opencode.packages.${pkgs.stdenv.hostPlatform.system}.oh-my-opencode
|
||||
pkgs.playwright-driver.browsers
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
PLAYWRIGHT_BROWSERS_PATH = "${pkgs.playwright-driver.browsers}";
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
|
||||
};
|
||||
|
||||
xdg.configFile."opencode/oh-my-opencode.json".text = builtins.toJSON ohMyOpencodeConfig;
|
||||
|
||||
xdg.configFile."opencode/skills/playwright.md".text =
|
||||
let
|
||||
browsers = pkgs.playwright-driver.browsers;
|
||||
chromiumDir = builtins.head (
|
||||
builtins.filter (n: builtins.match "chromium-[0-9]+" n != null) (
|
||||
builtins.attrNames browsers.passthru.entries
|
||||
)
|
||||
);
|
||||
chromiumPath = "${browsers}/${chromiumDir}/chrome-linux64/chrome";
|
||||
in
|
||||
''
|
||||
---
|
||||
name: playwright
|
||||
description: "MUST USE for any browser-related tasks. Browser automation via Playwright MCP - verification, browsing, information gathering, web scraping, testing, screenshots, and all browser interactions."
|
||||
mcp:
|
||||
playwright:
|
||||
command: npx
|
||||
args:
|
||||
- "@playwright/mcp@latest"
|
||||
- "--executable-path"
|
||||
- "${chromiumPath}"
|
||||
- "--user-data-dir"
|
||||
- "${config.home.homeDirectory}/.cache/playwright-mcp"
|
||||
---
|
||||
|
||||
# Playwright Browser Automation
|
||||
|
||||
This skill provides browser automation capabilities via the Playwright MCP server.
|
||||
'';
|
||||
|
||||
programs.opencode = {
|
||||
package = inputs.llm-agents.packages.${pkgs.stdenv.targetPlatform.system}.opencode;
|
||||
enable = true;
|
||||
@@ -71,7 +107,7 @@ in
|
||||
## Misc
|
||||
For long-running commands, make sure you set the timeout of the Bash tool provided to a larger value.
|
||||
Do NOT read secret files. Do not directly read files that are api keys or are contextually sensitive.
|
||||
Do NOT run `skill_mcp [mcp_name=playwright, tool_name=browser_install]` as it requires root and will not work.
|
||||
Do NOT run `skill_mcp [mcp_name=playwright, tool_name=browser_install]` as browsers are provided by NixOS via PLAYWRIGHT_BROWSERS_PATH.
|
||||
|
||||
## Behavior
|
||||
Do not be sycophantic in your responses.
|
||||
|
||||
Reference in New Issue
Block a user