init

A project setup guide for Draft, a system that keeps structured knowledge about a codebase and its development work. It creates project context such as product information, technology choices, workflows, and a map of how the code is organised.

In plain words
What is it for?
Use it to initialise Draft at a repository root or inside a module, analyse an existing project, and create its initial context files and code graph.
Why use it?
It gives later planning and coding tasks a shared view of the repository instead of making them rediscover the project each time. It also helps document existing codebases before new work begins.

Skill for Claude CodeCodex

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 skills/drafthq/draft/init
Any agent
npx skills add drafthq/draft --skill init
Clone the repo
git clone --depth 1 https://github.com/drafthq/draft

Made for: Claude Code, Codex.

Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 23,802 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00151 $0.23802
Opus 5 $0.00076 $0.11901
Sonnet 5 $0.00030 $0.04760
Haiku 4.5 $0.00015 $0.02380

Measured yesterday against content hash 5008bac665c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

init scanned grade C with 1 finding 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

3. **On failure**: `rm -rf draft.tmp/` — no half-initialized state left behind
skills/init/SKILL.md · 1,966 lines

How it starts

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

Draft Init

Initialize a Draft project for Context-Driven Development.

Red Flags - STOP if you're

  • Re-initializing a project that already has draft/ without using refresh mode
  • Skipping brownfield analysis for an existing codebase
  • Rushing through product definition questions without probing for detail
  • Auto-generating tech-stack.md without verifying detected dependencies
  • Not presenting .ai-context.md for developer review before proceeding
  • Overwriting existing tracks.md (this destroys track history)
  • Producing copy-paste module descriptions — if 3+ modules share identical Responsibilities or description text, you have NOT analyzed the source files
  • Writing sequence diagrams under 15 lines of Mermaid code — shallow diagrams without alt/opt blocks, payloads, and error paths are useless
  • Writing module deep-dives that ignore the graph or lack a workflow/state diagram — the graph is ground truth; every significant module must have at least one synthesized diagram showing its primary flow or lifecycle. Prose volume without diagram fidelity is a failure.
  • Using "See X/" or "follow BUILD patterns" as a substitute for reading actual source files and documenting real content
  • Ignoring detected high-quality existing agent context (e.g. CLAUDE.md + docs/INVARIANTS.md written explicitly for AI agents) and regenerating large volumes of duplicative prose instead of a graph-primary overlay with strong cross-references and explicit Relationship section — this creates documentation debt and divergence risk in mature brownfield systems
  • Retaining any legacy 28-section or volume-oriented language in generated architecture.md or in the reasoning process — the modern 10-section graph-primary template is the only accepted format.

Initialize once, refresh to update. Never overwrite without confirmation.


MANDATORY SECTION CHECKLIST — architecture.md (Graph-Primary)

READ THIS BEFORE WRITING A SINGLE LINE OF architecture.md. The document MUST use the EXACT modern graph-primary structure below. Freeform sections, renamed headings, or missing mandatory sections are FAILURES. This is the single forward-looking format — no legacy 28-section or volume-oriented material is accepted.

Read the full file on GitHub · 1,966 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 1,966 lines · 151 tokens per session scan C 5008bac665c6

Subscribe to this mod's changes

init is a skill published in the GitHub repository drafthq/draft (40 stars, last pushed 13d ago), licensed MIT. It adds 151 tokens to every session and 23,802 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.