文档安装
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 写作
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: do-fixes
description: Apply fixes from a review. Detects the most recent review artifact and applies checked findings…
category: 写作
runtime: 无特殊运行时
---
# do-fixes 输出预览
## PART A: 任务判断
- 适用问题:文章、文案、发言稿、润色或结构化表达。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Context Detection / Phase 0: Orient / Find the review document”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于文章、文案、发言稿、润色或结构化表达,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Context Detection / Phase 0: Orient / Find the review document”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/setup-agent-skills`、`/code-review` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Context Detection / Phase 0: Orient / Find the review document”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: do-fixes
description: Apply fixes from a review. Detects the most recent review artifact and applies checked findings…
category: 写作
source: tomevault-io/skills-registry
---
# do-fixes
## 什么时候使用
- 用于提炼长内容、变更或对话里的关键信息 适合处理文章、文案、润色、翻译、总结和结构化表达,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额外 A…
- 面向文章、文案、发言稿、润色或结构化表达,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Context Detection / Phase 0: Orient / Find the review document」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "do-fixes" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Context Detection / Phase 0: Orient / Find the review document
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Do Fixes: Apply Review Findings
You are applying fixes from a completed review. This skill detects the most recent review artifact and applies the appropriate fixes.
Arguments: $ARGUMENTS
- No arguments: auto-discover the most recent review doc for this branch
- Path: use the specified review doc
Context Detection
Scan <work-folder>/reviews/ for the most recent review artifact:
*.review.*.md(code-review output) → apply code fixes using the flow below- (Future: plan-review artifacts → apply plan improvements)
The review document contains findings with checkboxes — checked [x] findings get fixed,
unchecked [ ] findings get skipped.
Setup check: If the pre-loaded Work folder shows needs-setup, stop: "Run /setup-agent-skills first to configure your work folder, then come back."
Pre-loaded context:
- Current branch: !
~/.claude/skills/shared/scripts/context.sh current-branch - Work folder: !
~/.claude/skills/shared/scripts/context.sh work-folder - Ticket ID: !
~/.claude/skills/shared/scripts/context.sh ticket-id - HEAD SHA: !
~/.claude/skills/shared/scripts/context.sh head-sha - Open PR: !
~/.claude/skills/shared/scripts/context.sh open-pr - Uncommitted changes: !
~/.claude/skills/shared/scripts/context.sh uncommitted-changes
PR number: extract from "Open PR" above (the number before the colon). Use this everywhere <pr-number> appears.
Phase 0: Orient
Find the review document
If a path was provided as argument, use it. Otherwise, auto-discover:
- Use the pre-loaded
Work folder. Ifnone(on main), ask the user which branch this review is for. - Look in
<work-folder>/reviews/for review files (*.review.*.md). - Use the most recent one (by date in filename).
- If no review doc found: "No review document found. Run
/code-reviewfirst to generate one."
If still no review doc: "No review document found. Run /code-review first to generate one."
Read the review document
Read the review doc. Note:
- The
phase:in frontmatter — if alreadycommittedorfixes-verified, warn: "This review has already been applied. Run/code-review fullfor a new review cycle." - The checked
[x]findings — these are the ones to fix - Any
**Instructions:**fields — user instructions take priority over reviewer suggestions - The
sha:— the HEAD at review time
Read project context
Read CLAUDE.md at the repo root — note verification commands (lint, typecheck, test, format) for use in Phase 1.
Check for uncommitted changes
If there are uncommitted changes (from pre-loaded context): "There are uncommitted changes. Want to stash them before proceeding, or continue as-is?" Wait for their answer.
Create progress tasks:
- Fix findings
- Verify fixes
- Finalize — update review doc, commit, push
- Post PR summary comment
Update the review doc's phase: to fixes-in-progress.
Phase 1: Fix
Step 1: Group findings into fix batches
Findings touching the same file(s) MUST be in the same batch (prevents edit conflicts). Non-overlapping batches can run as parallel agents. Each batch: 1-5 findings.
Step 2: Regression tests (BLOCKER/ISSUE only)
Write tests that prove the bug exists before fixing it. Scope: only unit-testable BLOCKER/ISSUE findings. Skip: cache behavior, convention fixes, dead code, styling. SUGGESTIONs and NITs never need tests.
- Farm out test writing to parallel agents. Each agent:
- Receives the finding text and relevant source file content
- Instruction: write a focused test that fails against current code — do NOT fix the code
- EDITS ONLY — no running tests
- Budget: 3 edit rounds
- Run all new tests centrally — they should fail (proving the bug exists).
- If a test passes (doesn't prove the bug): retry up to 3x with a fresh agent. After 3 failures, mark:
Regression test: could not write a proof test for F<n>, proceeding without.
Step 3: Farm out edits to agents
YOU (the coordinator) do NOT make edits. Delegate ALL edits to agents.
Maximize parallelism. Look at the batches from Step 1. All batches that touch non-overlapping files can (and should) be spawned as parallel agents simultaneously — a single message with multiple Agent tool calls, not sequential spawns. Only serialize batches that share files. For a typical review with 3-7 findings across different files, most or all batches should run in parallel.
Each agent receives:
- The specific finding(s) to address (full finding text including user Instructions)
- Relevant file content (read and pass — don't assume agents can find things)
- Clear acceptance criteria
- User instructions from
**Instructions:**field take priority over reviewer suggestions - Instruction to follow all CLAUDE.md guidelines
- EDITS ONLY — no running tests, typecheck, lint, format, starting any processes, or committing. The coordinator runs verification after all agents complete. Parallel agents each spinning up their own processes will thrash the machine.
- Budget: 5 edit rounds
If an agent discovers a finding is incorrect (e.g., would break types, code is actually fine): agent skips and reports why. Mark with a note rather than forcing a bad change.
Step 4: Track progress
Read ~/.claude/skills/shared/references/finding-format.md for the status lifecycle. Update the review doc as agents report back:
[x]->[fixed]after editing, with one-line change summary[fixed]->[verified]after verification passes (batch-update)- If verification fails, leave as
[fixed]and append what failed [ ]->[skipped]for unchecked findings
Step 5: Verify (centrally, after ALL edits complete)
Do not run verification until all edit agents have reported back.
CRITICAL: Verification is mandatory before any commit or push. No exceptions, no shortcuts.
- Read CLAUDE.md and
.claude/rules/to find the repo's verification commands and policies. If averification.mdrule exists, follow it exactly — it may require running the full test suite, not just targeted tests. - Format changed files only (runs first — it modifies files):
- Get changed files:
git diff $(git merge-base HEAD main)...HEAD --name-only - Use repo-appropriate formatter from CLAUDE.md
- Get changed files:
- Run the repo's verification suite. Follow whatever CLAUDE.md or
.claude/rules/verification.mdspecifies. If neither prescribes a scope, default to:- Typecheck (full — types are global)
- Tests related to changes (filename pattern filters) If the repo's rules say to run the full suite, run the full suite.
- All checks must pass. If verification fails, fix the issue and re-verify. Do not commit or push with failing checks. If you cannot fix a failure after 2 attempts, stop and report to the user.
If verification fails, fix issues (spawn new agents if needed), then re-verify.
Step 6: Resolve all findings
Before committing, scan the review document and ensure every checked [x] finding has been updated to a terminal status. No finding should still show bare [x] at this point.
Terminal statuses: [fixed] -> [verified], [skipped], [will-not-do], [deferred], [already-resolved], [could-not-prove].
If any checked findings are still [x]: update them now — mark [skipped] with a note if they were intentionally not addressed, or [deferred] if out of scope.
Phase 2: Finalize
The full sequence is: verify -> commit -> push -> post PR comment. All four steps are mandatory and must happen in order. Do not skip any step. Do not push without verifying. Do not end the session without posting the PR comment.
Auto-proceed: Once fixes are complete and verification passes, immediately continue through all of Phase 2 — commit, push, then post the PR comment — without stopping to ask. The user invoked this skill to apply fixes; that authorizes the full cycle through commit, push, and publish. Only pause if: (a) verification still fails after fix attempts, (b) a finding requires a judgment call not covered by the user's instructions, or (c) an unanswered question came up that needs a decision before proceeding.
Step 7: Commit
Update review doc phase: to fixes-verified. All fixes for a review cycle go into a single commit — never split by finding. Update phase: to committed.
Step 8: Push + update PR checklist
Push the branch:
git push
Mark code review complete on the PR. Read the PR body:
gh pr view <pr-number> --json body -q .body
- If it contains an unchecked
- [ ] Ran \/code-review`item, check it off (- [x]`) - If it has no such item, append
- [x] Ran \/code-review`` to the checklist section (or the end of the body if no checklist exists)
Update with gh pr edit <pr-number> --body "<updated-body>".
Step 9: Post the PR comment — THIS STEP IS MANDATORY. DO NOT SKIP.
You have just finished a code review cycle. The team cannot see the outcome unless you post this comment. It is the only artifact that surfaces the review on the PR. Do it now.
First, re-read the review document from disk — your in-context copy may be stale after parallel fix agents updated it:
cat <work-folder>/reviews/<review-filename>.md
Then spawn a sub-agent (model: sonnet) with the following:
"Read
~/.claude/skills/shared/references/code-review-summary-format.mdfor the exact comment format — follow it precisely, do not invent a different layout.Post or update a PR comment summarizing this code review cycle.
PR number:
Fix commit SHA: (omit the fix commit link if no fixes were made) Review SHA: <7-char short SHA from the review doc filename> Review doc contents: Human feedback suppression: if the review doc contains a
## Human Feedback Cross-Referencesection listing dropped findings, include the suppression line after the findings table per the format reference:> N findings suppressed — already raised by PR reviewers(where N is the count of dropped findings). Omit this line if N = 0. Do NOT include the cross-reference table itself in the PR comment.Comment identity: each review round gets its own comment, keyed by a
<!-- code-review: <review-sha> -->marker (the SHA from the review doc filename, not the fix commit).
- Search existing PR comments for a marker matching this review SHA:
gh api repos/<owner>/<repo>/issues/<pr-number>/comments --jq '.[] | select(.body | contains("<!-- code-review: <review-sha> -->")) | .id'- If found -> update that comment with
gh api repos/<owner>/<repo>/issues/comments/<id> -X PATCH --field body="<formatted>"(this is a resumed partial post)- If not found -> post a new comment with
gh pr comment <pr-number> --body "<formatted>"Extract the comment ID from the gh output (the numeric ID at the end of the comment URL, e.g.
4155206998from...#issuecomment-4155206998) and return it."
If no PR exists, skip this step — the review doc stays local.
Phase 3: Retrospective
After the fixes are complete:
- Ensure the PR comment is current. Check whether a PR summary comment has been posted covering this review cycle. If a comment was posted but findings changed after it (e.g., additional fixes were pushed), post an updated comment using the Step 9 sub-agent.
- Summarize what was found, fixed, and deferred.
- Ask the user if any review agents or the code-review skill should be updated based on what was missed or noisy.
- With user approval, suggest edits to the relevant
.claude/agents/reviewers/files.
Next step: If the PR has reviewer feedback to address, handle it before merging. Otherwise, merge the PR.
Agent Budgets
Agents can get stuck. Include budget instructions in every agent prompt.
| Agent type | Budget | On budget hit |
|---|---|---|
| Regression test writer | 3 edit rounds | Report back with best attempt + what's blocking |
| Fix agent | 5 edit rounds | Report back with partial progress + what's stuck |
| Retry agent | 2 edit rounds | Flag as "could not prove" and move on |
Include in every agent prompt: "You have a budget of N edit rounds. If you haven't succeeded after N edits to the same file, stop and report back with what you've tried and what's blocking you. Do not keep retrying the same approach."
When an agent hits budget: (1) accept partial work if close enough, (2) spawn fresh agent with different instructions, or (3) escalate to user. Max 2 fresh-agent retries per finding before escalating.
Important Guidelines
- YOUR JOB IS CONTEXT. Ensure each agent has everything it needs. Don't assume agents can find project conventions — pass them the relevant content.
- Speed is not the goal. Correctness and verifiability are.
- When stuck, STOP and ask. If you or any agent is spinning, escalate to the user immediately.
- Session continuity: Before ending, ensure the review document is saved with current
phase:and findings state.
Non-Negotiable Invariants
These are hard requirements. Violating any of them is a bug in execution, not a judgment call.
- Verify before pushing. Run the repo's full verification suite (from CLAUDE.md /
.claude/rules/verification.md) and confirm all checks pass before anygit push. A push without green checks wastes CI and the reviewer's time. - PR comment after pushing. Every push that includes review fixes MUST be followed by a PR summary comment (Phase 2 Step 9). The PR comment is the only artifact that surfaces the review outcome to the team. If the session ends without it, the review is invisible.
- PR comment is keyed by review SHA. Each review round gets its own comment, keyed by a
<!-- code-review: <review-sha> -->marker (the SHA from the review doc filename). Phase 2 Step 9 handles this in the formal fix flow. Phase 3 is the catch-all. The comment must exist and be current before the session ends.
Source: ambroselittle/agent-skills — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核