code-ai-template: Instructions file for Claude Code

CLAUDE.md

code-ai-template CLAUDE.md is an instructions file for Claude Code from FHDumont/code-ai-template. It costs 1,470 tokens per session, scanned A, original, MIT.

A project guide that treats repeatable development rituals as reusable instructions called skills. It describes planning a phase, closing a phase, checking reference repositories, and questioning decisions before writing a specification.

In plain words
What is it for?
Use it to plan a development phase, audit and specify changes, verify external references, review completion criteria, prepare documentation, or challenge an uncertain design.
Why use it?
It gives agents a consistent process for planning, reviewing, documenting, and finishing work. This reduces forgotten checks and keeps project decisions recorded for later work.

Instructions file for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the ExitPlanMode tool.

This is FHDumont/code-ai-template's own configuration. It tells Claude Code how to work on code-ai-template 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 code-ai-template configures →

Reuse

Borrowing it

Nothing to install: this file belongs to FHDumont/code-ai-template. 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/FHDumont/code-ai-template/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/FHDumont/code-ai-template

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 code-ai-template CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/fhdumont/code-ai-template/claude-md"><img src="https://agentmods.dev/badge/instructions/fhdumont/code-ai-template/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,470 This file is loaded in full into every session.
When invoked 1,470 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.01470 $0.01470
Opus 5.5 $0.00588 $0.00588
Sonnet 5.5 $0.00294 $0.00294
Haiku 4.5 $0.00147 $0.00147

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

Security

Grade A, and why

code-ai-template 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 5d 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 · 35 lines

How it starts

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

CLAUDE.md

AGENTS.md é a instrução canônica e a fonte única do método — leia primeiro, tudo lá vale aqui. Este arquivo só mapeia a mecânica do loop pros botões do Claude Code.

Os rituais são skills

Os três momentos do loop têm skill própria em .claude/skills/ — é a forma preferida de acioná-los, porque a ordem dos passos já vem dentro:

Skill Quando O que faz
/planejar-fase abrindo o plan mode inbox de achados → docs vivos quentes → auditoria do código → grilling → spec em docs/SETUP.md
/fechar-fase fim da fase em code mode critérios → revisão de contexto fresco → passada de docs → PR/merge/limpeza, sem pausa — falha ainda para
/verificar-referencia de tempos em tempos novidades dos repos de docs/reference/referencias.md → issues achado → SHA avançado

A quarta, grilling, é a primitiva model-invoked por trás do /planejar-fase — interroga o dono em rodadas até a fronteira de decisões esvaziar. Chame direto quando quiser estressar um raciocínio fora do ritual.

Mecânica no Claude Code

  • Plan mode = a passada de raciocínio. Nele você audita o código, discute o aberto e redige a spec no formato de templates/spec-fase.md. docs/SETUP.md continua sendo o plano canônico (AGENTS.md); a mecânica do Claude Code é que o plan mode não grava arquivos do repo, então a spec nasce no arquivo de plano da ferramenta e ExitPlanMode (aprovação do plano) = aprovação da spec. Aprovada, o último ato do plan mode é copiá-la, sem alteração, pro docs/SETUP.md — junto com os demais destinos da triagem (linhas do ROADMAP.md, item de DEBITO-TECNICO.md), tudo não commitado: o commit é da execução. Copiar não é tarefa do code mode porque a fase pode ser executada por outro agente (Cursor, Codex…), que não lê o arquivo de plano do Claude Code. O arquivo de plano é rascunho e não versiona. Não planeje o trivial: o passo zero do grilling decide se a fase é correção (zero ou uma rodada) ou modelagem (rodadas).
  • /clear entre os modos (não /compact): aprovada a spec e gravada no docs/SETUP.md pelo plan mode, o dono limpa o contexto e a execução roda numa sessão nova: lê só o SETUP.md. Copiar a spec não é do code mode (bullet acima).
  • Inbox de achados no início do plan mode: gh issue list --label achado --state open antes de auditar o código. Triagem e fecho de issue seguem AGENTS.md §Inbox de achados.
  • Subagentes = Task. Os definidos em .claude/agents/: varredura (coordenadas arquivo:linha, modelo leve) e revisor-fecho (a revisão de fecho de contexto fresco). A revisão de fecho (AGENTS.md §O loop) e a etapa marcada delegar a subagente na spec rodam via Task. O código delegado volta pro working tree da sessão principal e segue o fluxo normal — diff revisado, critérios, commit por etapa. Delegar não é pular revisão.
  • Fecho da fase pela CLI gh. A sequência inteira — critérios, revisão, docs, PR, merge, limpeza — está em AGENTS.md §Git, e o /fechar-fase a executa na ordem. O dono não toca no GitHub.
  • Git destrutivo é bloqueado por hook. .claude/hooks/block-dangerous-git.sh, registrado como PreToolUse/Bash em .claude/settings.json, barra push --force, reset --hard, clean -f, branch -D e commit com o branch atual em main — as regras de AGENTS.md §Git viradas guardrail duro. A mensagem do bloqueio traz a rota certa; siga por ela ou peça ao dono, sem contornar o hook. block-comandos-do-dono.sh faz o mesmo com os comandos que só o dono roda (git add cego, mais os do projeto). Cada hook tem seu .test.sh ao lado.
  • Prompts curtos: o dono aciona fases com instruções curtas (ex.: "planeja a próxima fase", "executa a fase do SETUP") ou pela skill do ritual. O contexto vem dos docs vivos, não do prompt.

Read the full file on GitHub · 35 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. 5d ago Changed · +217 tokens per session ac2cf09455ec
  2. 1mo ago Changed · +126 tokens per session 29ad3920517d
  3. 2mo ago First seen · 35 lines · 1,127 tokens per session scan A 16adffe58ebf

Subscribe to this mod's changes

code-ai-template CLAUDE.md is an instructions file published in the GitHub repository FHDumont/code-ai-template (2 stars, last pushed 5d ago), licensed MIT. It adds 1,470 tokens to every session, about $0.0059 per session on Opus 5.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-31.

Related

Other instructions, from other repositories

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 · 9,715 tokens

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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens