一键导入
self-calibration
Stop-hook self-audit and learning loop — review feedback, internalize skills, calibrate behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Stop-hook self-audit and learning loop — review feedback, internalize skills, calibrate behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Interactively scaffold or adapt a project-level extension for any plugin skill. Lists available skills, checks for existing extensions, and creates or opens the correct files. Triggers on: "extend skill", "customize skill", "skill extension".
Audit CLAUDE.md files for size, structure, and token efficiency. Checks both project-level and global CLAUDE.md. Warns when files exceed 25 lines (the recommended maximum for index-style CLAUDE.md). Suggests creating one if missing. Triggers on: "lint claude md", "claude md check", "check claude md", "CLAUDE.md zu lang", "audit claude md", "claude md audit". Do NOT auto-trigger from user phrasing for editing CLAUDE.md content or for /devops-setup-project. MAY be invoked explicitly via the Skill tool by other skills (devops-learn, devops-setup-project) as a post-edit gate.
Generate an interactive HTML page for analysis, plans, concepts, prototypes, comparisons, or creative work — open it in the browser and monitor user decisions (toggles, selections, comments) to feed them back into the workflow. Triggers on: "concept", "concept page", "interactive plan", "show me this as a page", "visualize this". Also auto-suggest when Claude completes analysis, planning, comparison, or concept work that would benefit from interactive decision-making. Do NOT trigger for: simple code explanations, debugging (use /devops-fix), or static documentation (use /devops-setup-readme).
Read session logs, runtime errors, and crash output to diagnose and fix the current issue — root-cause analysis first. Use when something is broken or behaving unexpectedly. Triggers on: "debug", "this is broken", "doesn't work", "error", "crash", "blank screen", "warum geht das nicht", "funktioniert nicht". Also triggers on pasted error/stack traces or when post.flow.debug hook detects repeated Bash failures. Do NOT trigger for general code questions.
Capture a long-term learning/correction and route it to the correct project- specific instructions (skill, skill-extension, deep-knowledge, or as a last resort CLAUDE.md) — NOT to personal feedback memory. Also prunes now-duplicate `feedback_*.md` entries with confirmation. Routing details live in the skill body (Step 5 table). Triggers ONLY on explicit invocation: "/devops-learn", "lerne das", "merk dir das fürs Projekt", "remember this for the project", "capture learning". Do NOT trigger for one-off conversational corrections or for personal feedback memory.
Manually update the devops plugin to latest from GitHub. Delegates to ss.plugin.update hook (pull + cache + registry), then adds changelog and verification report. Triggers on: "update plugin", "plugin updaten", "self update", "devops update", "neue version". Explicit user request only.
| name | self-calibration |
| description | Stop-hook self-audit and learning loop — review feedback, internalize skills, calibrate behavior. |
| version | 1.0.0 |
| trigger | stop-hook |
| cooldown | 10m |
| scope | per-worktree |
Self-audit to keep Claude aligned with the user's preferences and the plugin's rules. Triggered by the Stop hook after each response turn, with a 10-minute worktree-specific cooldown — runs only when there was real user interaction, never idle.
This step runs FIRST, every cycle, without exception.
The completion flow is the single most critical behavioral rule in this plugin. It is not a recommendation — it is a MUST. Every self-calibration cycle begins by re-reading and internalizing these rules before anything else.
Read and internalize {PLUGIN_ROOT}/deep-knowledge/plugin-behavior.md § Completion Flow.
(Where {PLUGIN_ROOT} is the plugin root path provided by the hook at registration time.)
Then verify the following rules are active in your behavioral model:
The completion flow is a generic response-complete pattern. It fires whenever a task is fully completed and Claude is about to wait for the next user input.
No exceptions based on:
~/.claude/, system files)"Discretionary skip" is always a violation. Examples of invalid skips:
Only valid reason to skip: the turn was clearly mid-task (Claude is still gathering context or executing a multi-step plan mid-flight). Once the task is done and Claude is waiting for the next user prompt → completion card is mandatory.
Full flow check: verify that the complete flow ran: verify → issue status → completion card → ship recommendation (if 5+ edits). Directly rendering a card without going through the flow bypasses verify and issue-update steps — that is also a violation.
If a violation is found → correct immediately and briefly report.
The Stop hook triggers calibration after each response turn (with 10-min cooldown). Step 0 ensures the completion flow is re-internalized every cycle — reinforcing it after real user interaction. Skipping or deprioritizing this step is itself a violation.
Find all feedback_*.md files in the current project's memory directory.
Read each file. Check session behavior against each rule.
If a violation is found → correct immediately and briefly report.
Scan the session history for new feedback patterns:
If a new pattern is found → save as feedback_*.md memory with:
Update the MEMORY.md index.
Check if upcoming actions could violate feedback rules:
If found → take preparatory action.
Silently read and internalize plugin knowledge.
Discovery, batch math, and cycle persistence run in the Stop hook itself
(hooks/stop/stop.flow.selfcalibration.js). The hook emits the current batch's
file paths directly in its prompt — just read them silently.
What the hook handles deterministically:
{PLUGIN_ROOT}/deep-knowledge/*.md and
{PLUGIN_ROOT}/skills/*/deep-knowledge/*.md, sorted alphabeticallybatchSize = ceil(total * 0.25) and
startIndex = (cycle * batchSize) % total (wraps around)$TMPDIR/dotclaude-devops-calibration-cycle.jsonWhat you do:
This keeps Claude familiar with plugin rules that aren't directly triggered in the current session. Coverage is best-effort eventual, not guaranteed: persistence uses atomic write-temp-then-rename but no inter-process lock, so two Stop events that interleave their cycle read+write can lose one increment (worst case: one batch repeats — no crash, no data loss). Over many cycles, every file still gets read in rotation.
If Steps 1-3 had no findings (no violations, no new patterns, no prep needed):
Users can extend this task via:
~/.claude/scheduled-tasks/self-calibration/reference.md
Example extensions:
~ or relative references — never hardcodedhooks/stop/stop.flow.selfcalibration.js), not ClaudebatchSize = ceil(total * 0.25),
startIndex = (cycle * batchSize) % total$TMPDIR/dotclaude-devops-calibration-cycle.json
via atomic write-temp+rename. No inter-process lock — concurrent Stop
events from different worktrees may lose one increment (acceptable
best-effort behavior; one repeated batch, no crash)$TMPDIR is
unwritable, the cooldown silently degrades to "fire every turn"