Skip to content

Commit 2754808

Browse files
committed
Update skills
1 parent df712a3 commit 2754808

14 files changed

Lines changed: 90 additions & 601 deletions

File tree

.claude/commands/ralph/ticket.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ SUBAGENTS: $ARGUMENTS.subagents (default: 3)
125125
- Backend and frontend changes are SEPARATE stories
126126
- Schema/migration changes are SEPARATE from logic that uses them
127127
- If a task spans >3 files, SPLIT into multiple stories
128+
- Stories touching 2+ files: Add "Use parallel-edits skill for coordinated changes" to acceptance criteria
128129
- Dependency order: Schema → Backend → Frontend → Integration
129130
- Add "Typecheck passes" to every story
130-
- Add "Verify in browser using dev-browser skill" to UI stories
131+
- Add "Verify in browser using agent-browser skill" to UI stories
131132
```
132133
- _EXECUTE_ query from worktree directory
133134
- _VERIFY_ PRD was created at `tasks/prd-<feature-slug>.md`
@@ -150,6 +151,7 @@ SUBAGENTS: $ARGUMENTS.subagents (default: 3)
150151
11. _LAUNCH_ Ralph autonomous implementation loop:
151152
- _REPORT_ "Starting Ralph autonomous loop for <N> user stories..."
152153
- RUN `cd ./.worktrees/<prefix>-<number> && bash ../../.ralph/ralph.sh 200` to execute Ralph
154+
- Ralph has access to `.ralph/skills/parallel-edits/SKILL.md` for efficient multi-file changes
153155
- Ralph will:
154156
- Read `.ralph/prd.json` for user stories (resolved via SCRIPT_DIR at repo root)
155157
- Pick highest priority story with `passes: false`
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: agent-browser
3+
description: "Browser automation with persistent page state using Vercel's agent-browser CLI. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include 'go to [url]', 'click on', 'fill out the form', 'take a screenshot', 'scrape', 'automate', 'test the website', 'log into', or any browser interaction request."
4+
---
5+
6+
# agent-browser
7+
8+
Browser automation via the `agent-browser` CLI (https://github.com/vercel-labs/agent-browser).
9+
10+
## Quick Reference
11+
12+
All commands are run via Bash: `agent-browser <command> [args]`.
13+
14+
| Action | Command |
15+
|--------|---------|
16+
| Navigate | `agent-browser open <url>` |
17+
| Screenshot | `agent-browser screenshot [path]` (`--full` for full page) |
18+
| Accessibility snapshot | `agent-browser snapshot` (returns `@e1`, `@e2` refs) |
19+
| Click | `agent-browser click <selector-or-ref>` |
20+
| Fill input | `agent-browser fill <selector-or-ref> "<text>"` |
21+
| Type (append) | `agent-browser type <selector-or-ref> "<text>"` |
22+
| Key press | `agent-browser press <key>` |
23+
| Read text | `agent-browser get text <selector-or-ref>` |
24+
| Get URL/title | `agent-browser get url` / `agent-browser get title` |
25+
| Wait | `agent-browser wait <selector>` or `agent-browser wait <ms>` |
26+
| Semantic find | `agent-browser find role button click` |
27+
| Close | `agent-browser close` |
28+
29+
## Selectors
30+
31+
Three types:
32+
- **CSS**: `#id`, `.class`, `input[name="email"]`
33+
- **Snapshot refs**: `@e1`, `@e2` (from `snapshot` output)
34+
- **Semantic**: `find role button "Submit"` (ARIA roles, text, labels)
35+
36+
## Agent Workflow
37+
38+
1. **Navigate + snapshot**: `agent-browser open <url> && agent-browser snapshot --json`
39+
2. **Parse refs** from JSON output to identify interactive elements
40+
3. **Act** using refs: `agent-browser click @e2`, `agent-browser fill @e3 "hello"`
41+
4. **Re-snapshot** after each action to observe new state
42+
5. **Screenshot** when visual verification is needed
43+
44+
## JSON Output
45+
46+
Add `--json` to any command for structured output:
47+
```json
48+
{"success": true, "data": {...}}
49+
```
50+
51+
## Sessions
52+
53+
Use `--session <name>` for isolated sessions or `--profile <path>` for persistent cookies/storage.
54+
55+
## Full Documentation
56+
57+
See https://github.com/vercel-labs/agent-browser for complete docs, cloud provider setup, and WebSocket streaming.

.claude/skills/prd/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ Each story should be small enough to implement in one focused session.
8282
- [ ] Specific verifiable criterion
8383
- [ ] Another criterion
8484
- [ ] Typecheck/lint passes
85-
- [ ] **[UI stories only]** Verify in browser using dev-browser skill
85+
- [ ] **[UI stories only]** Verify in browser using agent-browser skill
8686
```
8787

8888
**Important:**
8989
- Acceptance criteria must be verifiable, not vague. "Works correctly" is bad. "Button shows confirmation dialog before deleting" is good.
90-
- **For any story with UI changes:** Always include "Verify in browser using dev-browser skill" as acceptance criteria. This ensures visual verification of frontend work.
90+
- **For any story with UI changes:** Always include "Verify in browser using agent-browser skill" as acceptance criteria. This ensures visual verification of frontend work.
9191

9292
### 4. Functional Requirements
9393
Numbered list of specific functionalities:
@@ -172,7 +172,7 @@ Add priority levels to tasks so users can focus on what matters most. Tasks can
172172
- [ ] Each task card shows colored priority badge (red=high, yellow=medium, gray=low)
173173
- [ ] Priority visible without hovering or clicking
174174
- [ ] Typecheck passes
175-
- [ ] Verify in browser using dev-browser skill
175+
- [ ] Verify in browser using agent-browser skill
176176

177177
### US-003: Add priority selector to task edit
178178
**Description:** As a user, I want to change a task's priority when editing it.
@@ -182,7 +182,7 @@ Add priority levels to tasks so users can focus on what matters most. Tasks can
182182
- [ ] Shows current priority as selected
183183
- [ ] Saves immediately on selection change
184184
- [ ] Typecheck passes
185-
- [ ] Verify in browser using dev-browser skill
185+
- [ ] Verify in browser using agent-browser skill
186186

187187
### US-004: Filter tasks by priority
188188
**Description:** As a user, I want to filter the task list to see only high-priority items when I'm focused.
@@ -192,7 +192,7 @@ Add priority levels to tasks so users can focus on what matters most. Tasks can
192192
- [ ] Filter persists in URL params
193193
- [ ] Empty state message when no tasks match filter
194194
- [ ] Typecheck passes
195-
- [ ] Verify in browser using dev-browser skill
195+
- [ ] Verify in browser using agent-browser skill
196196

197197
## Functional Requirements
198198

.claude/skills/ralph/SKILL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ For stories with testable logic, also include:
108108

109109
### For stories that change UI, also include:
110110
```
111-
"Verify in browser using dev-browser skill"
111+
"Verify in browser using agent-browser skill"
112112
```
113113

114-
Frontend stories are NOT complete until visually verified. Ralph will use the dev-browser skill to navigate to the page, interact with the UI, and confirm changes work.
114+
Frontend stories are NOT complete until visually verified. Ralph will use the agent-browser skill to navigate to the page, interact with the UI, and confirm changes work.
115115

116116
---
117117

@@ -188,7 +188,7 @@ Add ability to mark tasks with different statuses.
188188
"Each task card shows colored status badge",
189189
"Badge colors: gray=pending, blue=in_progress, green=done",
190190
"Typecheck passes",
191-
"Verify in browser using dev-browser skill"
191+
"Verify in browser using agent-browser skill"
192192
],
193193
"priority": 2,
194194
"passes": false,
@@ -203,7 +203,7 @@ Add ability to mark tasks with different statuses.
203203
"Changing status saves immediately",
204204
"UI updates without page refresh",
205205
"Typecheck passes",
206-
"Verify in browser using dev-browser skill"
206+
"Verify in browser using agent-browser skill"
207207
],
208208
"priority": 3,
209209
"passes": false,
@@ -217,7 +217,7 @@ Add ability to mark tasks with different statuses.
217217
"Filter dropdown: All | Pending | In Progress | Done",
218218
"Filter persists in URL params",
219219
"Typecheck passes",
220-
"Verify in browser using dev-browser skill"
220+
"Verify in browser using agent-browser skill"
221221
],
222222
"priority": 4,
223223
"passes": false,
@@ -252,6 +252,6 @@ Before writing prd.json, verify:
252252
- [ ] Each story is completable in one iteration (small enough)
253253
- [ ] Stories are ordered by dependency (schema to backend to UI)
254254
- [ ] Every story has "Typecheck passes" as criterion
255-
- [ ] UI stories have "Verify in browser using dev-browser skill" as criterion
255+
- [ ] UI stories have "Verify in browser using agent-browser skill" as criterion
256256
- [ ] Acceptance criteria are verifiable (not vague)
257257
- [ ] No story depends on a later story

.ralph/prd.json.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"Each task card shows colored priority badge (red=high, yellow=medium, gray=low)",
2525
"Priority visible without hovering or clicking",
2626
"Typecheck passes",
27-
"Verify in browser using dev-browser skill"
27+
"Verify in browser using agent-browser skill"
2828
],
2929
"priority": 2,
3030
"passes": false,
@@ -39,7 +39,7 @@
3939
"Shows current priority as selected",
4040
"Saves immediately on selection change",
4141
"Typecheck passes",
42-
"Verify in browser using dev-browser skill"
42+
"Verify in browser using agent-browser skill"
4343
],
4444
"priority": 3,
4545
"passes": false,
@@ -54,7 +54,7 @@
5454
"Filter persists in URL params",
5555
"Empty state message when no tasks match filter",
5656
"Typecheck passes",
57-
"Verify in browser using dev-browser skill"
57+
"Verify in browser using agent-browser skill"
5858
],
5959
"priority": 4,
6060
"passes": false,

.ralph/prompt.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
You are an autonomous coding agent working on a software project.
44

5+
## Available Skills
6+
7+
Before implementing a story, check if any skills in the `skills/` directory (relative to this file) apply. In particular:
8+
- **parallel-edits**: When a story requires changes to 2+ files, read all target files in parallel, validate edits, then execute all Edit calls in a single response. See `skills/parallel-edits/SKILL.md`.
9+
- **agent-browser**: For UI stories requiring browser verification, use the `agent-browser` CLI (not a Claude skill — it's a shell tool). See `skills/agent-browser/SKILL.md` for command reference.
10+
511
## Your Task
612

713
1. Read the PRD at `prd.json` (in the same directory as this file)
@@ -82,12 +88,12 @@ Only update AGENTS.md if you have **genuinely reusable knowledge** that would he
8288

8389
## Browser Testing (Required for Frontend Stories)
8490

85-
For any story that changes UI, you MUST verify it works in the browser:
91+
For any story that changes UI, you MUST verify it works in the browser using the `agent-browser` CLI. See `skills/agent-browser/SKILL.md` for the full command reference.
8692

87-
1. Load the `dev-browser` skill
88-
2. Navigate to the relevant page
89-
3. Verify the UI changes work as expected
90-
4. Take a screenshot if helpful for the progress log
93+
1. `agent-browser open <url>` — navigate to the relevant page
94+
2. `agent-browser snapshot --json` — get interactive element refs (`@e1`, `@e2`, …)
95+
3. Interact as needed: `agent-browser click @e2`, `agent-browser fill @e3 "text"`
96+
4. `agent-browser screenshot [path]` — capture visual proof for the progress log
9197

9298
A frontend story is NOT complete until browser verification passes.
9399

.ralph/skills/agent-browser

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.claude/skills/agent-browser

.ralph/skills/archive

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.claude/skills/ralph-archive

.ralph/skills/archive/SKILL.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

.ralph/skills/prd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.claude/skills/prd

0 commit comments

Comments
 (0)