audit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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