audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAudit
Audit
This skill reviews work against every rule in this collection at once. It sends each concern to the skill that owns it and merges the results into one ranked report.
该 skill 会一次性依据本合集中的每条规则审查工作。它会将每个问题交给负责该项规则的 skill,再将结果合并为一份排序报告。
The report, not the rules
报告,而非规则
This skill owns no interface rule. It owns the scope, the order of review, consolidation and the verdict. Each finding cites the rule id from the skill that owns it. A finding needs evidence from the code, the running app or the thread, never taste alone.
The report format is in report.md.
该 skill 不拥有任何界面规则;它负责审查范围、审查顺序、结果汇总和结论。每条发现都要引用负责该规则的 skill 所对应的 rule id。每条发现都必须有来自代码、运行中的应用或会话线程的证据,绝不能仅凭主观偏好作出判断。
报告格式见 report.md。
1. State the scope
1. 明确审查范围
Name what is under review: the uncommitted diff, a branch, a pull request, this session's requests or the whole codebase. An audit with no stated scope is .
audit-state-the-scope说明审查对象:未提交的 diff、某个分支、某个 pull request、本次会话中的请求,或整个代码库。未说明审查范围的 audit 属于 。
audit-state-the-scope2. Read the project's rules
2. 读取项目规则
Read , and the editor rule folders. A written project rule outranks a default here. Flagging code that follows a written rule is .
AGENTS.mdCLAUDE.mdaudit-project-rules-first读取 、 以及编辑器规则目录。此处,成文的项目规则优先于默认规则。将遵循成文规则的代码标记为问题属于 。
AGENTS.mdCLAUDE.mdaudit-project-rules-first3. Run every skill
3. 运行每项 skill
Check the scope against each skill and record what you inspected.
| Skill | Check |
|---|---|
| Each changed surface opened in the running app |
| Every request in the thread against the diff |
| New components, styles and icons against the shared package |
| Unrequested UI, settings, fallbacks, dead code and narrating comments |
| Every label, description and status string |
| Surfaces, type, sound, focus, names, forms, loading, hotkeys and dialogs |
| Every transition, animation, gesture and exit |
| Text and field contrast in each theme, tokens inside components and the accent |
| Each reference board: platform, links and the part to take |
| Each named reference, when the work copies one |
| Repeated corrections with no written rule, and edits that break one |
| Each changed layout at every width, when layout is in scope |
| Stray files, secrets, commits and checks, when git is in scope |
Skipping a skill without saying why is .
audit-run-every-skill根据审查范围逐项检查每个 skill,并记录检查过的内容。
| Skill | 检查内容 |
|---|---|
| 在运行的应用中打开每个变更界面 |
| 将会话线程中的每个请求与 diff 逐一核对 |
| 将新增组件、样式和图标与共享 package 核对 |
| 未被要求的 UI、设置、fallback、死代码和叙述性注释 |
| 每个标签、描述和状态字符串 |
| 界面、类型、声音、焦点、名称、表单、加载、快捷键和对话框 |
| 每个转场、动画、手势和退出效果 |
| 每个主题中的文本和字段对比度、组件内部的 token 以及强调色 |
| 每个参考板:平台、链接和可借鉴的部分 |
| 当作品仿照某个指定参考对象时,逐一检查每个指定参考 |
| 没有成文规则却需反复修正的问题,以及违反规则的编辑 |
| 当布局属于审查范围时,检查所有宽度下的每个变更布局 |
| 当 git 属于审查范围时,检查游离文件、机密信息、提交和检查项 |
跳过任何 skill 却不说明原因属于 。
audit-run-every-skill4. Merge by root cause
4. 按根因合并
One cause that breaks rules in two skills is one finding with both ids. Five call sites with the same local fix is one finding with five locations. Listing each symptom on its own line is .
audit-one-row-per-cause同一个原因违反两项 skill 的规则时,应合并为一条发现,并同时列出两个 id。五个调用点采用相同的局部修复时,应合并为一条发现,并列出五个位置。将每个症状单独列为一行属于 。
audit-one-row-per-cause5. Number the fixes and open the report
5. 为修复项编号并打开报告
Rank findings by severity, then by reach. Number them so the user can answer "fix 1, 2 and 5".
Copy report.html to , an ignored folder and never the source tree. Write beside it in the shape its header comment shows, then open it.
.audit/<scope>/index.htmlreport.jsThe report's look ships with the skill, so write data only. A page with its own markup or styles is .
audit-shipped-reportThe user marks findings with Pick and pastes them back with Copy Picks. Wait for the pick, then fix only the numbers chosen. Fixing everything before the user picks is .
audit-fix-what-was-picked先按严重程度,再按影响范围对发现进行排序。为发现编号,使用户可以回答“修复 1、2 和 5”。
将 report.html 复制到 ;该目录应被忽略,绝不能放在源码树中。按照其头部注释中展示的结构,在同一目录写入 ,然后打开报告。
.audit/<scope>/index.htmlreport.js报告的外观样式随 skill 一同提供,因此只写入数据。页面自行包含标记或样式属于 。
audit-shipped-report用户使用 Pick 标记发现,并通过 Copy Picks 将结果粘贴回来。等待用户完成选择后,只修复被选中的编号。在用户选择之前就修复所有问题属于 。
audit-fix-what-was-pickedThe pair
对照示例
Every check is a pair. The broken line sits beside the line that replaces it.
| Rule | Broken | Replacement |
|---|---|---|
| "Audited the app" | "Audited the uncommitted diff: 14 files" |
| A border flagged in a repo whose rules require it | The project rule cited, no finding |
| | " |
| Five rows for one missing primitive fix | One row, five locations |
| A report page written from scratch | |
| All 18 findings fixed unasked | The numbers the user chose |
每项检查都以成对形式呈现。错误示例与替换它的正确示例并列显示。
| 规则 | 错误示例 | 替换方案 |
|---|---|---|
| “已审查应用” | “已审查未提交的 diff:14 个文件” |
| 在规则要求使用该边框的仓库中,仍将该边框标记为问题 | 引用项目规则,不列为发现 |
| 静默跳过 | “ |
| 同一个缺失的基础组件需要修复,却列出五行 | 一行,五个位置 |
| 从头编写报告页面 | 复制 |
| 未经要求便修复了全部 18 条发现 | 用户选择的编号 |
Reporting
报告结论
Use the severity ladder and format in report.md. when any remains, otherwise. Never work you did not open or read.
BlockHIGHApproveApprove使用 report.md 中的严重程度分级标准和格式。只要仍有一项 ,就使用 ;否则使用 。绝不要对未曾打开或阅读过的工作给出 。
HIGHBlockApproveApprove