[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DNR4ZXPQ9AWTJCV1N59QX4":3,"skill-same:01M6DNR4ZXPQ9AWTJCV1N59QX4":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M6DNR4ZXPQ9AWTJCV1N59QX4","browse-plugins",null,"Create plugins for the browse CLI. Use when the user wants to extend browse with custom commands, add lifecycle hooks, or build a browse plugin. Triggers include: 'create a plugin', 'add a command to browse', 'extend browse', 'browse plugin', 'hook into browse'.","forjd\u002Fbrowse","forjd","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F248055561?v=4","01M6DNR1VGKGY64VB81X028RBM","Forjd","01M6DNR1ZQ1MXM5YPQZF88BV28",13,"MIT","https:\u002F\u002Fgithub.com\u002Fforjd\u002Fbrowse\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbrowse-plugins\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"plugins","browse","browse plugins","cli","plugin","create","lifecycle","command","user","use","hooks","build","commands","triggers","2026-11-10 10:12:30",false,"---\nname: browse-plugins\ndescription: \"Create plugins for the browse CLI. Use when the user wants to extend browse with custom commands, add lifecycle hooks, or build a browse plugin. Triggers include: 'create a plugin', 'add a command to browse', 'extend browse', 'browse plugin', 'hook into browse'.\"\n---\n\n# Browse Plugin Authoring\n\n## What a plugin is\n\nA plugin is a TypeScript or JavaScript file that default-exports a `BrowsePlugin` object. It can add custom commands, custom flow reporters, and hook into the lifecycle of any browse command.\n\n## Plugin structure\n\n```typescript\nimport type { BrowsePlugin } from \"browse\u002Fplugin\";\n\u002F\u002F In this repo, use: import type { BrowsePlugin } from \"..\u002Fsrc\u002Fplugin.ts\";\n\nconst plugin: BrowsePlugin = {\n  name: \"my-plugin\",\n  version: \"1.0.0\",\n  commands: [\u002F* PluginCommand[] *\u002F],\n  reporters: [\u002F* CustomReporter[] *\u002F],\n  hooks: {\u002F* PluginHooks *\u002F},\n};\n\nexport default plugin;\n```\n\n## Type definitions\n\nAll types are in `src\u002Fplugin.ts`. The key types:\n\n### CommandContext\n\nPassed to every command handler:\n\n```typescript\ntype CommandContext = {\n  page: Page;                              \u002F\u002F Active Playwright page\n  context: BrowserContext;                 \u002F\u002F Session's browser context\n  config: BrowseConfig | null;            \u002F\u002F Loaded browse config\n  args: string[];                         \u002F\u002F Command arguments\n  sessionState: Record\u003Cstring, unknown>;  \u002F\u002F Per-plugin, per-session state\n  request: { session?: string; json?: boolean; timeout?: number };\n};\n```\n\n### PluginCommand\n\n```typescript\ntype PluginCommand = {\n  name: string;            \u002F\u002F Must not collide with built-in commands\n  summary: string;         \u002F\u002F One-line for `browse help`\n  usage: string;           \u002F\u002F Full usage for `browse help \u003Ccommand>`\n  flags?: string[];        \u002F\u002F Known flags for validation\n  timeoutExempt?: boolean; \u002F\u002F Exempt from --timeout\n  handler: (ctx: CommandContext) => Promise\u003CResponse>;\n};\n```\n\n### PluginHooks\n\n```typescript\ntype PluginHooks = {\n  init?: (config: BrowseConfig | null) => Promise\u003Cvoid>;\n  beforeCommand?: (cmd: string, ctx: CommandContext) => Promise\u003CResponse | void>;\n  afterCommand?: (cmd: string, ctx: CommandContext, response: Response) => Promise\u003Cvoid>;\n  cleanup?: () => Promise\u003Cvoid>;\n};\n```\n\n### CustomReporter\n\n```typescript\ntype CustomReporter = {\n  name: string;\n  render: (ctx: {\n    flowName: string;\n    results: StepResult[];\n    durationMs: number;\n  }) => string;\n};\n```\n\nCustom reporters become available through `browse flow --reporter \u003Cname>` and `browse test-matrix --reporter \u003Cname>`.\n\n### Response\n\n```typescript\ntype Response = { ok: true; data: string } | { ok: false; error: string };\n```\n\n## Step-by-step: creating a plugin\n\n1. **Create the file** — e.g. `plugins\u002Fmy-plugin.ts`\n\n2. **Define at least one command or hook:**\n\n```typescript\nimport type { BrowsePlugin } from \"..\u002Fsrc\u002Fplugin.ts\";\n\nconst plugin: BrowsePlugin = {\n  name: \"my-plugin\",\n  version: \"1.0.0\",\n  commands: [\n    {\n      name: \"my-cmd\",\n      summary: \"Does something useful\",\n      usage: `browse my-cmd [--json]\n\nFlags:\n  --json   Output as JSON`,\n      flags: [\"--json\"],\n      handler: async (ctx) => {\n        const url = ctx.page.url();\n        if (ctx.request.json) {\n          return { ok: true, data: JSON.stringify({ url }) };\n        }\n        return { ok: true, data: `Current page: ${url}` };\n      },\n    },\n  ],\n};\n\nexport default plugin;\n```\n\n3. **Register in `browse.config.json`:**\n\n```json\n{\n  \"environments\": {},\n  \"plugins\": [\".\u002Fplugins\u002Fmy-plugin.ts\"]\n}\n```\n\n4. **Test it:**\n\n```bash\nbrowse my-cmd\nbrowse my-cmd --json\nbrowse help my-cmd\n```\n\n## Registration\n\nPlugins are discovered from two sources:\n\n- **Config file** — `\"plugins\"` array in `browse.config.json`. Relative paths resolve from the config file's directory. Bare names (e.g. `\"browse-plugin-foo\"`) resolve as npm packages.\n- **Global directory** — `~\u002F.browse\u002Fplugins\u002F` — any `.ts` or `.js` files are auto-loaded.\n\n## Key behaviours\n\n- **Command names must be unique** — collisions with built-in commands or other plugins are rejected at load time with a warning.\n- **Reporter names must be unique** — collisions with built-in reporters or other plugin reporters are rejected at load time with a warning.\n- **Errors are isolated** — a throwing handler returns `{ ok: false, error }`, never crashes the daemon. Hook errors are caught similarly.\n- **`sessionState` persists per session** — use it to track state across commands. It resets when the session is closed.\n- **`beforeCommand` can short-circuit** — return a `Response` to prevent the command from running.\n- **`afterCommand` is read-only** — observe the response but cannot mutate it.\n- **`init` failures are non-fatal** — the plugin's commands and hooks still register.\n\n## Example plugins\n\nSee `examples\u002Fplugin-example.ts` for a working example with a command and lifecycle hooks.\n\nBrowse also ships official starter plugins under `examples\u002Fplugins\u002F`:\n\n- `examples\u002Fplugins\u002Fslack\u002Findex.ts`\n- `examples\u002Fplugins\u002Fdiscord\u002Findex.ts`\n- `examples\u002Fplugins\u002Fjira\u002Findex.ts`\n\nUse them as references when building integrations around webhooks or external issue trackers.\n\n## Full documentation\n\nSee `docs\u002Fplugins.md` for the complete guide including publishing plugins as npm packages.\n","# Browse Plugin Authoring\n\n## What a plugin is\n\nA plugin is a TypeScript or JavaScript file that default-exports a `BrowsePlugin` object. It can add custom commands, custom flow reporters, and hook into the lifecycle of any browse command.\n\n## Plugin structure\n\n```typescript\nimport type { BrowsePlugin } from \"browse\u002Fplugin\";\n\u002F\u002F In this repo, use: import type { BrowsePlugin } from \"..\u002Fsrc\u002Fplugin.ts\";\n\nconst plugin: BrowsePlugin = {\n  name: \"my-plugin\",\n  version: \"1.0.0\",\n  commands: [\u002F* PluginCommand[] *\u002F],\n  reporters: [\u002F* CustomReporter[] *\u002F],\n  hooks: {\u002F* PluginHooks *\u002F},\n};\n\nexport default plugin;\n```\n\n## Type definitions\n\nAll types are in `src\u002Fplugin.ts`. The key types:\n\n### CommandContext\n\nPassed to every command handler:\n\n```typescript\ntype CommandContext = {\n  page: Page;                              \u002F\u002F Active Playwright page\n  context: BrowserContext;                 \u002F\u002F Session's browser context\n  config: BrowseConfig | null;            \u002F\u002F Loaded browse config\n  args: string[];                         \u002F\u002F Command arguments\n  sessionState: Record\u003Cstring, unknown>;  \u002F\u002F Per-plugin, per-session state\n  request: { session?: string; json?: boolean; timeout?: number };\n};\n```\n\n### PluginCommand\n\n```typescript\ntype PluginCommand = {\n  name: string;            \u002F\u002F Must not collide with built-in commands\n  summary: string;         \u002F\u002F One-line for `browse help`\n  usage: string;           \u002F\u002F Full usage for `browse help \u003Ccommand>`\n  flags?: string[];        \u002F\u002F Known flags for validation\n  timeoutExempt?: boolean; \u002F\u002F Exempt from --timeout\n  handler: (ctx: CommandContext) => Promise\u003CResponse>;\n};\n```\n\n### PluginHooks\n\n```typescript\ntype PluginHooks = {\n  init?: (config: BrowseConfig | null) => Promise\u003Cvoid>;\n  beforeCommand?: (cmd: string, ctx: CommandContext) => Promise\u003CResponse | void>;\n  afterCommand?: (cmd: string, ctx: CommandContext, response: Response) => Promise\u003Cvoid>;\n  cleanup?: () => Promise\u003Cvoid>;\n};\n```\n\n### CustomReporter\n\n```typescript\ntype CustomReporter = {\n  name: string;\n  render: (ctx: {\n    flowName: string;\n    results: StepResult[];\n    durationMs: number;\n  }) => string;\n};\n```\n\nCustom reporters become available through `browse flow --reporter \u003Cname>` and `browse test-matrix --reporter \u003Cname>`.\n\n### Response\n\n```typescript\ntype Response = { ok: true; data: string } | { ok: false; error: string };\n```\n\n## Step-by-step: creating a plugin\n\n1. **Create the file** — e.g. `plugins\u002Fmy-plugin.ts`\n\n2. **Define at least one command or hook:**\n\n```typescript\nimport type { BrowsePlugin } from \"..\u002Fsrc\u002Fplugin.ts\";\n\nconst plugin: BrowsePlugin = {\n  name: \"my-plugin\",\n  version: \"1.0.0\",\n  commands: [\n    {\n      name: \"my-cmd\",\n      summary: \"Does something useful\",\n      usage: `browse my-cmd [--json]\n\nFlags:\n  --json   Output as JSON`,\n      flags: [\"--json\"],\n      handler: async (ctx) => {\n        const url = ctx.page.url();\n        if (ctx.request.json) {\n          return { ok: true, data: JSON.stringify({ url }) };\n        }\n        return { ok: true, data: `Current page: ${url}` };\n      },\n    },\n  ],\n};\n\nexport default plugin;\n```\n\n3. **Register in `browse.config.json`:**\n\n```json\n{\n  \"environments\": {},\n  \"plugins\": [\".\u002Fplugins\u002Fmy-plugin.ts\"]\n}\n```\n\n4. **Test it:**\n\n```bash\nbrowse my-cmd\nbrowse my-cmd --json\nbrowse help my-cmd\n```\n\n## Registration\n\nPlugins are discovered from two sources:\n\n- **Config file** — `\"plugins\"` array in `browse.config.json`. Relative paths resolve from the config file's directory. Bare names (e.g. `\"browse-plugin-foo\"`) resolve as npm packages.\n- **Global directory** — `~\u002F.browse\u002Fplugins\u002F` — any `.ts` or `.js` files are auto-loaded.\n\n## Key behaviours\n\n- **Command names must be unique** — collisions with built-in commands or other plugins are rejected at load time with a warning.\n- **Reporter names must be unique** — collisions with built-in reporters or other plugin reporters are rejected at load time with a warning.\n- **Errors are isolated** — a throwing handler returns `{ ok: false, error }`, never crashes the daemon. Hook errors are caught similarly.\n- **`sessionState` persists per session** — use it to track state across commands. It resets when the session is closed.\n- **`beforeCommand` can short-circuit** — return a `Response` to prevent the command from running.\n- **`afterCommand` is read-only** — observe the response but cannot mutate it.\n- **`init` failures are non-fatal** — the plugin's commands and hooks still register.\n\n## Example plugins\n\nSee `examples\u002Fplugin-example.ts` for a working example with a command and lifecycle hooks.\n\nBrowse also ships official starter plugins under `examples\u002Fplugins\u002F`:\n\n- `examples\u002Fplugins\u002Fslack\u002Findex.ts`\n- `examples\u002Fplugins\u002Fdiscord\u002Findex.ts`\n- `examples\u002Fplugins\u002Fjira\u002Findex.ts`\n\nUse them as references when building integrations around webhooks or external issue trackers.\n\n## Full documentation\n\nSee `docs\u002Fplugins.md` for the complete guide including publishing plugins as npm packages.\n",{"name":5,"description":7},"main","08c1df099509b31238c641fc0aa9dd35a795555a",".agents\u002Fskills\u002Fbrowse-plugins",1,"https:\u002F\u002Fgithub.com\u002Fforjd\u002Fbrowse","https:\u002F\u002Fgithub.com\u002Fforjd","https:\u002F\u002Fforjd.dev","2026-09-27 05:49:40",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add forjd\u002Fbrowse --skill browse-plugins",{"tool":52,"command":53},"bunx","bunx skills add forjd\u002Fbrowse --skill browse-plugins",{"tool":55,"command":56},"pnpm","pnpm dlx skills add forjd\u002Fbrowse --skill browse-plugins","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fforjd\u002Fbrowse\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbrowse-plugins\u002FSKILL.md",true,[],[61,66,71],{"skillNo":62,"name":20,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":33},"01M6DNRESSR03S2ZEVQ1YD2YTW","https:\u002F\u002Fgithub.com\u002Fforjd\u002Fbrowse\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbrowse\u002FSKILL.md",[],[20],{"skillNo":67,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":33},"01M6DNRCA99WDD0E2ACC2BM8BA","https:\u002F\u002Fgithub.com\u002Fforjd\u002Fbrowse\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbrowse-plugins\u002FSKILL.md",[],[21,20,19],{"skillNo":72,"name":20,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":33},"01M6DNR8BYVG74DX1F137X58ET","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include: any mention of 'browse', 'check the page', 'take a screenshot', 'test the UI', 'fill the form', 'click the button', 'QA', 'visual check', 'healthcheck', and any task requiring a real browser.","https:\u002F\u002Fgithub.com\u002Fforjd\u002Fbrowse\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbrowse\u002FSKILL.md",[],[20,77,78,79,32,80,81,82,83,84,85,86,87,88,89,90,91,92,22,93],"page","apps","click","pages","real browser","forms","take","testing","Bash","data","ui","screenshot","browser","qa","ai agents","browser automation","screenshots"]