hedgehog: Instructions file for Claude Code

CLAUDE.md

hedgehog CLAUDE.md is an instructions file for Claude Code from skyf0xx/hedgehog. It costs 4,309 tokens per session, scanned A, original, MIT.

Repository instructions for Hedgehog, a build process and toolkit for AI-guided software projects.

In plain words
What is it for?
Use them when developing Hedgehog itself, releasing its packages, or initializing one of its project setups in another codebase.
Why use it?
They give an AI coding agent the project structure, available project types, and rules for building or changing the toolkit safely.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is skyf0xx/hedgehog's own configuration. It tells Claude Code how to work on hedgehog itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything hedgehog configures →

Reuse

Borrowing it

Nothing to install: this file belongs to skyf0xx/hedgehog. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/skyf0xx/hedgehog/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/skyf0xx/hedgehog

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 hedgehog CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/skyf0xx/hedgehog/claude-md/github.svg)](https://agentmods.dev/instructions/skyf0xx/hedgehog/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/skyf0xx/hedgehog/claude-md"><img src="https://agentmods.dev/badge/instructions/skyf0xx/hedgehog/claude-md/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 hedgehog CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/skyf0xx/hedgehog/claude-md"><img src="https://agentmods.dev/badge/instructions/skyf0xx/hedgehog/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,309 This file is loaded in full into every session.
When invoked 4,309 The same file — it is already loaded in full.
Security scan A 0 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.04309 $0.04309
Opus 5 $0.02155 $0.02155
Sonnet 5 $0.00862 $0.00862
Haiku 4.5 $0.00431 $0.00431

Measured 4d ago against content hash 6003bc7015dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

hedgehog CLAUDE.md 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 4d 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.md · 281 lines

How it starts

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

Hedgehog (this repo)

Hedgehog is a build discipline for AI-guided software projects. This repo holds the discipline itself as a package of Claude Code agents and skills — the executable payload a consuming project copies in to work Hedgehog-style, and is the source of the method. See README.md for the discipline's stance and rationale.

This repo is the engine: the CLI, the build graph, the host adapters, the core registry, and the agents and skills every core shares. Each core — full-stack-app, pwa-app, landing-page, copywriting, deepseek-harness, authored (a from-scratch design), and adopted (brownfield adoption) — ships as its own npm package holding that core's workspace, agents, skills, and CLAUDE.md section. src/registry/cores.json names them; init fetches the one a project asks for.

Layout

  • src/agents/ — the subagent roles every core shares, copied into a consuming project's own .claude/agents/: planner (planning intake, core selection, module scoping), bootstrap (Bootstrap step sequencing), reviewer (phase and layer transition checks, Correction Protocol review), and tweaker (change requests on a project with nothing in flight, sized through hedgehog-daily, and friction-log-driven Hedgehog issue suggestions). A core's own build agents ship in that core's package and install alongside these.
  • src/skills/ — the packaged procedures every core shares, copied into a consuming project's own .claude/skills/. A core's own loop, bootstrap, and reference skills ship in that core's package and install alongside these.
    • hedgehog-planning-intake — runs the vendored BMAD-METHOD planning shelf (vendor-skills/BMAD/), shared by every core, and mines its output into scope boundary, domain modules, and the Add-ons decision on full-stack-app. Invoked by planner; landing-page runs this skill's shelf too, then mines the same archive through hedgehog-landing-loop's own planning-intake section instead.
    • hedgehog-daily — the shared triage gate for a change request on a project that already has a build graph and nothing in flight. Reads the installed core's layer sequence, scope globs and verify commands from .hedgehog/core.yaml and routes to one of three exits: a tweak made and committed on the spot (one layer, existing files, and the default under ambiguity), change-work through hedgehog intent add and the core's own loop, or a re-plan. tweaker runs it for job 1's sizing call.
    • conventional-commits — reconstructs step-shaped, conventional commit history when work didn't land cleanly as it went (mainly Correction Protocol cleanups).
    • no-history-in-output — keeps project-facing documents (root CLAUDE.md, .hedgehog/core-design.md, specs, READMEs) written as a current, as-is snapshot rather than a log of edits or decisions, on first generation and every later revision.
    • hedgehog-contributing — forking, branching, and PR-opening procedure for contributing a fix or ROADMAP.md item back to the Hedgehog project itself, as opposed to a consuming project's own code.
    • pr-writing — writing style (brief, info-dense, Simplified Technical English, only verified claims) and the pre-open checklist (CI passing, one change per PR) for a PR, commit message, or review comment in any repo. hedgehog-contributing uses it for Hedgehog's own PRs.
    • filing-issues — the mechanics of getting planned work into GitHub issues: which repo an issue belongs in, when to split a plan into a tracking issue plus sub-issues, which account files it, labels, and acceptance criteria. Defers to pr-writing for how an issue is worded.
  • src/registry/ — the core table and the fetcher that acts on it. cores.json names every core, the npm package that ships it, its version range, its install flag (absent on authored and adopted, which are chosen during planning rather than at install time), and the prose planner reads in Phase 0 to pick one; index.mjs loads and resolves it by name or flag. manifest.mjs owns the shape of the hedgehog-core.yaml every core package carries at its root — which agents, skills, vendored shelves, workspace, and CLAUDE.md section that core contributes. fetch.mjs resolves a core package with npm pack, extracts it, and caches the extraction at ~/.hedgehog/cores/<name>/<version>/ so a repeat install needs no network; installed.mjs records which core a project installed, so update refreshes that core's agents and skills from the same package.
  • vendor-skills/BMAD/ — BMAD-METHOD (bmad-code-org/BMAD-METHOD, MIT-licensed), vendored in full: the planning shelf hedgehog-planning-intake runs. See vendor-skills/BMAD/ATTRIBUTION.md for the pinned source commit; re-vendoring is a deliberate act via the bmad-revendor skill, not automatic.
  • src/templates/ — files a consuming project copies (and then edits or deletes) rather than running as-is: CLAUDE.md, the project-root guide the installer drops in (project-context placeholders the planner fills at planning intake, plus the Hedgehog constants — stack, layout, rules, skill/agent pointers, and context-management guidance). Each core package's own CLAUDE.core.md fills that shell's {{CORE_SECTION}} — at install time when init names a core, or by the matching bootstrap-core skill when init ran naming none and the shell landed with that placeholder still unfilled. {{HOST_DISPATCH}} is filled at install time from the chosen host's DISPATCH.md.
  • src/db/ — the SQLite build graph a consuming project's Bootstrap initializes at .hedgehog/hedgehog.db: schema, intents/tasks, plan (compiles intents into the task graph), next/ready/status/claim (what to work on and lease it), verify/gate (close a layer, check a phase transition), friction, debt, decision (inherited context for dependent tasks — a limitation or a design choice, respectively), drift, boundary, why, overrides, reconcile (absorbs work that landed outside the loop, on the user's per-task confirmation, recorded in committed .hedgehog/reconciled/*.json so db rebuild replays it), conflict, commitLock, core, rebuild, graph-server (serves src/templates/graph.html's visualization), and community (the star prompt raised at the first completed intent). Schema changes are versioned: schema.mjs's runMigrations tracks a graph's PRAGMA user_version against CURRENT_SCHEMA_VERSION, applying only the migrations it hasn't seen yet on every writable open, and failing loudly if the graph is newer than this installed CLI knows about; hedgehog db migrate runs the same check on demand and reports what moved. This is the live source of truth every loop skill and its agents query and mutate for what's next and what's done.
  • bin/cli.mjs — the hedgehog CLI installed by npx @skyf0xx/hedgehog: init (installer), core record-adopted (lands the adopted core's agents/skills and records them for hedgehog-adopt, which has no init step of its own to call from), and the subcommands (status, next, verify, claim, intent add, plan, friction add/list, …) that read and write src/db/'s build graph.
  • src/hosts/ — one entry per coding agent Hedgehog installs into (Claude Code, Cursor, Gemini CLI): where the payload lands, which instructions file that agent loads, and how to emit the agent files when its format differs from the canonical one. capabilities.mjs owns the agent → tool-grant fact for hosts that can't register a per-agent grant; routing.mjs generates the root AGENTS.md index from the agents' and skills' own frontmatter; claude-md-merge.mjs safely merges a core's CLAUDE.md section into a repo's hand-written root instructions file (adoption case). version.mjs owns payload-staleness detection: init and update stamp the version they wrote into .hedgehog/version.json, and that stamp is compared against the newest published release. See ARCHITECTURE.md for the host table and AUTHORING-CORES.md for the package contract a new core must satisfy.

Read the full file on GitHub · 281 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. 4d ago Changed · -19 lines · -369 tokens per session 6003bc7015dc
  2. 9d ago First seen · 300 lines · 4,678 tokens per session scan A 0f760abf57fb

Subscribe to this mod's changes

hedgehog CLAUDE.md is an instructions file published in the GitHub repository skyf0xx/hedgehog (38 stars, last pushed today), licensed MIT. It adds 4,309 tokens to every session, about $0.0215 per session on Opus 5. 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-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,737 tokens