review-and-fix
Review all branch changes, fix all issues, then commit. Loops until a pass finds zero new issues.
- License 许可
- MIT
- 所属仓库
- kfet/fir
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- review-and-fix
- builtin
- true
- override
- true
- description
- Review all branch changes, fix all issues, then commit. Loops until a pass finds zero new issues.
03 SKILL.md 正文
High-level flow
Drive the review/fix repeat with the loop skill in condition mode.
Exit predicate: the last pass found zero new issues. The loop's per-cycle
banner keeps the iteration from collapsing into a single pass — that single-pass
collapse is the failure this skill exists to prevent.
Banner slugs (these are exactly the section headings below, so the banner indexes
them): correctness security simplify test-coverage changelog build.
Each loop cycle runs one full Review pass then one Fix pass. Exit only when a Review pass surfaces nothing.
Review
Start from the changed files, but fix anything anywhere — issues in untouched code, other features, or other authors' work are all in scope.
Find changed files:
git diff main --name-only 2>/dev/null
git ls-files --others --exclude-standard
Read every changed file in full. Then look for:
correctness
Logic errors, edge cases, races, misuse of APIs.
security
Injection, unsafe input handling, leaked secrets, unchecked privilege.
simplify
Simplify. Delete dead code, collapse needless abstraction, remove premature generality and redundant layers. Deletion is a feature.
test-coverage
Untested paths, missing failing-first tests for bugs, gaps in edge cases.
changelog
Changes missing from the [Unreleased] section of CHANGELOG.md.
build
Run the project's build/test commands (e.g. make all). Note failures.
Collect issues as a flat list with file:line references and severity (urgent /
backlog). Print the list. If a pass finds nothing, get a second opinion from the
advisor before exiting the loop.
Fix
Fix all issues found this pass, including from other authors or features. Use the advisor for guidance. For bugs, write a failing test first, then fix.
Writing
Comments only where the code cannot be understood without them. Commit: subject line only. PR description: one sentence.
Commit
When the loop exits clean, stage and commit all changes.
Output
Summarise: one-line description of what the reviewed code implements, files reviewed, loop cycles run, issues found (by category), issues fixed, final build status, commit hash + message.
04 同仓库更多 Skills
wt
Spawn a fresh fir agent in its own tmux session on its own git worktree. Use whenever the user wants the work — or the conversation about the work — to happen over there, not here. If the user points at this skill, or has directly loaded it in the context, that alone is the cue — spawn, don't inline.
wrap-up
Wrap up work on a project branch — review, fix, and simplify in a loop until clean, then ff-merge to main.
tmux-observer
Attach a tmux window to an already-running fir session — observe its transcript and drive its input via tmux send-keys. Use when you need to watch or steer another fir agent.
tmux-driver
Drive interactive CLIs (python, gdb, etc.) via named tmux sessions with multi-window support. Falls back to fir's built-in PTY driver when tmux is unavailable.
telegram-bot-setup
Set up a new Telegram bot channel for a fir project — install the telegram MCP, create a per-project state dir, drop in the bot token, wire .fir/mcp.json with TELEGRAM_STATE_DIR, pair the user, and verify. Use when the user asks to add, configure, or onboard a Telegram bot for a fir worktree/project.
sync
Sync with an upstream source repo — detect changed files, apply equivalent downstream edits, update the baseline, and report any new features or non-trivial changes picked up.