opencode: fix playwright skill: 2
This commit is contained in:
@@ -63,6 +63,36 @@ in
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user