claude-setup CLAUDE.md

claude-setup CLAUDE.md is an instructions file for coding agents from stuartshields/claude-setup. It costs 807 tokens per session, scanned A, original, MIT.

A set of project instructions for Claude Code, an AI coding assistant. It defines shortcuts, required workflows, project setup, and how the assistant should route tasks.

In plain words
What is it for?
It helps initialize projects, guide debugging audits, preserve important work across interrupted sessions, and keep project conventions documented.
Why use it?
It gives the assistant consistent rules to follow, including checking project instructions and verifying changes with build, test, or lint commands.

Instructions file

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 instructions/stuartshields/claude-setup/claude-md
Clone the repo
git clone --depth 1 https://github.com/stuartshields/claude-setup

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 claude-setup CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/stuartshields/claude-setup/claude-md.svg)](https://agentmods.dev/instructions/stuartshields/claude-setup/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/stuartshields/claude-setup/claude-md"><img src="https://agentmods.dev/badge/instructions/stuartshields/claude-setup/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 807 This file is loaded in full into every session.
When invoked 807 The same file — it is already loaded in full.
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 $0.00807 $0.00807
Opus 5 $0.00404 $0.00404
Sonnet 5 $0.00161 $0.00161
Haiku 4.5 $0.00081 $0.00081

Measured 3d ago against content hash cff4ce8c65da, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

claude-setup 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 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.

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

How it starts

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

GLOBAL PROTOCOL (v2026.2)

0. SHORTCUTS & TRIGGERS

  • Bootstrap Trigger: If the current directory lacks a CLAUDE.md, immediately perform DYNAMIC PROJECT INITIALIZATION.
  • "Trace" or "/trace": Perform a deep-trace audit per the debugging skill (~/.claude/skills/debugging/SKILL.md).

1. MANDATORY WORKFLOW

  • Verify: After implementing, run the project's build/test/lint command. If it fails, diagnose and fix before moving on. Never mark work as done without verifying it runs.
  • On Compaction: Always preserve in the summary: all modified file paths, the current task and acceptance criteria, test commands and results, key decisions and reasoning.
  • CLAUDE.md is the Source of Truth: Before making changes, read the project's CLAUDE.md. If your changes diverge from what it specifies, ask the user: "This differs from the project CLAUDE.md - should I update it first?" Update CLAUDE.md early - when you discover a new convention, make an architecture decision, or establish a pattern, propose the update immediately. Do not wait until the end of the task. Sessions can crash, compact, or be interrupted - anything not written to CLAUDE.md is lost.

2. DYNAMIC PROJECT INITIALIZATION / MIGRATION

  • Condition: No local CLAUDE.md:
    1. Scan configs (package.json, requirements.txt, etc.).
    2. Identify stack & commands (build/test/lint).
    3. If Node project: ensure .nvmrc pins 22 and package.json has "engines": { "node": ">=22" }. Run nvm use 22 before any install/dev command. Honour an existing pin and surface divergence — see rules/environment.md "Node Version".
    4. Create local CLAUDE.md with project-specific conventions. Code-quality expectations (DRY, single responsibility, no defensive scaffolding, no commented-out code, named constants) live in ~/.claude/rules/code-quality.md and apply across all projects.
  • Condition: Local CLAUDE.md exists but is legacy:
    1. Strip redundant rules (global rules in ~/.claude/rules/ are auto-loaded).
    2. Keep only project-specific conventions.
    3. Standardize indents to Tabs.

Read the full file on GitHub · 36 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 · 36 lines · 807 tokens per session scan A cff4ce8c65da

Subscribe to this mod's changes

claude-setup CLAUDE.md is an instructions file published in the GitHub repository stuartshields/claude-setup (2 stars, last pushed 3mo ago), licensed MIT. It adds 807 tokens to every session, about $0.0040 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-31.