CLAUDE.md@skills/self-improving-agent/hooksA

CLAUDE.md@skills/self-improving-agent/hooks from kopp0510/claude-dd is a CLAUDE.md file: the standing instructions Claude Code reads in that repo.

Install it, pinned
mdr add kopp0510/claude-dd/skills/self-improving-agent/hooks/CLAUDE.md@git:20261029.86f37df

Pins git:20261029.86f37df in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
CLAUDE.md file
Repository
kopp0510/claude-dd
Path
skills/self-improving-agent/hooks/CLAUDE.md
Versions recorded
8
Latest version
git:20261029.86f37df, committed Oct 29, 2026
First version recorded
Sep 12, 2026
Size
6,854 bytes
Repository stars
12
License
MIT

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# self-improving-agent / hooks

vendored skill 裡唯一會實際執行的程式碼:一支 PostToolUse hook,在 Bash 指令的輸出裡
找錯誤字樣,命中就回一則約 40 token 的提醒,建議使用者跑 `/self-improving-agent:remember`
把解法存下來。它自己不寫 auto-memory。

## 關鍵檔案

| 檔案 | 用途 |
|---|---|
| `error-capture.sh` | hook 本體。stdin 收 Claude Code 的 JSON,取 `tool_response` 的 stdout+stderr,逐行比對 `EXCLUSIONS` 與 `ERROR_PATTERNS`,命中則用 `hookSpecificOutput.additionalContext` 回提醒。JSON 讀寫 jq 優先、python3 後備,兩者都沒有就靜靜 exit 0 |
| `test-error-capture.sh` | 上者的行為測試(CI 會跑)。整套跑兩輪:一輪預設 PATH、一輪把 jq 藏起來逼它走 python3 後備,否則另一條分支零覆蓋。payload 手寫進 JSON,含雙引號或反斜線會生出壞 JSON 讓 hook 靜默 exit 0、案例假通過 —— 所以每個 payload 送出前都先驗 JSON 合法性,不合法就判該案例失敗 |
| `hooks.json` | 註冊用設定。帶 `"timeout": 30`(秒)—— 使用者要求所有 hook 都有逾時,hook 卡住時最多拖住 30 秒。`command` 必須是 `$HOME/...` 絕對路徑 —— hook 以當下工作目錄為基準執行,寫 `./hooks/xxx.sh` 換個專案就找不到(根目錄 CLAUDE.md「Skill hook 路徑規範」,`validate_skill_hooks()` 會在部署前擋下相對路徑) |

## 此層約束

- **它看不到 exit code**。`tool_response` 裡**每一筆都有**的是 `stdout` / `stderr` /
  `interrupted` / `isImage` / `noOutputExpected`,另有偶發欄位 `gitOperation`(230)、
  `returnCodeInterpretation`(95)、`persistedOutputPath` / `persistedOutputSize`(71)、
  `backgroundTaskId`(50)、`backgroundCwdHint`(11)、`timedOutAfterMs`(9) ——
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add kopp0510/claude-dd/skills/self-improving-agent/hooks/CLAUDE.md@sha256:24bbd64d00b79447

The line at the top of this page pins the label git:20261029.86f37df, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_57yggvsqw7vupx66.svg)](https://markdownregistry.com/a/art_57yggvsqw7vupx66)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 8 versions of this file, between Sep 12, 2026 and Oct 29, 2026, about one every 7 days.

versioncommittedcommitsizeaudit
git:20261029.86f37df latest2026-10-29 86f37df 6,854 BA view · diff
git:20261012.2bb80112026-10-12 2bb8011 6,751 BA view · diff
git:20261012.608caa92026-10-12 608caa9 6,689 BA view · diff
git:20260912.021dd4c2026-09-12 021dd4c 5,816 BA view · diff
git:20260912.80ce32e2026-09-12 80ce32e 5,090 BA view · diff
git:20260912.fc2587a2026-09-12 fc2587a 3,860 BA view · diff
git:20260912.a835d1a2026-09-12 a835d1a 3,820 BA view · diff
git:20260912.708b3362026-09-12 708b336 3,545 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (6854 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

kopp0510/claude-dd · 12 stars · license MIT · pushed 2026-10-30 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_57yggvsqw7vupx66
GET https://markdownregistry.com/api/v1/resolve?ref=kopp0510/claude-dd/skills/self-improving-agent/hooks/CLAUDE.md
GET https://markdownregistry.com/api/v1/blob/24bbd64d00b7944784315af58b9859a9bd198ba3046085956709e6a9c879bd96

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: what a CLAUDE.md file is · keeping AGENTS.md and CLAUDE.md in sync · which agent file does what.

More from kopp0510/claude-dd

CLAUDE.md CLAUDE.md file
kopp0510/claude-dd · CLAUDE.md
git:20261030.81f1b68 · audit A · 12 stars
CLAUDE.md@diagrams/src CLAUDE.md file
kopp0510/claude-dd · diagrams/src/CLAUDE.md
git:20261029.a30dc1a · audit A · 12 stars
CLAUDE.md@docs/measurements/2026-10-24-s4-inputs CLAUDE.md file
kopp0510/claude-dd · docs/measurements/2026-10-24-s4-inputs/CLAUDE.md
git:20261023.7f05f62 · audit A · 12 stars
CLAUDE.md@docs/measurements/2026-10-24-s4-outputs CLAUDE.md file
kopp0510/claude-dd · docs/measurements/2026-10-24-s4-outputs/CLAUDE.md
git:20261023.1e209ef · audit A · 12 stars
CLAUDE.md@docs/measurements/2026-10-24-s5-inputs CLAUDE.md file
kopp0510/claude-dd · docs/measurements/2026-10-24-s5-inputs/CLAUDE.md
git:20261024.fb6f816 · audit A · 12 stars
CLAUDE.md@docs/measurements/2026-10-24-s5-outputs CLAUDE.md file
kopp0510/claude-dd · docs/measurements/2026-10-24-s5-outputs/CLAUDE.md
git:20261024.ce3dd5d · audit A · 12 stars
CLAUDE.md@docs/measurements/2026-10-29-adhd-style CLAUDE.md file
kopp0510/claude-dd · docs/measurements/2026-10-29-adhd-style/CLAUDE.md
git:20261029.af255a2 · audit A · 12 stars
CLAUDE.md@docs/measurements/2026-10-30-dd-init-upgrade CLAUDE.md file
kopp0510/claude-dd · docs/measurements/2026-10-30-dd-init-upgrade/CLAUDE.md
git:20261030.92509fc · audit A · 12 stars
CLAUDE.md@docs/measurements/2026-10-30-dd-loop-trigger CLAUDE.md file
kopp0510/claude-dd · docs/measurements/2026-10-30-dd-loop-trigger/CLAUDE.md
git:20261029.f2ab54a · audit A · 12 stars
CLAUDE.md@docs/reviews CLAUDE.md file
kopp0510/claude-dd · docs/reviews/CLAUDE.md
git:20261029.7253986 · audit A · 12 stars
CLAUDE.md@scripts CLAUDE.md file
kopp0510/claude-dd · scripts/CLAUDE.md
git:20261030.f452f25 · audit A · 12 stars
code-simplifier SKILL.md skill
kopp0510/claude-dd · skills/code-simplifier/SKILL.md · 調用官方 code-simplifier agent 簡化程式碼。當使用者要求簡化、降低複雜度、清理冗餘,或執行 8 步開發迴圈步驟 3 時啟用。不適用於 PR 審查(用 code-reviewer)。
git:20260912.708b336 · audit A · 12 stars

Every file in kopp0510/claude-dd

Browse by kind, by grade A, or by owner.