audit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Audit

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-scope
。

2. Read the project's rules

2. 读取项目规则

Read
AGENTS.md
,
CLAUDE.md
and the editor rule folders. A written project rule outranks a default here. Flagging code that follows a written rule is
audit-project-rules-first
.
读取
AGENTS.md
、
CLAUDE.md
以及编辑器规则目录。此处,成文的项目规则优先于默认规则。将遵循成文规则的代码标记为问题属于
audit-project-rules-first
。

3. Run every skill

3. 运行每项 skill

Check the scope against each skill and record what you inspected.
SkillCheck
verify
Each changed surface opened in the running app
scope
Every request in the thread against the diff
reuse
New components, styles and icons against the shared package
restraint
Unrequested UI, settings, fallbacks, dead code and narrating comments
copy
Every label, description and status string
defaults
Surfaces, type, sound, focus, names, forms, loading, hotkeys and dialogs
motion
Every transition, animation, gesture and exit
color
Text and field contrast in each theme, tokens inside components and the accent
gather
Each reference board: platform, links and the part to take
match
Each named reference, when the work copies one
rule
Repeated corrections with no written rule, and edits that break one
viewports
Each changed layout at every width, when layout is in scope
ship
Stray files, secrets, commits and checks, when git is in scope
Skipping a skill without saying why is
audit-run-every-skill
.
根据审查范围逐项检查每个 skill,并记录检查过的内容。
Skill检查内容
verify
在运行的应用中打开每个变更界面
scope
将会话线程中的每个请求与 diff 逐一核对
reuse
将新增组件、样式和图标与共享 package 核对
restraint
未被要求的 UI、设置、fallback、死代码和叙述性注释
copy
每个标签、描述和状态字符串
defaults
界面、类型、声音、焦点、名称、表单、加载、快捷键和对话框
motion
每个转场、动画、手势和退出效果
color
每个主题中的文本和字段对比度、组件内部的 token 以及强调色
gather
每个参考板:平台、链接和可借鉴的部分
match
当作品仿照某个指定参考对象时,逐一检查每个指定参考
rule
没有成文规则却需反复修正的问题,以及违反规则的编辑
viewports
当布局属于审查范围时,检查所有宽度下的每个变更布局
ship
当 git 属于审查范围时,检查游离文件、机密信息、提交和检查项
跳过任何 skill 却不说明原因属于
audit-run-every-skill
。

4. 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-cause
。

5. 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
.audit/<scope>/index.html
, an ignored folder and never the source tree. Write
report.js
beside it in the shape its header comment shows, then open it.
The report's look ships with the skill, so write data only. A page with its own markup or styles is
audit-shipped-report
.
The 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.html
;该目录应被忽略,绝不能放在源码树中。按照其头部注释中展示的结构,在同一目录写入
report.js
,然后打开报告。
报告的外观样式随 skill 一同提供,因此只写入数据。页面自行包含标记或样式属于
audit-shipped-report
。
用户使用 Pick 标记发现,并通过 Copy Picks 将结果粘贴回来。等待用户完成选择后,只修复被选中的编号。在用户选择之前就修复所有问题属于
audit-fix-what-was-picked
。

The pair

对照示例

Every check is a pair. The broken line sits beside the line that replaces it.
RuleBrokenReplacement
audit-state-the-scope
"Audited the app""Audited the uncommitted diff: 14 files"
audit-project-rules-first
A border flagged in a repo whose rules require itThe project rule cited, no finding
audit-run-every-skill
copy
silently skipped
"
copy
: no strings changed"
audit-one-row-per-cause
Five rows for one missing primitive fixOne row, five locations
audit-shipped-report
A report page written from scratch
report.html
copied, only
report.js
written
audit-fix-what-was-picked
All 18 findings fixed unaskedThe numbers the user chose
每项检查都以成对形式呈现。错误示例与替换它的正确示例并列显示。
规则错误示例替换方案
audit-state-the-scope
“已审查应用”“已审查未提交的 diff:14 个文件”
audit-project-rules-first
在规则要求使用该边框的仓库中,仍将该边框标记为问题引用项目规则,不列为发现
audit-run-every-skill
静默跳过
copy
“
copy
:没有字符串发生变化”
audit-one-row-per-cause
同一个缺失的基础组件需要修复,却列出五行一行,五个位置
audit-shipped-report
从头编写报告页面复制
report.html
,只写入
report.js
audit-fix-what-was-picked
未经要求便修复了全部 18 条发现用户选择的编号

Reporting

报告结论

Use the severity ladder and format in report.md.
Block
when any
HIGH
remains,
Approve
otherwise. Never
Approve
work you did not open or read.
使用 report.md 中的严重程度分级标准和格式。只要仍有一项
HIGH
,就使用
Block
;否则使用
Approve
。绝不要对未曾打开或阅读过的工作给出
Approve
。