improve
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImprove
改进
Paths: means the folder containing this SKILL.md, and the plugin folder two levels above it.
${CLAUDE_SKILL_DIR}${CLAUDE_PLUGIN_ROOT}Every question to the user goes in the question box: call the AskUserQuestion tool (2-4 options, the recommended one first). Only in an agent without that tool, ask numbered questions in text.
This runs in a checkout of the repo, for the person who maintains it. A fix here reaches every user on
their next plugin update. . Run the scripts with on Mac
and Linux, on Windows.
S="${CLAUDE_SKILL_DIR}/scripts"python3py路径: 表示包含此 SKILL.md 的文件夹, 表示其上两级的 plugin 文件夹。
${CLAUDE_SKILL_DIR}${CLAUDE_PLUGIN_ROOT}所有向用户提出的问题都要放在问题框中:调用 AskUserQuestion 工具(2-4 个选项,推荐项放在首位)。只有在不具备该工具的 Agent 中,才以文本形式提出编号问题。
此流程在仓库的 git checkout 中运行,供仓库维护者使用。在此处的修复会随用户下次 plugin 更新传递给每位用户。。在 Mac 和 Linux 上使用 运行脚本,在 Windows 上使用 运行。
S="${CLAUDE_SKILL_DIR}/scripts"python3py0. Who is running this
0. 谁在运行此流程
bash
python3 "$S/improve.py" modemaintainerAI_EDITOR_MAINTAINER=1userdocs/customise.mdtaste.py add ... --setpython3 "${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/custom.py" rule "<rule>"custom/captions/<name>.jsontaste.py set captions.preset <name>custom/templates/<type>.jsontaste.py suggestbash
python3 "$S/improve.py" mode只有在仓库的 git checkout 中且设置了 时,才会进入 模式:继续执行第 1 步。
AI_EDITOR_MAINTAINER=1maintaineruserdocs/customise.mdtaste.py add ... --setpython3 "${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/custom.py" rule "<rule>"custom/captions/<name>.jsontaste.py set captions.preset <name>custom/templates/<type>.jsontaste.py suggest1. Collect
1. 收集
bash
python3 "$S/improve.py" collect [--edits D] [--no-gh]One line a rule, most repeated first: times it came in, from where (suggestion, taste
regression, preview correction, review note, GitHub issue), the owner named, and up to three examples.
A rule said by several users, or said again after it was applied, comes first.
bash
python3 "$S/improve.py" collect [--edits D] [--no-gh]每条规则占一行,出现次数最多的排在最前:出现次数、来源(建议、taste 回归、预览纠正、审阅备注、GitHub issue)、标明的归属方,以及最多三个示例。
由多个用户提出的规则,或应用后再次被提出的规则,排在最前。
2. Pick
2. 选择
Show the top of the queue and ask in the question box which to fix now (multi-select, the most repeated
first, recommended). For each one, also ask when it is unclear: Every user (Recommended) / Only
some creators' styles (it belongs in a style.json field, not a rule) / Not a fix (close it).
显示队列顶部的内容,并通过问题框询问现在要修复哪些项(多选,出现次数最多的排在首位并作为推荐项)。对于每一项,如果其适用范围不明确,还要询问:所有用户(推荐)/ 仅适用于部分创作者的风格(它应放入 style.json 字段,而不是规则)/ 无需修复(关闭该项)。
3. Fix each one, in this order
3. 按以下顺序修复每一项
- The rule. One line in under the right heading, naming where it is enforced, and the same rule in the owning SKILL.md or reference. General, never about one video: "Zooms ease over at least 0.5 s", not "the zoom at 0:12 snapped".
${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.md - The enforcement. The smallest code that makes the rule hold without anyone remembering it:
a FAIL in a check (,
check.py,quality.py,product.py check), a refusal in the script that would break it (ai_tells.py), a default that cannot produce it, or a line ingates.pyfor a repo rule. Prefer tightening an existing check to adding one.tests/check_plugins.py - The test. An assert in that script's (or
demo()), built from a small synthetic example of the failure. Run it before the fix and see it fail, then after and see it pass. A rule only an agent can follow (asking, explaining) gets an eval case intests/instead:evals/plus aprompt.mdortool_usedgrader.llm - The record. : the rule, where it is written, what enforces it, what tests it. Then the changelog line:
docs/feedback-matrix.md
bash
AI_EDITOR_MAINTAINER=1 python3 "$S/improve.py" log "quality.py: a zoom faster than 0.5 s is a FAIL (quality.py demo)"- 规则。 在 的相应标题下写一行规则,说明它在哪里被强制执行,并在负责该规则的 SKILL.md 或 reference 中写入同一规则。规则必须具有通用性,绝不能针对单个视频,例如应写“缩放的缓动时长至少为 0.5 s”,而不是“0:12 处的缩放很突兀”。
${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.md - 强制执行。 用尽可能少的代码让规则成立,而不必依赖任何人记住它:可以在检查(、
check.py、quality.py、product.py check)中加入一个 FAIL,在可能破坏规则的脚本(ai_tells.py)中加入拒绝执行,设置一个无法产生该问题的默认值,或针对仓库规则在gates.py中添加一行。优先收紧现有检查,而不是新增检查。tests/check_plugins.py - 测试。 在该脚本的 (或
demo())中添加一个 assert,使用一个能够复现问题的小型合成示例构建。修复前运行并确认其失败,修复后再运行并确认其通过。对于只有 Agent 才能遵循的规则(例如询问、解释),改为在tests/中添加一个 eval 用例:包含evals/,以及prompt.md或tool_usedgrader。llm - 记录。 在 中记录:规则、规则写在哪里、什么负责强制执行它、什么负责测试它。然后添加 changelog 行:
docs/feedback-matrix.md
bash
AI_EDITOR_MAINTAINER=1 python3 "$S/improve.py" log "quality.py: a zoom faster than 0.5 s is a FAIL (quality.py demo)"4. Run everything
4. 运行全部检查
bash
python3 tests/check_plugins.py
for p in . plugins/ai-editor plugins/creator-teardown; do claude plugin validate --strict "$p"; doneThen every demo in , , and when the renderer
is set up and . All green before handing over. Do not commit; the
maintainer reviews the diff and the CHANGELOG.md entry and commits.
.github/workflows/check.ymlnode tests/test_record.mjstests/smoke.pytests/golden.pyOn a GitHub issue that is now fixed, offer to comment the changelog line and close it
(), only after asking.
gh issue close <n> --comment "..."bash
python3 tests/check_plugins.py
for p in . plugins/ai-editor plugins/creator-teardown; do claude plugin validate --strict "$p"; done然后运行 中的每个 demo、,并在 renderer 设置好后运行 和 。移交前所有检查都必须通过。不要提交;由维护者审查 diff 和 条目后提交。
.github/workflows/check.ymlnode tests/test_record.mjstests/smoke.pytests/golden.pyCHANGELOG.md对于现已修复的 GitHub issue,应主动提出用 changelog 行发表评论并关闭该 issue(),但必须先询问。
gh issue close <n> --comment "..."Never
禁止事项
- Never edit a user's taste.md, taste.json, rules.json or suggestions.jsonl: they are theirs.
- Never put personal data in the repo: no names, handles, emails, file names or footage from the
feedback. Write the general rule and a synthetic example. fails on known private names; read every example before it goes in.
tests/check_plugins.py - Never close the loop with a note alone. A rule with no enforcement and no test is not done.
- 绝不编辑用户的 taste.md、taste.json、rules.json 或 suggestions.jsonl:这些文件属于用户。
- 绝不将个人数据放入仓库:不得包含反馈中的姓名、账号名、邮箱、文件名或视频素材。写入通用规则和合成示例。会因已知的私密姓名而失败;每个示例加入前都要仔细阅读。
tests/check_plugins.py - 绝不只靠一条备注来闭环。没有强制执行机制和测试的规则不算完成。
Files
文件
- :
scripts/improve.py,mode,collect(maintainer mode only),log. Reads only, except CHANGELOG.md.demo - : the user's
${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/custom.pyfolder (user mode writes there).<library>/custom/ - : where
${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.pyandsuggestwrite the user side.issue
- :提供
scripts/improve.py、mode、collect(仅限 maintainer 模式)和log。除demo外均为只读。CHANGELOG.md - :用户的
${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/custom.py文件夹(user 模式会写入此处)。<library>/custom/ - :
${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.py和suggest写入用户端内容的位置。issue