template: Instructions file for Claude Code

CLAUDE.md

template CLAUDE.md is an instructions file for Claude Code from docxology/template. It costs 8,450 tokens per session, scanned B, original, Apache-2.0.

Guidance for a research-project template with test-driven development, automated PDF creation, and support for multiple projects. Test-driven development means writing tests as part of the process of building code.

In plain words
What is it for?
Use it to set up the project, run its research and PDF pipeline, follow its two-layer structure, run tests and checks, and troubleshoot common issues.
Why use it?
It tells contributors where to find instructions and which commands keep local work aligned with automated checks.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; positional $N argument; mentions Claude Code.

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/docxology/template/claude-md"><img src="https://agentmods.dev/badge/instructions/docxology/template/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,450 This file is loaded in full into every session.
When invoked 8,450 The same file — it is already loaded in full.
Security scan B 1 finding. 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.08450 $0.08450
Opus 5.5 $0.03380 $0.03380
Sonnet 5.5 $0.01690 $0.01690
Haiku 4.5 $0.00845 $0.00845

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

Security

Grade B, and why

template CLAUDE.md scanned grade B 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 2d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo tlmgr install multirow cleveref doi newunicodechar caption tools
CLAUDE.md · 652 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Overview

This is a research project template with a test-driven development workflow, automated PDF generation, and multi-project support. It uses a two-layer architecture separating generic infrastructure (Layer 1) from project-specific code (Layer 2), following a thin orchestrator pattern.

How this file fits with other entry points

File Use when you need
START_HERE.md The Step 0-5 cold-start path: prerequisites, clone, uv sync, pre-commit, first pipeline run, verify outputs
README.md First-time setup, documentation map, contributor links
This file (CLAUDE.md) Copy-paste commands, CI parity, common code patterns
AGENTS.md Full pipeline semantics, validation, configuration reference, troubleshooting index
.agents/AGENTS.md Shared agent behavior and generated catalogs
.github/AGENTS.md Exact CI job names, coverage thresholds, branch protection hints

Quick Reference

Task Command
Interactive menu ./run.sh
Reproducible run matrix (project × stage; preferred over the menu for repeatable subset runs) cp run.config.example.yaml run.config first (the CLI errors without one), then uv run python scripts/runner/run_matrix.py (reads run.config; --dry-run to preview, --fail-fast to stop on first failure; see run.config.example.yaml)
Secure workflow via main shell (secure subcommand) ./run.sh --secure-run
Full pipeline ./run.sh --pipeline
Core pipeline (no LLM) uv run python scripts/runner/execute_pipeline.py --project {name} --mode core
Incremental pipeline (opt-in stage skipping) uv run python scripts/runner/execute_pipeline.py --project {name} --incremental (also python -m infrastructure.orchestration pipeline --project {name} --incremental; default off)
Project pipeline tests uv run python scripts/pipeline/stage_01_test.py --project {name}
Full infrastructure gate uv run python scripts/pipeline/stage_01_test.py --infra-only --infra-scope full
Single test uv run pytest path/to/test.py::test_function -v
Install deps uv sync (root default-groups includes public-exemplars, covering all deterministic public-project dependencies; live research/publishing groups remain opt-in)
Editor Python .venv/bin/python after uv sync (see .vscode/settings.json)
Public CI source paths uv run python -m infrastructure.project.public_scope source-paths
Ruff (CI scope) uv run python -m infrastructure.project.public_scope lint-paths | xargs uv run ruff check --fix && uv run python -m infrastructure.project.public_scope lint-paths | xargs uv run ruff format
Mypy (CI scope) uv run python -m infrastructure.project.public_scope source-paths | xargs uv run mypy
Bandit (CI / security job) uv run bandit -c bandit.yaml -r -ll infrastructure/ scripts/ projects/ (exclusions in bandit.yaml → exclude_dirs)
Pre-commit (lint stage) pre-commit run --all-files
Pre-push hooks pre-commit run --hook-stage pre-push --all-files
Local CI reproduction (act + fallback) ./scripts/shell/ci_local.sh (added 2026-05-20; see docs/maintenance/ci-local.md)
Executable bundle (opt-in stage; see pipeline table) uv run python scripts/runner/bundle_executable.py --project {name}
Archive publication dry-run (opt-in stage; see pipeline table) uv run python scripts/runner/archive_publication.py --project {name}
Archive publication real deposit uv run python scripts/runner/archive_publication.py --project {name} --providers zenodo software_heritage ipfs_pinata --commit (requires credentials — see docs/maintenance/archival-targets.md)
Publication runbook (standalone GitHub + real Zenodo DOI + optional mirrors) docs/guides/publication-runbook.md
Unified project release (GitHub + Zenodo + DOI) uv run python scripts/publish/publish_project_release.py --project {name} --tag v1.0.0 --repo owner/repo (opt-in; see docs/guides/publication-runbook.md)
Reproduction bundle (single / all public exemplars) uv run python scripts/runner/repro_bundle.py build {name} or ... build --all-public --out output/repro_bundles (verify with ... verify <manifest>)
Regression tests (claim-binding tier) uv run pytest tests/regression/ -v (claim-binding tier plus a public-roster pin; collected totals in docs/_generated/COUNTS.md, rationale in docs/maintenance/regression-testing.md)
Repo-wide doc linter uv run python scripts/audit/lint_docs.py
Exemplar drift checker uv run python scripts/audit/check_template_drift.py (add --strict to fail on warnings, including hardcoded doc counts)
Re-measure exemplar coverage (slow; runs every suite) uv run python scripts/docgen/counts.py --verify-coverage; refresh with --write --coverage-snapshot-output <retained-data-copy> using an independent byte-for-byte copy of the selected SDK's counts_coverage.py outside the repo and SDK. Preserve the original; review/apply only the measured literal delta after original terminal Source/Code/wheel closure, rebuild the SDK, then run --refresh-coverage-provenance --write.
Module line count gate uv run python scripts/gates/module_line_count_check.py
CodeGraph local commands uv run python scripts/maintenance/codegraph_local.py commands . (optional; see docs/guides/codegraph-local.md)
LEANN local semantic retrieval Optional user-level companion only; see docs/guides/leann-local.md
Unified health CLI uv run python -m infrastructure.core.health (optional --gates=module-line-count)
Release-readiness dashboard (no network) uv run python -m infrastructure.reporting.release_readiness --out output/release_readiness.md (add --format html; aggregates version/coverage/pipeline/docs-lint/evidence-graph from local artifacts only)
Opt-in security scan uv run python scripts/gates/security_scan.py (not default pipeline/CI; missing tools report skipped, not clean)
Deep research dispatch (opt-in, PAID, separate from any subscription — ≈$2/report OpenAI, ≈$3–7 typical Gemini (up to ~$15 on a full manuscript)) uv sync --group deep-research (installs SDKs + python-dotenv), keys in .env, then uv run python -m infrastructure.search.deep_research providers|submit|poll|run-project — full manuscripts are packaged in full; cost model + multi-project loop recipe in infrastructure/search/deep_research/README.md; never default pipeline/CI

Read the full file on GitHub · 652 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. 2d ago Changed · -2 tokens per session 8e39eb97c9be
  2. 10d ago Changed · -1 lines · -9 tokens per session 941ea9e9e504
  3. 13d ago Changed · +94 tokens per session 2b8a0ff07710
  4. 1mo ago Changed · +3 lines · +51 tokens per session e59b1158666d
  5. 1mo ago Changed · +9 lines · +159 tokens per session ba3abea0382f
  6. 1mo ago Changed · +4 lines · +70 tokens per session bf3efad16947
  7. 1mo ago Changed · +4 tokens per session 5e013a761887
  8. 1mo ago First seen · 637 lines · 8,083 tokens per session scan B 91bede6adfec

Subscribe to this mod's changes

template CLAUDE.md is an instructions file published in the GitHub repository docxology/template (20 stars, last pushed today), licensed Apache-2.0. It adds 8,450 tokens to every session, about $0.0338 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). 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

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,581 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,731 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 · 4,261 tokens