前端安装
- 作者仓库星标 3,717
- 作者更新于 实时读取
- 作者仓库 agentation
- 领域
- 设计与多媒体
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @benjitaylor · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: agentation-self-driving
description: Autonomous design critique mode using the Agentation annotation toolbar. Use when the user asks…
category: 设计与多媒体
runtime: 无特殊运行时
---
# agentation-self-driving 输出预览
## PART A: 任务判断
- 适用问题:视觉内容、演示材料、信息图或设计交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Launch — Always Headed / Critical: How to Create Annotations / Building CSS selectors from snapshots”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于视觉内容、演示材料、信息图或设计交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Launch — Always Headed / Critical: How to Create Annotations / Building CSS selectors from snapshots”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/agentation-self-driving`、`/agentation` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Launch — Always Headed / Critical: How to Create Annotations / Building CSS selectors from snapshots”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: agentation-self-driving
description: Autonomous design critique mode using the Agentation annotation toolbar. Use when the user asks…
category: 设计与多媒体
source: benjitaylor/agentation
---
# agentation-self-driving
## 什么时候使用
- 用于让 Agent 打开、操作和验证浏览器页面 适合处理界面、视觉、封面、信息图或演示材料交付,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额…
- 面向视觉内容、演示材料、信息图或设计交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Launch — Always Headed / Critical: How to Create Annotations / Building CSS selectors from snapshots」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "agentation-self-driving" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Launch — Always Headed / Critical: How to Create Annotations / Building CSS selectors from snapshots
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Agentation Self-Driving Mode
Autonomously critique a web page by adding design annotations via the Agentation toolbar — in a visible headed browser so the user can watch the agent work in real time, like watching a self-driving car navigate.
Launch — Always Headed
The browser MUST be visible. Never run headless. The user watches you scan, hover, click, and annotate.
Preflight: Verify agent-browser is available before anything else:
command -v agent-browser >/dev/null || { echo "ERROR: agent-browser not found. Install the agent-browser skill first."; exit 1; }
Launch: Try opening directly first. Only close an existing session if the open command fails with a stale session error — this avoids killing a browser someone else is using:
# Try to open. If it fails (stale session), close first then retry.
agent-browser --headed open <url> 2>&1 || { agent-browser close 2>/dev/null; agent-browser --headed open <url>; }
Then verify the Agentation toolbar is present and expand it:
# 1. Check toolbar exists on the page (data-feedback-toolbar is the root marker)
agent-browser eval "document.querySelector('[data-feedback-toolbar]') ? 'toolbar found' : 'NOT FOUND'"
# If "NOT FOUND": Agentation is not installed on this page — stop and tell the user
# 2. Expand ONLY if collapsed (clicking when already expanded collapses it)
agent-browser eval "document.querySelector('[data-feedback-toolbar][class*=expanded]') ? 'already expanded' : (document.querySelector('[class*=toggleContent]')?.click(), 'expanding')"
# 3. Verify: take a snapshot and look for toolbar controls
agent-browser snapshot -i
# If expanded: you'll see "Block page interactions" checkbox, color buttons (Purple, Blue, etc.)
# If collapsed: you'll only see the small toggle button — retry step 2
"Block page interactions" must be checked (default: on).
eval quoting rule: Always use
[class*=toggleContent](no quotes around the attribute value) in eval strings. Do not use double-bang in eval because bash treats it as history expansion. Do not use backslash-escaped inner quotes either, as they break unpredictably across shells.
Critical: How to Create Annotations
Standard element clicks (click @ref) do NOT trigger annotation dialogs. The Agentation overlay intercepts pointer events at the coordinate level. Use coordinate-based mouse events — this also makes the interaction visible in the browser as the cursor moves across the page.
@refcompatibility: Onlyclick,fill,type,hover,focus,check,select,dragsupport@refsyntax. The commandsscrollintoview,get box, andevaldo NOT — they expect CSS selectors. UseevalwithquerySelectorfor scrolling and position lookup.
# 1. Take interactive snapshot — identify target element and build a CSS selector
agent-browser snapshot -i
# Example: snapshot shows heading "Point at bugs." [ref=e10]
# Derive a CSS selector: 'h1', or more specific: 'h1:first-of-type'
# 2. Scroll the element into view via eval (NOT scrollintoview @ref — that breaks)
agent-browser eval "document.querySelector('h1').scrollIntoView({block:'center'})"
# 3. Get its bounding box via eval (NOT get box @ref — that also breaks)
agent-browser eval "((r) => r.x+','+r.y+','+r.width+','+r.height)(document.querySelector('h1').getBoundingClientRect())"
# Returns: "383,245,200,40" (parse these as x,y,width,height)
# 4. Move cursor to element center, then click
# centerX = x + width/2, centerY = y + height/2
agent-browser mouse move <centerX> <centerY>
agent-browser mouse down left
agent-browser mouse up left
# 5. Get the annotation dialog refs — read the FULL snapshot output
# Dialog refs appear at the BOTTOM of the list, don't truncate with head/tail
agent-browser snapshot -i
# Look for: textbox "What should change?" and "Cancel" / "Add" buttons
# 6. Type critique — fill and click DO support @ref
agent-browser fill @<textboxRef> "Your critique here"
# 7. Submit (Add button enables after text is filled)
agent-browser click @<addRef>
If no dialog appears after clicking, the toolbar may have collapsed. Re-expand (only if collapsed) and retry:
agent-browser eval "document.querySelector('[data-feedback-toolbar][class*=expanded]') ? 'ok' : (document.querySelector('[class*=toggleContent]')?.click(), 'expanded')"
Building CSS selectors from snapshots
The snapshot shows element roles, names, and refs. Map them to CSS selectors:
| Snapshot line | CSS selector |
|---|---|
heading "Point at bugs." [ref=e10] |
h1 or h1:first-of-type |
button "npm install agentation Copy" [ref=e15] |
button:has(code) or by text content via eval |
link "Star on GitHub" [ref=e28] |
a[href*=github] |
paragraph (long text...) [ref=e20] |
Target by section: section:nth-of-type(2) p |
When in doubt, use a broader selector and verify with eval:
agent-browser eval "document.querySelector('h2').textContent"
The Loop
Work top-to-bottom through the page. For each annotation:
- Scroll to the target area via eval (
scrollIntoView) - Pick a specific element — heading, paragraph, button, section container
- Get its bounding box via eval (
getBoundingClientRect) - Execute the coordinate-click sequence (
mouse move→mouse down→mouse up) - Read the full snapshot output to find dialog refs at the bottom
- Write the critique (
fill @ref) and submit (click @ref) - Verify the annotation was added (see below)
- Move to the next area
Verifying annotations
After submitting each annotation, confirm the count increased:
agent-browser eval "document.querySelectorAll('[data-annotation-marker]').length"
# Should return the expected count (1 after first, 2 after second, etc.)
If the count didn't increase, the submission failed silently — re-snapshot and check if the dialog is still open.
Aim for 5-8 annotations per page unless told otherwise.
What to Critique
| Area | What to look for |
|---|---|
| Hero / above the fold | Headline hierarchy, CTA placement, visual grouping |
| Navigation | Label styling, category grouping, visual weight |
| Demo / illustrations | Clarity, depth, animation readability |
| Content sections | Spacing rhythm, callout treatments, typography hierarchy |
| Key taglines | Whether resonant lines get enough visual emphasis |
| CTAs and footer | Conversion weight, visual separation, final actions |
Critique Style
2-3 sentences max per annotation:
- Specific and actionable: "Stack the install command below the subheading at 16px" not "fix the layout"
- 1-2 concrete alternatives: Reference CSS values, layout patterns, or design systems
- Name the principle: Visual hierarchy, Gestalt grouping, whitespace, emphasis, conversion design
- Reference comparable products: "Like how Stripe/Linear/Vercel handles this"
Bad: "This section needs work" Good: "This bullet list reads like docs, not a showcase. Use a 3-column card grid with icons — similar to Stripe's guidelines pattern. Creates visual rhythm and scannability."
Install
The skill must be symlinked into ~/.claude/skills/ for Claude Code to discover it:
ln -s "$(pwd)/skills/agentation-self-driving" ~/.claude/skills/agentation-self-driving
Restart Claude Code after installing. Verify with /agentation-self-driving — if it loads the skill instructions, the symlink is working.
Troubleshooting
- "Browser not launched. Call launch first.": Stale session from a previous run — run
agent-browser close 2>/dev/nullthen retry the--headed opencommand - Toolbar not found on page: Agentation isn't installed — run
/agentationto set it up first - No dialog after clicking: Toolbar collapsed — re-expand with the state-aware eval (check
[class*=expanded]first), retry - Wrong element targeted: Click Cancel, scroll to intended element, retry with correct coordinates
- Add button stays disabled: Text wasn't filled — re-snapshot and fill the textbox
- Page navigated: "Block page interactions" is off — enable via toolbar settings
- Annotation count didn't increase: Submission failed — dialog may still be open, re-snapshot and check
- Interrupted mid-run (Ctrl+C): The browser stays open with whatever state it was in. Run
agent-browser closeto clean up before starting a new session
agent-browser Pitfalls
These will silently break the workflow if you're not aware of them:
| Pitfall | What happens | Fix |
|---|---|---|
scrollintoview @ref |
Crashes: "Unsupported token @ref while parsing css selector" | Use eval "document.querySelector('sel').scrollIntoView({block:'center'})" |
get box @ref |
Same crash — get box parses refs as CSS selectors |
Use eval "((r)=>r.x+','+r.y+','+r.width+','+r.height)(document.querySelector('sel').getBoundingClientRect())" |
eval with double-bang |
Bash expands double-bang as history substitution before the command runs | Use expr !== null or expr ? true : false instead |
eval with backslash-escaped quotes |
Escaped inner quotes break across shells | Drop the quotes: [class*=toggleContent] works for simple values without spaces |
snapshot -i | head -50 |
Annotation dialog refs (textbox "What should change?", Add, Cancel) appear at the BOTTOM of the snapshot |
Always read the full snapshot output — never truncate |
click @ref on overlay elements |
The click goes through to the real DOM, bypassing the Agentation overlay | Use mouse move → mouse down left → mouse up left for coordinate-based clicks that the overlay intercepts |
--headed open fails with "Browser not launched" |
Stale sessions from previous runs block new launches | Run agent-browser close 2>/dev/null then retry the open command |
Rule of thumb: @ref works for interaction commands (click, fill, type, hover). For everything else (eval, get, scrollintoview), use CSS selectors via querySelector in an eval.
Two-Session Workflow (Full Self-Driving)
With MCP connected (toolbar shows "MCP Connected"), annotations auto-send to any listening agent. This enables:
- Session 1 (this skill): Watches the page, adds critique annotations in the visible browser
- Session 2: Runs
agentation_watch_annotationsin a loop, receives annotations, edits code to address each one
The user watches Session 1 drive through the page in the browser while Session 2 fixes issues in the codebase — fully autonomous design review and implementation.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核