用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill auto命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | auto |
| description | Autonomous task execution with testing and security. Works through all tasks without stopping. |
| triggers | ["auto"] |
| allowed-tools | Bash, Read, Write, Edit, Grep, Glob, Task, TaskCreate, TaskUpdate, TaskList |
| model | opus |
| user-invocable | true |
Fully autonomous development. Works through all tasks without stopping until complete.
!git status --short
!node -e "try{const p=require('./prd.json');const sp=p.sprints?p.sprints[p.sprints.length-1]:p;const s=Object.values(sp.stories||p.stories||{});const name=sp.id||sp.name||p.sprint||'unknown';const done=s.filter(x=>x.passes===true).length;const pend=s.filter(x=>x.passes===null||x.passes===false).length;console.log('Sprint:',name,'| Done:',done,'| Pending:',pend,'| Total:',s.length)}catch(e){console.log('No prd.json')}"
auto
|-- Activate: write .claude/auto-active
|-- Check prd.json exists?
| |-- No -> Bootstrap from context
| +-- Yes -> Check pending tasks
| |-- None pending -> IDLE Detection
| +-- Has pending -> Execute tasks
|
+-- Execute until done or interrupted
+-- Deactivate: delete .claude/auto-active
On start, create the flag file:
echo '{"started":"'$(date -Iseconds)'","sprint":"current"}' > .claude/auto-active
PowerShell: @{started=(Get-Date -Format o)} | ConvertTo-Json > .claude/auto-active
This flag tells the Stop hook to block Claude from stopping. Claude keeps working as long as this flag exists.
On exit (user says "done", or nothing left), delete the flag:
rm -f .claude/auto-active
Delete the flag when auto mode ends. If asking the user what's next (IDLE Detection), keep the flag active.
Do not ask "Should I continue?" or show summaries and wait.
Instead:
.claude/decisions.mdWhen findings, scan results, or ad-hoc issues are identified during execution, write them to prd.json as stories before fixing them. prd.json is the source of truth that survives session restarts and /compact.
If the user gives a direct instruction (e.g., "fix this button", "update that copy") rather than saying "auto":
When prd.json does not exist:
Before first task:
git status --short
npm run build 2>&1 | tail -5
Skip if takes >10 seconds.
// prd.json has two shapes:
// Flat: { stories: { "S1-001": {...} }, sprint: "sprint-1" }
// Nested: { sprints: [{ id: "sprint-1", stories: { "S1-001": {...} } }] }
const sp = prd.sprints ? prd.sprints[prd.sprints.length - 1] : prd;
const stories = sp.stories || prd.stories || {};
const storyEntries = Object.entries(stories);
const executable = storyEntries.filter(([id, s]) =>
s.passes !== true &&
(s.blockedBy || []).every(dep => stories[dep]?.passes === true)
);
npm run typecheck — fix if failsnpm run build — fix if failspasses: true| Task Type | Verification |
|---|---|
| UX/UI | agent-browser visual + console + network |
| Feature | Build passes + browser devtools check |
| API | Endpoint returns expected data + network check |
| Bug fix | Reproduce, verify fixed, no new errors |
For UI/API tasks with a running dev server:
agent-browser open http://localhost:3000/path
agent-browser snapshot -i
agent-browser errors
agent-browser network requests
Fix console errors or failed network requests before moving on.
Before marking any task as complete:
1. Type Safety
npm run typecheck 2>/dev/null || npx tsc --noEmit 2>/dev/null
2. Tests
npm test -- --passWithNoTests --watchAll=false 2>/dev/null
3. Self-Review
Run git diff and check:
console.log or debugger left inany types introduced4. UI/API Change? Browser Verification If agent-browser is available and a dev server is running:
agent-browser open http://localhost:3000/[page]
agent-browser screenshot .claude/screenshots/verify-$(date +%s).png
agent-browser snapshot -i
agent-browser errors
agent-browser network requests --filter api
5. Mark Complete Only after all checks pass. If any check fails, fix it first.
For independent tasks, launch multiple agents:
Task({ subagent_type: "general-purpose", prompt: "...", run_in_background: true })
On failure (maximum 2 retries, then move on):
.claude/mistakes.mdpasses: false, continue to next taskDo not retry a third time. Do not spend more than 10 minutes on retries for a single task.
feat|fix|refactorAfter every 3 completed tasks, recommend /compact:
Checkpoint: 3 tasks complete. Run /compact to reclaim ~40% tokens.
Be concise. Short responses = more runway.
When all stories have passes === true:
All [N] tasks complete.
Summary:
- [X] features implemented
- [X] bugs fixed
- [X] improvements made
Run `progress` to see full results.
If no tasks to work on:
passes: true?
| Signal | Action |
|---|---|
| TODOs/FIXMEs in code | Brainstorm (auto mode creates stories) |
| Console.logs left in | Quick cleanup sprint |
| No tests exist | Suggest test sprint |
| Build warnings | Fix warnings sprint |
| Clean codebase | Ask user (see below) |
If brainstorm scan finds 3+ actionable improvements, auto-create next sprint and continue:
Sprint [N] complete (8/8 tasks).
Scanning codebase... found 5 improvements.
Creating Sprint [N+1] and continuing.
Limit: 1 auto-generated sprint per session. After that, ask the user.
Sprint [N] complete (8/8 tasks).
What's next? (Recommended: ship)
1. ship - Deploy current work
2. audit - Deep quality check
3. brainstorm - Find more improvements
4. Done for now
Use AskUserQuestion with these options. Pick recommendation based on context.
Keep .claude/auto-active flag while asking. Only delete it if user picks "Done for now".
| Situation | Action |
|---|---|
| No prd.json | Bootstrap from context |
| All done + issues found | Brainstorm (auto-creates stories) |
| All done + clean code | Ask user for next action |
| All done + already auto-sprinted | Ask user (limit reached) |
| Build broken | Fix first |
| Task fails | Retry 2x, then skip |
| UX task | Browser verify |
| Blocked task | Skip, work on unblocked |
| < 5 tasks, no sprint | Work directly |