Agent Skills › Serial-Studio/Serial-Studio › ss-log-mistake

ss-log-mistake

GitHub

用于记录开发缺陷并推动自动化修复。当发现重复错误时,将其加入错误账本,分析原因,并评估是否可通过 lint、hook 或测试实现机械化拦截,从而防止同类问题再次发生。

.claude/skills/ss-log-mistake/SKILL.md Serial-Studio/Serial-Studio

触发场景

要求记录此次错误 添加到常见错误列表 确保不再发生类似问题 维护者纠正了重复错误后

安装

npx skills add Serial-Studio/Serial-Studio --skill ss-log-mistake -g -y
更多选项

非标准路径

npx skills add https://github.com/Serial-Studio/Serial-Studio/tree/master/.claude/skills/ss-log-mistake -g -y

不安装直接使用

npx skills use Serial-Studio/Serial-Studio@ss-log-mistake

指定 Agent (Claude Code)

npx skills add Serial-Studio/Serial-Studio --skill ss-log-mistake -a claude-code -g -y

安装 repo 全部 skill

npx skills add Serial-Studio/Serial-Studio --all -g -y

预览 repo 内 skill

npx skills add Serial-Studio/Serial-Studio --list

SKILL.md

Frontmatter
{
    "name": "ss-log-mistake",
    "description": "Append a row to Serial Studio's mistakes ledger (doc\/claude\/common-mistakes.md) for a defect just caught, and decide whether the class can be made mechanical. Use when asked to \"log this mistake\", \"add this to common-mistakes\", \"make sure this doesn't happen again\", or right after the maintainer corrects a repeated error. A row closes with `Codified:` naming the lint rule, anchor, hook, or test that now catches it, or `not yet`.",
    "argument-hint": "[what went wrong]"
}

Serial Studio — /ss-log-mistake

Writing a mistake down is not the fix. The fix is the check that makes the class harder to repeat; the row exists to say which check that is, or to admit there is none yet. Adapted from the /log-mistake command and defect ledger in PrimeFoldTools/andon (MIT).

Procedure

  1. Name the class before the row. One chat sentence: the symptom, why it was silent, and which family it belongs to. Claim exceeded evidence (said done, had not checked). Decision outran reality (acted on a stale map: an old handoff, a cached agent result, memory instead of the tree). Rule was a convention, not enforcement (a comment said "keep in lockstep"). Pressure replaced evidence (retracted a right answer when challenged). Naming the family is what lets you spot the next member before it lands (doc/claude/j-space.md, verbalize-to-load).

  2. Check it is not already there. Grep doc/claude/common-mistakes.md and CLAUDE.md for the symbol, path, or phrase. The ledger never restates a CLAUDE.md rule: if the mistake is a plain rule violation, the row records only the silent-breakage mechanism the rule does not explain, and points at the rule. If a row already covers the class, sharpen that row instead of adding a near-duplicate.

  3. Pick the section by subsystem. Workflow and collaboration mistakes go under "Process & Trust"; the section list is the table of contents at the top of the file.

  4. Write the row in the existing two-column shape.

    • Mistake: the concrete wrong action, phrased so a reviewer would recognize it in a diff or a chat reply. Not "was careless": name the call, the file, the claim.
    • Fix: the correct action, then the one-clause why it is silent (what the compiler, the linter, or the reviewer cannot see). Dates and commit hashes when the row records a real incident. End with Codified: (step 5).
  5. Ask the mechanical question, per tier. Could the class be caught by:

    • a scripts/code-verify.py rule (a structural pattern in C++/QML/Python),
    • a scripts/claim-verify.py anchor in scripts/doc-anchors.json (a value quoted in two places that must agree),
    • a hook in .claude/hooks/ (a per-turn or per-tool-call behavior),
    • scripts/layer-verify.py or scripts/registry-verify.py (a dependency edge, a command or icon registration),
    • a ctest or pytest (a runtime property)?

    If one fits, say which in chat and offer to build it as its own pass; the row lands now with Codified: not yet and is updated when the check ships. Bundling the countermeasure into the same diff as whatever was being fixed is scope creep (trust contract, "stay in your lane"). If no tier fits, say why in one clause and leave not yet: an honest not yet is the queue the next hook comes from. scripts/ledger-verify.py --check (sanitize and CI) refuses a tree whose open-row count grew, so a not yet row lands only by closing another row with a real check, or by --accept after the maintainer's deliberate decision.

  6. Handoff. Quote the finished row in chat. Nothing else in the file changes.

Don't

  • Add a row for a one-off typo or a mistake the linter already reports; the ledger is for silent breakage.
  • Write "remember to" in the Fix column. If the fix is a reminder, it belongs in step 5 as a candidate hook, not in the row.
  • Mark Codified: with a check that does not exist in the tree yet.

版本历史

  • 3cbdc24 当前 2026-11-03 11:14

    新增 commit-shape gate 和 mistakes-ledger ratchet 机制,通过脚本限制提交范围并校验错误账本行数变化,同时引入 spec premise check 以强化前提验证。

  • 44c9452 2026-09-22 22:28

同 Skill 集合

.claude/skills/qt-cpp-review/SKILL.md
.claude/skills/qt-qml-review/SKILL.md
.claude/skills/ss-ai-audit/SKILL.md
.claude/skills/ss-hotpath/SKILL.md
.claude/skills/ss-implement/SKILL.md
.claude/skills/ss-new-driver/SKILL.md
.claude/skills/ss-plan/SKILL.md
.claude/skills/ss-spec/SKILL.md
.claude/skills/ss-tasks/SKILL.md
.claude/skills/ss-verify/SKILL.md
.claude/skills/cpp-compiler-flags/SKILL.md
.claude/skills/qt-qml/SKILL.md
.claude/skills/ss-cpp-modern/SKILL.md
.claude/skills/ss-docs/SKILL.md

元信息

文件数
0
版本
3cbdc24
Hash
d887f165
收录时间
2026-09-22 22:28

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-06 01:27
浙ICP备14020137号-1