cdd-retrofit

cdd-retrofit is a command for Claude Code from drabaioli/cdd. It costs 0 tokens per session (4,094 once invoked), scanned A, original, MIT.

A command for adding or updating CDD in an existing project. CDD is a project workflow whose meaning is not explained by the supplied information.

In plain words
What is it for?
Use it from a CDD repository with a target project path to install CDD or upgrade an existing CDD setup.
Why use it?
It helps apply the workflow to another project while checking the target and asking before changing existing files.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is ./tools/bootstrap-cdd-project.sh --stage \.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 cdd-retrofit

README.md
[![agentmods](https://agentmods.dev/badge/commands/drabaioli/cdd/cdd-retrofit.svg)](https://agentmods.dev/commands/drabaioli/cdd/cdd-retrofit)
Your own site
<a href="https://agentmods.dev/commands/drabaioli/cdd/cdd-retrofit"><img src="https://agentmods.dev/badge/commands/drabaioli/cdd/cdd-retrofit.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,094 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.1 $0.00000 $0.04094
Opus 5 $0.00000 $0.02047
Sonnet 5 $0.00000 $0.00819
Haiku 4.5 $0.00000 $0.00409

Measured 6d ago against content hash f2cfd72edf37, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

cdd-retrofit scanned grade A with 0 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/cdd-retrofit.md · 209 lines

How it starts

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

Install CDD into an existing project, or upgrade a project already running CDD, at the path given as argument: /cdd-retrofit <target-path>.

Run this command from a CDD-repo session (it needs the CDD repo's template/, bootstrap-cdd-project.sh, and git history). The mode — install or upgrade — is auto-detected from the target. This command exists only in the CDD repo; it deliberately has no counterpart in template/.claude/commands/ (it operates on target projects, so downstream projects have no use for it — see the process doc, Section 2.7).

Checkpoint discipline: every write that touches a pre-existing file in the target is approved per file by the user. Never overwrite a project file silently. Identifier choices (name/slug/dir) are confirmed before anything is rendered.

Target path: $ARGUMENTS

1. Resolve and validate the target

Resolve the argument to an absolute path. It must exist and be a directory; otherwise stop and report.

Check the target's git state:

git -C <target> rev-parse --is-inside-work-tree 2>/dev/null
git -C <target> status --porcelain 2>/dev/null
  • If the target is not a git repo, warn the user (retrofit changes won't be revertable via git, and the isolated-worktree step in section 2.5 won't run) and ask whether to proceed.
  • A dirty working tree no longer blocks the retrofit: section 2.5 writes into a fresh worktree branched from HEAD, so the target's current checkout is untouched. Do not hard-stop on a dirty tree. There is one nuance to warn about: because the worktree is taken from HEAD, any uncommitted local edits to CDD-managed files (the set listed in section 4.4) are invisible to the upgrade comparison. If git status --porcelain shows uncommitted changes to those files, tell the user to commit them first or they won't be considered, then let them decide whether to proceed.

Also note <target>/.gitignore: if any path the retrofit will write (.claude/, doc/, tools/) is gitignored, warn that those writes will not show in git status (and won't be staged by the retrofit commit in sections 3.4 / 4.6), and include this in the final summary.

Read the full file on GitHub · 209 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. 6d ago First seen · 209 lines · 0 tokens per session scan A f2cfd72edf37

Subscribe to this mod's changes

cdd-retrofit is a command published in the GitHub repository drabaioli/cdd (2 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,094 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.