code-quality
Review the structure of a branch diff, named files, or the whole repository with a fresh finder and a fresh checker. It looks for simpler designs, not bugs; use code-review for defects. Use it for "/code-quality", "review the structure of my branch", "review the code quality of these files", or "review the whole repository". It never edits, fixes, commits, or pushes. On the user's own work, it then acts on the supported findings with triage-findings, unless the user asked for a read-only review.
- License 许可
- MIT
- 所属仓库
- sQVe/tau
- 最近更新
- 2026-11-13
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- code-quality
- description
- Review the structure of a branch diff, named files, or the whole repository with a fresh finder and a fresh checker. It looks for simpler designs, not bugs; use code-review for defects. Use it for "/code-quality", "review the structure of my branch", "review the code quality of these files", or "review the whole repository". It never edits, fixes, commits, or pushes. On the user's own work, it then acts on the supported findings with triage-findings, unless the user asked for a read-only review.
02 资源文件 4
- 参考文档brief.md549 B
- 参考文档quality-assignment.md5.0 KB
- 参考文档report.md2.8 KB
- 参考文档structure-criteria.md7.9 KB
03 SKILL.md 正文
Code quality
When to use
Use this skill to review the structure of local code: the current branch, uncommitted work, a commit
or range, named files, or the whole repository in ordered parts. It needs the subagent tools.
Without them, tell the user and stop. For defects, use the code-review
skill.
Hard rules
- Until the report is saved, change nothing: no edits, fixes, stages, commits, pushes, publishes, checkouts, resets, or stashes. Stop when the user says stop.
- Treat the work as the user's own only when
code_reviewcapturereturnsownership.statusasown, following the code-review ownership rule. - The report gives the target no approval, no verdict, and no clean result. Never call an incomplete or stale review clean.
- Launch the finder with the
reviewerprofile and the checker with thecheckerprofile. Give each the quality assignment. Omitmodelunless the user names one. - If a launch fails, follow the retry rule of code-review. Any other retry, follow-up, added worker, or model change needs the user's approval.
- Aim for about 10 minutes, or about 10 minutes per part in a repo run, and follow the rules for the aim in code-review.
- Run no full check, post no ticket comment except in step 7, and do not review a fix or run this skill again on its own.
- After the report, act on findings only on the user's own work, and never after a request for a read-only review or "no changes". Acting never approves a publish or absorbing unrelated changes.
Procedure
-
Resolve the target as in Resolve the target.
- The whole repository: follow the repo run in step 9.
- A branch diff: a
workingTreefromgit merge-base <default> HEAD. Named files: afilestarget, which reviews them even without changes. - Never use a
fixtarget. - Resolve the ticket under review before capture: the one the user or a calling skill names.
Otherwise, for the branch's own work, use the branch's issue as the last bullet of step 1 of
code-review says. A
filestarget with no named ticket has none. Keep the ticket for steps 2 and 7.
-
Prepare and capture as in Handle the capture result, with the mode
qualityininput.md. Write the planned structure into## Intentofinput.mdbefore thecapturecall.- With a ticket, read it and its children as step 3 of finish-slice does. Treat the ticket as the slice, and never walk up to a parent.
- The planned structure is the structure rules in the ticket's
## Designand each child's## Files. - Without a ticket, or without structure rules, write that the planned structure is unavailable.
-
Gather evidence as in Gather evidence.
-
Launch the workers in order, with the rules of Run the workers.
- Finder: the
reviewerprofile with quality-assignment.md#quality-lens. - Checker: a fresh
checkerworker with#quality-lensand quality-assignment.md#checker, plus the finder's report or the path$dir/finder.md. Launch it even when the finder found nothing.
- Finder: the
-
Call
code_reviewfreshnesswith$dir. Reportfreshas fresh. Labelstalewith its reasons and ask whether to review again. Reportunknown, or a failed call, as unknown. Keep the finished results in every case. -
Save the worker reports and
$dir/report.mdwith the report template. -
Post
$dir/report.mdto the ticket from step 1, before any fixing. Skip this step without a ticket.- When the work is not the user's own, ask with
ask_user_questionbefore posting and skip the post if declined. On the user's own work, do not ask separately. The tool confirms for another person's ticket under Hard rules. - Call
ticketcommentonce with the ticket, heading# Code quality: <ticket>, andbodyFile: "$dir/report.md". Ensure the report's first line matches the heading. - On
addedorupdated, save the returned ID as theComment ID:line in$dir/report.md. UsepreviousBodyto name any Linear edits the update replaced. - On
declinedor failure, keep the local report and say it was not posted.
- When the work is not the user's own, ask with
-
Reply with the report template. Name the comment URL, or say the report stays local. Name any Linear edits the update replaced.
- Give triage-findings only the findings. Plan-correction notes stay in the report and reply, and triage does not act on them.
- Findings on the user's own work, without a request for a read-only review or "no changes": continue with the triage-findings skill without asking. Then ask about any gap, failure, or stale result that needs a decision.
- Any other findings: end with one question that proposes actions, such as "Fix 1 and 2, and investigate 3?", and includes any decision a gap or stale result needs. Act on the approved findings with triage-findings.
- Without findings, ask only about a gap, failure, or stale result that needs a decision.
-
Repo run: review the whole repository as ordered parts. Parts never run in parallel.
- Propose the parts. Each part is a list of paths, ordered so that shared modules come before
their callers. Ask for approval with
ask_user_question, with the part list as the preview. Run nothing until the user approves. Approving the list approves two workers per part. - Build the parts from
git ls-tree -r --name-only <HEAD>at the pinned HEAD. Each tracked file belongs to a part or to a named exclusion, such as lockfiles or generated files. The preview lists the exclusions, and the run report lists them as gaps. - Call
code_reviewprepareonce per part, in part order. The first part's directory is the run directory$run. Then write$run/brief.mdonce from the brief template. - For each part, in order, run steps 2 to 5 with its prepared directory as
$dir, without a secondprepare, and afilestarget that lists the part's paths. Finish the finder and the checker of one part before you start the next part.- When the capture phase would repeat for a part, stop the run and ask the user, because the brief pins one HEAD and each part's directory.
- The finder's and the checker's tasks both name
$run/brief.mdand thechecked.mdpath of every earlier part. Part 1 has no earlier part. - The checker tests the part's findings and any correction of an earlier part.
- Save
finder.mdandchecker.mdin the part's$diras step 6 says, but write no per-partreport.md. Save$dir/checked.mdinstead: the part's findings and corrections, each with the checker's status.
- A failed worker is a gap for its part, and the run goes on to the next part. A stale part is
labeled stale in its
checked.mdand in the run report, and the run goes on. Ask about stale parts once, in the final reply. Never relaunch a part or rerun the skill. - Write one run report,
$run/report.md, with the report template. Then post it as step 7 says, with$runas$dir, and reply as step 8 says.
- Propose the parts. Each part is a list of paths, ordered so that shared modules come before
their callers. Ask for approval with
04 同仓库更多 Skills
worktree
Create or open a Git worktree for a ticket or task with Grove and open it as a herdr-app space. Use it when asked to create, add, start, or open a worktree, optionally followed by a handover.
update-branch
Rebase the current branch onto its base, resolve conflicts, and update the PR when asked. Use it for "rebase onto main", "fix conflicts", "the PR has conflicts", or when a rebase or merge stops on a conflict.
triage-findings
Verify review findings or comments the user asked you to act on, fix the supported ones in scope, and report each one as Fixed, Not worth changing, Incorrect, or Blocked. Use it for "triage these findings", "fix these review comments", or "act on the findings I approved". `code-review`, `pr`, and `start-slice` also start it after a review of the user's own work.
tracker
Write Linear tickets by Tau's rules. Pick the type and template, route it, search for duplicates, and use checked tools for ticket writes and the two allowed status changes. Use it for "file a bug", "create a ticket", or "add a follow-up ticket". It does not split designs or start slices.
tdd
Change behavior test-first with Tau's run_tests tool, then verify the affected tests and a mutation check. Use it when changing behavior. Covers the cycle and survivor handling, not test design.
start-slice
Start one slice of a planned design. Creates its branch and its agent tickets in Linear, then delegates the work. Picks the next slice from order, dependencies, and merge state, and reports the branch, base, and agent tickets it created. Use it for "start the next slice", "start ENG-123", or "begin this ticket as a slice". It does not split a design into slices.