Skip to content

Commit 91d8d04

Browse files
committed
Add agent-browser skill to skill-engine plugin
New skill for headless browser automation with CLI reference and workflow patterns. Bumps skill count from 22 to 23 across plugin metadata, container docs, and site documentation. Also adds CLAUDE_PLUGIN_DATA docs, npmignore hardening, and changelog entries.
1 parent 7ff1f86 commit 91d8d04

18 files changed

Lines changed: 723 additions & 19 deletions

File tree

container/.devcontainer/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# CodeForge Devcontainer Changelog
22

3+
## Unreleased
4+
5+
### Skills
6+
- Added `agent-browser` skill to skill-engine plugin — guides headless browser automation with CLI reference, workflow patterns, and authentication
7+
8+
### Windows Compatibility
9+
10+
- Fix `claude-code-native` install failure on Windows/macOS Docker Desktop — installer now falls back to `HOME` override when `su` is unavailable
11+
- Remove `preflight.sh` runtime check — redundant with Docker's own error reporting and caused failures on Windows
12+
13+
### Configuration
14+
15+
- Add `autoMemoryDirectory` setting — auto-memory now stored in project-local `.claude/memory/` instead of deep inside `~/.claude/projects/`, making it visible and version-controllable
16+
- Enhanced system prompts with auto-memory system, hooks awareness, safety rules, and anti-over-engineering guidance
17+
18+
### Status Bar
19+
20+
- Replace `ccburn-compact` statusline widget with native `session-usage` and `weekly-usage` ccstatusline widgets — eliminates external command dependency and 8s timeout
21+
- Comment out `ccburn` devcontainer feature (disabled by default) — functionality replaced by native widgets
22+
23+
### Documentation
24+
25+
- Document `${CLAUDE_PLUGIN_DATA}` variable in CLAUDE.md for future plugin persistent storage
26+
327
## v2.1.1 — 2026-03-13
428

529
### Workspace Scope Guard

container/.devcontainer/CLAUDE.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Config files deploy via `.codeforge/file-manifest.json` on every container start
3838
Declared in `settings.json` under `enabledPlugins`, auto-activated on start:
3939

4040
- **agent-system** — 21 custom agents (4 workhorse + 17 specialist) + built-in agent redirection
41-
- **skill-engine**22 general coding skills + auto-suggestion
41+
- **skill-engine**23 general coding skills + auto-suggestion
4242
- **spec-workflow** — 3 spec lifecycle skills (`/spec`, `/build`, `/specs`) + spec-reminder hook
4343
- **session-context** — Git state injection, TODO harvesting, commit reminders
4444
- **auto-code-quality** — Auto-format + auto-lint + advisory test runner
@@ -78,3 +78,13 @@ The `~/.claude/` directory is backed by a Docker named volume (`codeforge-claude
7878
5. **Disable features**: Set `"version": "none"` in the feature's config
7979
6. **Disable setup steps**: Set flags to `false` in `.env`
8080
7. **Customize status bar**: Edit `.codeforge/config/ccstatusline-settings.json`
81+
82+
## Plugin Development Notes
83+
84+
### `${CLAUDE_PLUGIN_DATA}` — Persistent Plugin Storage
85+
86+
Available since Claude Code v2.1.78. Resolves to a dedicated data directory per plugin that survives plugin updates (unlike `${CLAUDE_PLUGIN_ROOT}`, which points to the plugin's source directory).
87+
88+
**Current state:** Not used in CodeForge plugins. Plugins store transient state in `/tmp/{prefix}-{session_id}`.
89+
90+
**Future use:** When a plugin needs persistent state across sessions (cached configs, learned preferences, usage frequency), use `${CLAUDE_PLUGIN_DATA}` in hook commands instead of `/tmp/`.

container/.devcontainer/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,11 @@ Agent definitions in `plugins/devs-marketplace/plugins/agent-system/agents/` pro
345345
| `statusline-config` | ccstatusline configuration |
346346
| `test-writer` | Test authoring with pass verification |
347347

348-
### General Skills (22) — `skill-engine` plugin
348+
### General Skills (23) — `skill-engine` plugin
349349

350350
Skills in `plugins/devs-marketplace/plugins/skill-engine/skills/` provide domain-specific coding references:
351351

352-
`api-design` · `ast-grep-patterns` · `claude-agent-sdk` · `claude-code-headless` · `debugging` · `dependency-management` · `docker` · `docker-py` · `documentation-patterns` · `fastapi` · `git-forensics` · `migration-patterns` · `performance-profiling` · `pydantic-ai` · `refactoring-patterns` · `security-checklist` · `skill-building` · `sqlite` · `svelte5` · `team` · `testing` · `worktree`
352+
`agent-browser` · `api-design` · `ast-grep-patterns` · `claude-agent-sdk` · `claude-code-headless` · `debugging` · `dependency-management` · `docker` · `docker-py` · `documentation-patterns` · `fastapi` · `git-forensics` · `migration-patterns` · `performance-profiling` · `pydantic-ai` · `refactoring-patterns` · `security-checklist` · `skill-building` · `sqlite` · `svelte5` · `team` · `testing` · `worktree`
353353

354354
### Spec Skills (3) — `spec-workflow` plugin
355355

container/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "skill-engine",
3-
"description": "22 coding knowledge packs with auto-suggestion for frameworks, tools, and patterns",
3+
"description": "23 coding knowledge packs with auto-suggestion for frameworks, tools, and patterns",
44
"author": {
55
"name": "AnExiledDev"
66
}

container/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# skill-engine
22

3-
Claude Code plugin that provides 22 coding knowledge packs (skills) with automatic suggestion based on user prompts. Each skill contains domain-specific instructions and reference material that Claude loads on demand via the `/skill` command.
3+
Claude Code plugin that provides 23 coding knowledge packs (skills) with automatic suggestion based on user prompts. Each skill contains domain-specific instructions and reference material that Claude loads on demand via the `/skill` command.
44

55
## What It Does
66

77
Two capabilities:
88

9-
1. **Skill library**22 skills covering frameworks, tools, and development patterns. Each skill is a structured knowledge pack with a `SKILL.md` entrypoint and `references/` subdirectory containing detailed reference docs.
9+
1. **Skill library**23 skills covering frameworks, tools, and development patterns. Each skill is a structured knowledge pack with a `SKILL.md` entrypoint and `references/` subdirectory containing detailed reference docs.
1010

1111
2. **Auto-suggestion** — A `UserPromptSubmit` hook watches user prompts for keyword matches and suggests relevant skills as context, so Claude can proactively load the right knowledge.
1212

1313
### Skill Catalog
1414

1515
| Skill | Domain |
1616
|-------|--------|
17+
| agent-browser | Headless browser automation, CLI reference, workflows |
1718
| api-design | REST conventions, error handling, API patterns |
1819
| ast-grep-patterns | Semantic code search patterns by language |
1920
| claude-agent-sdk | Building custom agents with the Agent SDK (TypeScript) |
@@ -135,7 +136,8 @@ skill-engine/
135136
+-- scripts/
136137
| +-- skill-suggester.py # Weighted scoring skill auto-suggestion
137138
+-- skills/
138-
| +-- api-design/ # 22 skill directories
139+
| +-- agent-browser/ # 23 skill directories
140+
| +-- api-design/
139141
| +-- ast-grep-patterns/
140142
| +-- claude-agent-sdk/
141143
| +-- claude-code-headless/

container/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/scripts/skill-suggester.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,36 @@
191191
"terms": ["sveltekit", "svelte", "svelte-dnd-action", "@ai-sdk/svelte"],
192192
"priority": 7,
193193
},
194+
"agent-browser": {
195+
"phrases": [
196+
("agent-browser", 1.0),
197+
("agent browser", 1.0),
198+
("headless browser", 0.8),
199+
("browser automation", 0.9),
200+
("open a webpage", 0.7),
201+
("navigate a site", 0.7),
202+
("take a screenshot of a page", 0.8),
203+
("fill a form on a website", 0.8),
204+
("accessibility tree", 0.8),
205+
("scrape a page", 0.5),
206+
("interact with a website", 0.5),
207+
("automate browser", 0.9),
208+
],
209+
"terms": ["agent-browser", "agent_browser"],
210+
"negative": ["playwright test", "cypress", "puppeteer"],
211+
"context_guards": [
212+
"browser",
213+
"webpage",
214+
"website",
215+
"page",
216+
"url",
217+
"screenshot",
218+
"headless",
219+
"navigate",
220+
"form",
221+
],
222+
"priority": 7,
223+
},
194224
"docker": {
195225
"phrases": [
196226
("dockerfile", 0.9),
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
name: agent-browser
3+
description: >-
4+
Guides headless browser automation using the agent-browser CLI for web interaction,
5+
accessibility tree navigation, form filling, screenshots, and authenticated sessions.
6+
USE WHEN the user asks to "open a webpage", "navigate a site", "take a screenshot",
7+
"fill a form", "get page content", "interact with a website", "scrape a page",
8+
"automate browser", "accessibility tree", or works with agent-browser, Playwright,
9+
headless Chrome, CDP. DO NOT USE for static HTML parsing, curl/wget requests,
10+
or API-only interactions where WebFetch suffices.
11+
version: 0.1.0
12+
allowed-tools: Bash
13+
argument-hint: "[url or action]"
14+
---
15+
16+
# Headless Browser Automation
17+
18+
## Mental Model
19+
20+
`agent-browser` is a **stateful CLI** — you `open` a page, interact with it through a series of commands, and `close` when done. There is one active browser session at a time.
21+
22+
The accessibility tree (`snapshot`) is the primary way to "see" the page. It returns a structured tree of every element on the page, each tagged with a reference ID (`@e1`, `@e2`, etc.). You use these references to target elements for clicks, form fills, and selections. Think of it as a DOM you can address by stable short IDs rather than CSS selectors.
23+
24+
The core loop is: **open → snapshot → interact → snapshot → close**. Always snapshot before interacting so you know what elements are available. Always snapshot after interacting to verify the result.
25+
26+
---
27+
28+
## Core Workflow
29+
30+
Every browser task follows this pattern:
31+
32+
```bash
33+
# 1. Open a page
34+
agent-browser open https://example.com
35+
36+
# 2. Snapshot to see the page structure
37+
agent-browser snapshot
38+
39+
# 3. Interact using element references from the snapshot
40+
agent-browser click @e2
41+
agent-browser fill @e3 "search query"
42+
43+
# 4. Snapshot again to see the result
44+
agent-browser snapshot
45+
46+
# 5. Close when done
47+
agent-browser close
48+
```
49+
50+
---
51+
52+
## Commands Overview
53+
54+
| Command | Purpose | Example |
55+
|---------|---------|---------|
56+
| `open <url>` | Navigate to a URL and start a session | `agent-browser open https://example.com` |
57+
| `snapshot` | Get the accessibility tree with element references | `agent-browser snapshot` |
58+
| `screenshot <path>` | Capture a PNG screenshot of the current page | `agent-browser screenshot page.png` |
59+
| `click @eN` | Click an element by its reference ID | `agent-browser click @e2` |
60+
| `fill @eN "text"` | Type text into an input element | `agent-browser fill @e3 "hello"` |
61+
| `select @eN "value"` | Select an option from a dropdown | `agent-browser select @e5 "option1"` |
62+
| `cookie set "..."` | Set a cookie for authenticated sessions | `agent-browser cookie set "session=abc123; domain=.example.com"` |
63+
| `connect <port>` | Connect to host Chrome via CDP | `agent-browser connect 9222` |
64+
| `close` | End the browser session | `agent-browser close` |
65+
66+
> **Full details:** See `references/cli-reference.md` for complete command syntax, output formats, and all options.
67+
68+
---
69+
70+
## Element References
71+
72+
When you run `agent-browser snapshot`, the output is an accessibility tree where each interactive element is tagged with a reference like `@e1`, `@e2`, etc.:
73+
74+
```
75+
document "Example Page"
76+
heading "Welcome" @e1
77+
textbox "Search" @e2
78+
button "Submit" @e3
79+
link "About Us" @e4
80+
```
81+
82+
Use these references in subsequent commands:
83+
84+
- `agent-browser click @e3` — clicks the "Submit" button
85+
- `agent-browser fill @e2 "my query"` — types into the "Search" textbox
86+
- References are stable within a single page state. After navigation or significant DOM changes, run `snapshot` again to get updated references.
87+
88+
---
89+
90+
## Authentication Patterns
91+
92+
For pages requiring authentication, inject cookies before opening the page:
93+
94+
```bash
95+
# Set session cookie first
96+
agent-browser cookie set "session=abc123; domain=.example.com"
97+
98+
# Then open the authenticated page
99+
agent-browser open https://example.com/dashboard
100+
101+
# Proceed normally
102+
agent-browser snapshot
103+
```
104+
105+
This avoids needing to fill login forms when you already have valid session credentials.
106+
107+
---
108+
109+
## Containerized Usage
110+
111+
### Headless Mode (Default)
112+
113+
Uses bundled Chromium in the container — no display needed. Works out of the box:
114+
115+
```bash
116+
agent-browser open https://example.com
117+
agent-browser snapshot
118+
agent-browser close
119+
```
120+
121+
### Host Chrome Connection
122+
123+
Connect to Chrome running on your host machine via CDP (Chrome DevTools Protocol). Useful when the container's bundled Chromium is insufficient (e.g., specific browser extensions needed):
124+
125+
1. Start Chrome on host with remote debugging:
126+
```bash
127+
chrome --remote-debugging-port=9222
128+
```
129+
130+
2. Connect from container:
131+
```bash
132+
agent-browser connect 9222
133+
```
134+
135+
---
136+
137+
## Ambiguity Policy
138+
139+
These defaults apply when the user does not specify a preference. State the assumption when applying a default:
140+
141+
- **Mode:** Always use headless mode (bundled Chromium) unless the user explicitly requests host Chrome connection
142+
- **Snapshot first:** Always run `snapshot` before interacting with elements — never guess element references
143+
- **Snapshot after:** Always run `snapshot` after interactions to verify results
144+
- **Close when done:** Always `close` the browser session when the task is complete
145+
- **Screenshots:** Save to the current working directory unless the user specifies a path
146+
- **Cookie scope:** Set cookies before `open` so they apply to the initial page load
147+
148+
---
149+
150+
## Reference Files
151+
152+
| File | Contents |
153+
|------|----------|
154+
| [CLI Reference](references/cli-reference.md) | Complete command syntax, all flags and options, output format descriptions, connection modes, error handling |
155+
| [Workflow Patterns](references/workflow-patterns.md) | Common automation patterns: page inspection, form filling, multi-page navigation, authenticated sessions, screenshots, error recovery |

0 commit comments

Comments
 (0)