dd-init

dd-init is a command for coding agents from kopp0510/claude-dd. It costs 43 tokens per session (2,510 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

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.

agentmods
npx agentmods add commands/kopp0510/claude-dd/dd-init
Clone the repo
git clone --depth 1 https://github.com/kopp0510/claude-dd

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.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.svg" alt="Measured on agentmods" 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 2,510 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
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 $0.00043 $0.02510
Opus 5 $0.00022 $0.01255
Sonnet 5 $0.00009 $0.00502
Haiku 4.5 $0.00004 $0.00251

Measured 3d ago against content hash b10716fe99ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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.

1. 檢查 `claude-md-management` plugin 是否已啟用(讀 `~/.claude/settings.json` 的

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 · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DD 初始化 — 7 步開發迴圈

初始化專案的開發慣例:蓋章「7 步開發迴圈」到專案 CLAUDE.md、建立截圖目錄、 確認巢狀 CLAUDE.md 維護依賴。支援新專案(空目錄)和現有專案(已有程式碼)。

2026-07 重整:原多階段 DD Pipeline(dd-start/arch/approve/dev/test)已封存、 2026-08-04 刪除(見 git 歷史)。本指令改為部署經實際專案實戰驗證的輕量開發迴圈。


執行步驟

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 / 函式庫 → 驗證退化為「跑真實指令 / 消費端範例」
  3. 檢查 CLAUDE.md 是否存在

    • 存在 → 補充模式(在末尾加區塊)
    • 不存在 → 建立模式(現有專案先派 Task(subagent_type: Explore)分析技術棧與目錄結構,新專案用 AskUserQuestion 問專案類型/技術棧/名稱)

Phase 1: 蓋章開發迴圈到專案 CLAUDE.md

  • 建立模式:用 Write 寫入下方區塊
  • 補充模式(CLAUDE.md 已存在):
    • ## 開發流程 區塊 → 用 Edit 在末尾加入
    • 已含區塊 → 版本檢查
      • dd-loop-version: 6step 標記 → 已是現行版,跳過並告知
      • 無標記或缺 code-review 步驟 → 舊版/手寫版:列出與現行版的差異, AskUserQuestion 詢問是否升級。同意 → 升級為現行版但保留在地內容 (專案特有註記、具體驗證指令、額外規則行),補上版本標記;拒絕 → 保留原樣

依 Phase 0 偵測結果填入具體驗證指令,不留模板變數:

## 開發流程(每個功能段落依序走)
<!-- dd-loop-version: 6step;供 /dd-init 判斷是否提議升級,勿刪 -->

1. **實作功能 + 首輪測試通過**(相關既有測試跑綠 + 基本手動驗證,不可帶紅燈進 commit)
2. **commit**(第一次 — 保留簡化前還原點)
3. 跑 **code-simplifier**(對該段新增/修改的程式碼,官方 agent)
4. 跑 **code-review**(該段 diff,每段全量跑;修掉 Critical/Important 才續行)
5. **再測一次** — 確認步驟 3、4 沒破壞行為,不可只跑單元測試:
   - 重跑步驟 1 的相關測試
   - <依偵測結果填入:curl 打真實 API 驗證後端邏輯(登入/CRUD/權限…)>
   - <依偵測結果填入:playwright 真的開瀏覽器登入、操作 UI、截圖驗證前端可用>
     - 截圖一律存 `.screenshots/`(已 gitignore);勿丟專案根目錄
6. **再 commit**(最終版本)
7. **沉澱本輪學到的**(有才做)— 本輪若留下踩雷、指令或慣例,用
   claude-md-management plugin 的 /revise-claude-md 寫進 CLAUDE.md;
   它會先列出建議、等你同意才寫檔。沒有值得留的就跳過

驗證不過 → 修完重跑步驟 5,不可帶著紅燈進步驟 6。

## CLAUDE.md 維護

- 每個有程式碼的資料夾都要有 CLAUDE.md(說明該層職責與慣例)
- 功能落地後,受影響目錄的 CLAUDE.md 逐層堆疊更新(程式碼改了 → 文件跟著改,pre-commit gate 會擋)
- 步驟 7 處理的是「本輪學到什麼」,與上一條的「程式碼改了所以文件要同步」是兩件事;
  它是唯一可跳過、也是唯一會回問你的步驟

Read the full file on GitHub · 156 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. 3d ago First seen · 156 lines · 43 tokens per session scan B b10716fe99ee

Subscribe to this mod's changes

dd-init is a command published in the GitHub repository kopp0510/claude-dd (6 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 2,510 once invoked, about $0.0002 per session on Opus 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.