audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAudit
审计
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 的规则 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-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 |
| Each changed post, breakdown or design note, when writing is in scope |
| Surfaces, type, sound, focus, names, forms, loading, hotkeys and dialogs |
| Every transition, animation, gesture, exit and motion blur |
| 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 对照检查 |
| 将新增组件、样式和图标与共享包对照检查 |
| 未经请求的 UI、设置、fallback、dead code 和叙述性注释 |
| 每个标签、描述和状态字符串 |
| 当写作在审查范围内时,检查每篇变更后的文章、拆解内容或设计说明 |
| 界面、字体、声音、焦点、名称、表单、加载状态、快捷键和对话框 |
| 每个过渡、动画、手势、退出效果和运动模糊 |
| 每个主题中的文本和字段对比度、组件内部的 token 以及强调色 |
| 每个参考板:平台、链接以及应采用的部分 |
| 当工作复制了某个指定参考时,检查每个指定参考 |
| 没有书面规则却需要反复修正的问题,以及违反规则的修改 |
| 当布局在审查范围内时,在每种宽度下检查每个变更后的布局 |
| 当 git 在审查范围内时,检查无关文件、secrets、提交和检查项 |
未说明原因就跳过任何 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 一同提供,因此只需写入数据。页面如果包含自己的 markup 或 styles,就属于 。
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