dd-init

dd-init is a command for Claude Code from kopp0510/claude-dd. It costs 43 tokens per session (12,315 once invoked), scanned B, original, MIT.

A project-initialization command that sets up a seven-step development loop in CLAUDE.md, the project's instructions file, and prepares related checks and screenshot storage.

In plain words
What is it for?
Use it to inspect a project, identify how it should be verified, add or update its development-loop instructions, create a .screenshots directory, and check nested project instructions.
Why use it?
It helps establish consistent development and verification practices in a new or existing project, based on the detected technology and project type.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit Use it to inspect a project, identify how it should be verified, add or update its development-loop instructions, create a .screenshots directory, and check nested project instructions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kopp0510/claude-dd/dd-init
Install

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.

Clone the repo
git clone --depth 1 https://github.com/kopp0510/claude-dd

Made for: Claude Code.

Wrote 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.

agentmods badge for dd-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/kopp0510/claude-dd/dd-init/github.svg)](https://agentmods.dev/commands/kopp0510/claude-dd/dd-init)
Your own site
<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.

agentmods 80×15 button for dd-init

Your own site · 80×15
<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>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 12,315 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 15d ago against content hash a3e151d5459c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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**
commands/dd-init.md · 401 lines

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: 專案偵測

  1. 掃描目錄內容,用 Glob 檢查專案類型指標:

    • package.json → Node.js、go.mod → Go、pyproject.toml/requirements.txt → Python
    • Cargo.toml → Rust、pom.xml/build.gradle → Java、composer.json → PHP、Gemfile → Ruby
    • 前端框架:偵測 next.config.*、vite.config.*、src/App.* 等
  2. 判斷驗證方式(填入迴圈步驟 5 的具體指令):

    • 有 HTTP API(後端/全端)→ 驗證含 curl 打真實 API
    • 有前端 UI → 驗證含 playwright 開真實瀏覽器(截圖存 .screenshots/)
    • 純 CLI / 函式庫 → 驗證退化為「跑真實指令 / 消費端範例」
    • 根目錄或第一層子目錄的 package.json,其 dependencies 或 devDependencies 有 react;新專案則是使用者回答用 React → React 專案(Phase 1 要加 React 那段)
  3. 檢查 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 目錄、目錄裡的檔、懸空連結都是)

Read the full file on GitHub · 401 lines

Changes

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.

  1. 15d ago Changed · +3 lines a3e151d5459c
  2. 18d ago Changed · +79 lines 232a3be29731
  3. 1mo ago Changed · -18 lines 4ccba44e613f
  4. 1mo ago Changed · +1 lines 960446ca8fd7
  5. 1mo ago Changed · +3 lines 61d87a4747af
  6. 1mo ago Changed · +4 lines 26bedc4498f2
  7. 1mo ago Changed · +18 lines 94812c943d3b
  8. 2mo ago Changed · +1 lines bc2fe1095e60
  9. 2mo ago Changed · +2 lines da778df09551
  10. 2mo ago First seen · 308 lines · 43 tokens per session scan B 2a585df04080

Subscribe to this mod's changes

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.

Related

dd-init compared with commands from other repositories

dd-init next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dd-initkopp0510/claude-ddCommand124d agoMITB43Claude Code
speckit.spex.submitrhuss/cc-spexCommand1225d agoApache-2.0A15Claude Code
gitazrtydxb/procoderCommand212todayApache-2.0A20Claude Code
merge-conflict-analysisrjmurillo/ai-agentsCommand50todayApache-2.0A0GitHub Copilot
pr-riskkumaran-is/claude-code-onboardingCommand374d agoMITA0Claude Code
repo-audittractorjuice/arc-kitCommand2.3ktodaynoneA29Claude Code
advanced-code-review-contextaxiomantic/spellbookCommand133d agoMITA19Claude Code