用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/laicluse/agent-fieldkit --skill repair命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when corrective work, migrations, living docs, or temporary diagnostic tests leave superseded residue, or before handoff.
Use when corrective work, migrations, living docs, or temporary diagnostic tests leave superseded residue, or before handoff.
Reference for git-discipline commit bodies, trailers, hook denials, examples, and escape hatches.
正在显示 SKILL.md
| name | repair |
| user-invocable | true |
| description | Analyze captured friction notes and fix one recurring issue at its source when /anger-management:repair is typed. |
Repair is where a captured problem gets fixed at its source. It takes over the fixing steps self-improvement used to run, and it fires in two modes that differ only in WHEN it runs and WHAT it reads. The fixing steps below are identical in both.
This is the single place anger-management diagnoses a problem and fixes it.
Nothing else judges: the cuss commands only capture into the pile,
/anger-management only tallies it, and findings.md is this engine's own
pile-analysis cached ahead of time, never a second analyser. One analyser, fed
two ways.
/anger-management:repair or by the
background diagnosis. It reads the whole accumulated friction log: cluster,
weigh recurrence, gate on confidence, close the watermark. The log, verdict,
and recording sections are pile-only./safeword, /flugelhorn,
and the other safewords) with the problem the operator just caught. It works
from that single instance: no cluster, no confidence gate, no friction.jsonl,
no anger-resolve, no watermark. Skip straight to the fixing steps for that one
problem.Both modes run the same fixing steps. A bare acknowledgement is never the outcome in either mode: end in a real source-level change, or, in now mode, the corrected behavior shown with evidence it was a true one-off.
One pile for every session and every repo:
${LAICLUSE_HOME:-~/.laicluse}/anger-management/friction.jsonl (each line: ts, word, cwd,
git, note). Repair history: repairs.jsonl (past fixes, each with a covered_through
watermark). A background diagnosis the cooled-down agent may have written:
findings.md.
Open captures = entries with ts newer than the newest covered_through in
repairs.jsonl (if there is no history, all are open). Always work the WHOLE open
pile, not one entry. Also inspect the historical captures and repairs as context:
old entries are recurrence evidence, and later entries after a repair can show
that the earlier mitigation missed or overcorrected. This is why deferring helps:
every extra capture across every session sharpens the picture.
Use the background diagnosis only if it is fresh and complete. If findings.md
exists, read its first line (as-of: <ts>). If no capture in the pile is newer
than that as-of, and the diagnosis contains CONFIDENCE:,
MITIGATION-LEVEL:, and TARGET-SCOPE:, it is current: use it. If captures
are newer, there is no as-of line, or the confidence/mitigation/scope fields
are missing, treat it as stale and investigate yourself now: read the entire
capture history, repairs.jsonl, and the agent's recent session transcripts
(Claude Code: ~/.claude/projects/; Codex: ~/.codex/sessions/) for what
actually happened around those timestamps. You have the time; look properly.
Cluster the open pile, then compare it to history. Same project (cwd/git) or same theme across projects. The recurring thing is the signal; a lone one-off is noise. Historical captures can raise or lower confidence, but they do not close the open pile by themselves.
Open with a go/no-go verdict plus confidence. This is the whole point: no
busywork. Confidence threshold: 0.80. State one of three, before anything
else, and include CONFIDENCE: 0.xx, MITIGATION-LEVEL: ..., and
TARGET-SCOPE: ...:
CONFIDENCE is at least 0.80 and the mitigation level is specific.Use these mitigation levels:
hook: hook, schema, linter, permission rule, test, or deterministic script.skill-plugin: skill text, plugin helper, plugin metadata, or generated adapter.project-code: a code structure that invites the repeat failure.instruction-file: only when no stronger target fits.none: no credible mitigation yet.Now mode enters here with the single problem as the target; pile mode arrives
here only after a fix verdict.
Choose the owner source before editing. The diagnosis, confidence call, mitigation-level choice, and target-scope choice belong to anger-management: do not hand the decision to self-improvement and do not delegate the diagnosis or target-layer choice. Use the target scope to choose the broadest correct source:
Source ownership rules:
packages/<plugin>/, not
user-level instructions..claude-plugin/plugin.json or marketplace
source, followed by adapter generation.Skill, hook, and plugin authoring:
Fix it yourself when the source is clear. Make the smallest durable source
change, prune duplicates in the same pass, rebuild generated outputs, and run
focused tests or checks. If the fix crosses an explicit approval gate,
stop at the gate with the concrete patch plan. If the source cannot be found,
say exactly what you checked; in pile mode leave the captures open and do not
call anger-resolve.
Now mode touched no log, so it records nothing and skips this section.
Record only real fixes. When you fixed it, or routed the fix to its source,
record it so its captures close. Resolve the
loaded plugin root first; Claude Code exposes ${CLAUDE_PLUGIN_ROOT}, and
Codex exposes the install path through codex plugin list:
resolve_anger_plugin_root() {
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
printf '%s\n' "$CLAUDE_PLUGIN_ROOT"
return 0
fi
if command -v codex >/dev/null 2>&1; then
codex plugin list | awk '$1 == "anger-management@laicluse-agent-fieldkit" { print $NF; found=1; exit } END { exit found ? 0 : 1 }'
return $?
fi
return 1
}
PLUGIN_ROOT="$(resolve_anger_plugin_root)" || { echo "anger-management plugin root not found" >&2; exit 1; }
node "$PLUGIN_ROOT/bin/anger-resolve" --through "<as-of you worked from>" "<the change you routed>"
Pass --through = the as-of of the diagnosis you acted on (the findings.md
as-of, or the newest capture you actually reviewed), so captures that arrived
DURING this repair are not silently closed. Only on a real fix at or above the
confidence threshold; never for nothing, not-enough-signal, or unknown source.
The watermark closes by time, so if several distinct clusters are open and you
fix one, the others are marked covered too and will reopen on their next
recurrence.
Keep it short, in the operator's language. The verdict (and, when fixing, the routed change) is the whole output. In now mode, the routed change or the evidenced one-off correction is the whole output.
<text>: pile mode filtered to a word, project, or theme.Scope ladder:
cross-agent-cross-project: covers repos or agent clients.cross-project-stack: covers one framework or stack.repo: covers the current repository.subproject: covers only below one package, app, service, or plugin.none: no credible target scope yet.If confidence is below 0.80, leave the captures open. The breadcrumb is
useful evidence for a future pass; closing it would erase the trail before the
pattern is understood.
If the verdict is fix: scrutinise prior self-improvements first. The operator mostly cusses
when something RECURS despite earlier fixes. So before proposing a new rule, check
repairs.jsonl: did a past repair already target this? If captures kept coming, the
past fix probably overcorrected or missed. Prefer reverting or loosening that
rule over piling another on. The right change is often subtraction.