Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/kopp0510/claude-ddWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/kopp0510/claude-dd/dd-init)<a href="https://agentmods.dev/commands/kopp0510/claude-dd/dd-init"><img src="https://agentmods.dev/badge/commands/kopp0510/claude-dd/dd-init/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/kopp0510/claude-dd/dd-init"><img src="https://agentmods.dev/badge/commands/kopp0510/claude-dd/dd-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.12315 |
| Opus 5.5 | $0.00017 | $0.04926 |
| Sonnet 5.5 | $0.00009 | $0.02463 |
| Haiku 4.5 | $0.00004 | $0.01231 |
Grade B, and why
dd-init scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
存在但 `grep -q -- '--start-segment' ~/.claude/scripts/check-claude-md.sh` 找不到 → 是舊版 gate Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- 有 HTTP API(後端/全端)→ 驗證含 **curl 打真實 API** How it starts
The opening of the file, as written. The whole thing — 401 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DD 初始化 — 8 步開發迴圈
初始化專案的開發慣例:蓋章「8 步開發迴圈」到專案 CLAUDE.md、建立截圖目錄、 確認巢狀 CLAUDE.md 維護依賴。支援新專案(空目錄)和現有專案(已有程式碼)。
執行步驟
Phase 0: 專案偵測
-
掃描目錄內容,用 Glob 檢查專案類型指標:
package.json→ Node.js、go.mod→ Go、pyproject.toml/requirements.txt→ PythonCargo.toml→ Rust、pom.xml/build.gradle→ Java、composer.json→ PHP、Gemfile→ Ruby- 前端框架:偵測
next.config.*、vite.config.*、src/App.*等
-
判斷驗證方式(填入迴圈步驟 5 的具體指令):
- 有 HTTP API(後端/全端)→ 驗證含 curl 打真實 API
- 有前端 UI → 驗證含 playwright 開真實瀏覽器(截圖存
.screenshots/) - 純 CLI / 函式庫 → 驗證退化為「跑真實指令 / 消費端範例」
- 根目錄或第一層子目錄的
package.json,其dependencies或devDependencies有react;新專案則是使用者回答用 React → React 專案(Phase 1 要加 React 那段)
-
檢查 CLAUDE.md 是否存在(判斷之前先照下面「寫檔前:先看目標是不是 symlink」那節檢查
CLAUDE.md; 懸空的 symlink 也要問、不能當成不存在;使用者答「不要」就跳過 Phase 1,答「要」就拿連結目標判斷存不存在):- 存在 → 補充模式(加在哪、要不要升級,照 Phase 1 的判斷)
- 不存在 → 建立模式(現有專案先用 Agent 工具派(subagent_type:
Explore)分析技術棧與目錄結構,新專案用 AskUserQuestion 問專案類型/技術棧/名稱)
寫檔前:先看目標是不是 symlink
專案可能是 clone 來的,裡面事先放好的 symlink 會讓 Phase 1–3 的寫入落到專案外,或拆掉專案刻意建的連結
(例如 CLAUDE.md 指向 AGENTS.md)。下面每個「要檢查的路徑」,寫之前用 Bash 檢查兩件事:
[ -L <路徑> ] && echo 是 symlink || echo 不是 symlink:路徑本身是不是 symlink。懸空的 symlink(指向不存在的檔)也要抓到 ——[ -e ]與 Glob 都把它當成不存在,Phase 0 第 3 步就會走建立模式- 父目錄解析後還在專案裡:
(cd "$(dirname <路徑>)" && pwd -P)的輸出等於專案根目錄、或以「專案根目錄 +/」開頭。 括號不能省:主對話的 Bash 會把cd留到下一次呼叫,之後用相對路徑的指令就跑錯目錄。 專案根目錄在 git repo 裡是git rev-parse --show-toplevel,不在 git repo 裡(Phase 1、2 也支援空目錄的新專案)是專案根目錄的pwd -P
要檢查的路徑:
- Phase 1:
CLAUDE.md,建立、補充、各種升級都算,在 Phase 0 第 3 步判斷模式之前檢查。 升級的輸出檔CLAUDE.md.dd-upgrade由「用升級腳本升級」第 6 步在跑--apply之前先看(新版升級腳本自己也會擋:已經存在就 exit 6;舊版不會); 第 8 步的備份檔名帶秒級時間戳,不用檢查 - Phase 2:
.screenshots、.gitignore - Phase 3:husky v9 換成的
.husky/pre-commit;git 舊於 2.31 時的掛載點(見 Phase 3 第 2 步)。其他掛載點由 Phase 3 第 2 步檢查:git rev-parse --path-format=absolute --git-path印的是解析過 symlink 的路徑(解析靠的是--path-format=absolute;只寫--git-path印的是沒解析的相對路徑), 連結指到 repo 外時,印出來的路徑就在 repo 外(2026-11-14 git 2.42.0、2.39.5 實測:.git/hooks/pre-commit、core.hooksPath目錄、目錄裡的檔、懸空連結都是)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 15d ago Changed · +3 lines a3e151d5459c
- 18d ago Changed · +79 lines 232a3be29731
- 1mo ago Changed · -18 lines 4ccba44e613f
- 1mo ago Changed · +1 lines 960446ca8fd7
- 1mo ago Changed · +3 lines 61d87a4747af
- 1mo ago Changed · +4 lines 26bedc4498f2
- 1mo ago Changed · +18 lines 94812c943d3b
- 2mo ago Changed · +1 lines bc2fe1095e60
- 2mo ago Changed · +2 lines da778df09551
- 2mo ago First seen · 308 lines · 43 tokens per session scan B 2a585df04080
dd-init is a command published in the GitHub repository kopp0510/claude-dd (12 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 12,315 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
dd-init compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dd-initkopp0510/claude-dd | Command | 12 | 4d ago | MIT | B | 43 | Claude Code |
| speckit.spex.submitrhuss/cc-spex | Command | 122 | 5d ago | Apache-2.0 | A | 15 | Claude Code |
| gitazrtydxb/procoder | Command | 212 | today | Apache-2.0 | A | 20 | Claude Code |
| merge-conflict-analysisrjmurillo/ai-agents | Command | 50 | today | Apache-2.0 | A | 0 | GitHub Copilot |
| pr-riskkumaran-is/claude-code-onboarding | Command | 37 | 4d ago | MIT | A | 0 | Claude Code |
| repo-audittractorjuice/arc-kit | Command | 2.3k | today | none | A | 29 | Claude Code |
| advanced-code-review-contextaxiomantic/spellbook | Command | 13 | 3d ago | MIT | A | 19 | Claude Code |