agentleFS
wilstowilsto/claude-code-starter-kit/CLAUDE.md

claude-code-starter-kit

CLAUDE.md0 starsChanged 8 months agoMITView on GitHub

{{PROJECT_DESCRIPTION}} Rules are split into files for sync between template and global config: Run /sync-global to synchronize rules between this template and global config. Every .claude/skills/<name>/SKILL.md must start with: All interactive skills del

  • Commits and pushes

The file

We split this CLAUDE.md into the rules it gives an agent

12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run /sync-global to synchronize rules between this template and global config.

    line 28
  2. Very specific:

    Every .claude/skills/<name>/SKILL.md must start with:

    line 67
  3. Very specific:

    All interactive skills delegate facilitation behavior to workshop-facilitation skill:

    line 90
  4. Distinctive:

    One question per turn: Wait for answer before continuing

    line 94
  5. Distinctive:

    Delete this comment block for single-stack projects.

    line 120
  6. Very specific:

    TDD: use /tdd skill — hook tdd-guard.js reminds automatically

    line 141
  7. Distinctive:

    When to write: After completing each subtask, before switching context

    line 150
  8. Very specific:

    Setup: run /polaris to fill or update interactively with guided questions

    line 170
  9. Distinctive:

    Auto-proposed: when polaris.md is empty at session start

    line 171
  10. Distinctive:

    Update frequency: every 1-2 weeks, or when priorities shift

    line 172
  11. Very specific:

    Discuss/migrate: use /roadmap skill

    line 189
  12. Distinctive:

    When /compact is triggered, always preserve in the summary:

    line 194

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md
<!-- SETUP CHECKLIST — Run once, then delete this block: [ ] 1. Search-replace all {{PLACEHOLDER}} values in this file [ ] 2. Fill in CLAUDE.local.md with your personal preferences [ ] 3. Edit .claude/hooks/tdd-guard.js: update SRC_DIRS for your project layout [ ] 4. Edit .claude/hooks/block-secrets.js: add project-specific secret file names [ ] 5. Edit skills/commit/SKILL.md: fill in FORMAT_CHECK_COMMAND and TEST_COMMAND [ ] 6. Edit skills/tdd/SKILL.md: fill in TEST_COMMAND variants [ ] 7. Update memory/MEMORY.md: fill in project description and user preferences [ ] 8. Test hooks: see README.md "Test des hooks" section [ ] 9. Delete this checklist block -->

CLAUDE.md — {{PROJECT_NAME}}

Project Identity

{{PROJECT_DESCRIPTION}}

Conventions & Rules

Rules are split into files for sync between template and global config:

  • Global rules (~/.claude/rules/): roles, quality, workflow, git, security, conventions, python-uv
  • Project rules (.claude/rules/): stack-specific (python, node, nextjs, go, rust)
  • Precedence: .claude/rules/ (project) > CLAUDE.md > ~/.claude/rules/ (global)

Run /sync-global to synchronize rules between this template and global config.

Structure

{{PROJECT_NAME}}/
├── {{SRC_DIR}}        → source code
├── {{TEST_DIR}}       → test files (mirror of src/)
├── docs/              → documentation
│   └── specs/         → functional specifications per domain (auto-generated by /spec-update)
├── .claude/           → Claude Code config (hooks, skills, commands)
│   ├── hooks/         → automatic hooks (security, TDD, memory, skill eval)
│   ├── commands/      → slash commands (/commit, /tdd, /review, /test-runner)
│   ├── agents/        → custom agent definitions (test-runner, security-auditor, tech-debt-auditor)
│   ├── rules/         → project + generic rules (synced with ~/.claude/rules/)
│   ├── stacks/        → language-specific guides (read on demand)
│   └── audit-config.json → audit skip decisions & last results (created by /audit-conformity)
└── memory/            → persistent cross-session memory
    ├── MEMORY.md          → project identity, session notes (auto-injected)
    ├── polaris.md         → north star: top of mind, goals, values (auto-injected)
    ├── patterns.md        → technical patterns, debugging lessons (on-demand)
    ├── decisions.md       → architectural decision records (on-demand)
    ├── active-context.md  → current work context (focus + next steps auto-injected)
    ├── scratchpad.md      → running work log (last 30 lines auto-injected)
    └── session-cache.json → session handoff (auto-generated)

Skills Conventions

Taxonomy (3 tiers)

TypePurposeDurationExample
componentTemplate for a specific deliverable10-30 minuser-story, problem-statement
interactiveGuided discovery with adaptive questions30-90 minprioritization-advisor, discovery-interview-prep
workflowEnd-to-end process orchestrating other skillshours-weeksprd-development, commit, tdd

Frontmatter (required)

Every .claude/skills/<name>/SKILL.md must start with:

---
name: kebab-case-name        # must match folder name, max 64 chars
description: >               # max 200 chars, include trigger phrases
  What this skill does and when to invoke it.
  Triggers: "keyword1", "keyword2".
type: component|interactive|workflow
---

Anatomy (6 sections, in order)

  1. Purpose — What this skill does and when to use it
  2. Key Concepts — Frameworks, definitions, anti-patterns
  3. Application — Step-by-step instructions (templates for component, question flows for interactive)
  4. Examples — Concrete cases showing good and bad usage
  5. Common Pitfalls — Named failure modes with Symptom/Consequence/Fix format
  6. References — Related skills, external sources, credit

Interactive Skills Protocol

All interactive skills delegate facilitation behavior to workshop-facilitation skill:

  • 3 entry modes: Guided (question by question) / Context dump (paste everything) / Best guess (infer + label assumptions)
  • Progress labels: Show Context Qx/N during collection, Scoring Qx/N during assessment
  • One question per turn: Wait for answer before continuing
  • Decision points only: Offer numbered recommendations only when a choice is needed

Available PM Skills

  • /user-story — Write user stories with Cohn format + Gherkin acceptance criteria
  • /prd-development — Structured PRD in 8 phases (2-4 days)
  • /prioritization-advisor — Choose the right prioritization framework (RICE, ICE, Kano...)
  • /discovery-interview-prep — Prepare customer interviews (Mom Test style)
  • /opportunity-solution-tree — OST: outcomes → opportunities → solutions → POC

Task Coordination

  • TodoWrite: track progress on single-thread tasks (subtask decomposition, status updates)
  • Task tool: coordinate multi-agent workflows (spawn subagents, parallel execution, cross-agent context)
  • Both tools are valid — use Task tool when delegating to agents (test-runner, security-auditor, etc.)

Workflow

  1. Edit code in this repo
  2. Run tests: {{TEST_COMMAND}}
  3. /commit → conventional commit with quality gate
  4. Push: git push origin {{DEFAULT_BRANCH}}
<!-- MULTI-STACK: If this project uses multiple stacks (e.g., Python backend + Next.js frontend), /setup will replace the single {{TEST_COMMAND}} references above with this section. Delete this comment block for single-stack projects. ## Active Stacks ### Backend — {{STACK_NAME}} - **Source**: `{{STACK_SRC_DIR}}` - **Tests**: `{{STACK_TEST_DIR}}` - **Test command**: `{{STACK_TEST_COMMAND}}` - **Format**: `{{STACK_FORMAT_CHECK_COMMAND}}` - **Stack guide**: `.claude/stacks/{{STACK_FILE}}` ### Frontend — {{STACK_NAME}} - **Source**: `{{STACK_SRC_DIR}}` - **Tests**: `{{STACK_TEST_DIR}}` - **Test command**: `{{STACK_TEST_COMMAND}}` - **Format**: `{{STACK_FORMAT_CHECK_COMMAND}}` - **Stack guide**: `.claude/stacks/{{STACK_FILE}}` -->

Project-Specific Config

  • TDD: use /tdd skill — hook tdd-guard.js reminds automatically
  • Quality gate: /commit runs secret scan, slop scan, format ({{FORMAT_COMMAND}}), tests ({{TEST_COMMAND}}), coverage report ({{TEST_COMMAND_COVERAGE}}), doc completeness check
  • Commit rhythm: commit-reminder.js (auto-detect), post-commit-lessons.js (post-commit eval)
  • Environment awareness: session-context.js injects cwd, branch, git status, stack at session start

Scratchpad Protocol (compact-resilient)

Maintain memory/scratchpad.md as a running work log during active sessions:

  • When to write: After completing each subtask, before switching context
  • Format: Append-only, latest entry at the bottom, structured entries:

    ### HH:MM — Task title
    - Done: what was completed
    - Next: immediate next step
    - Decision: key decision made (if any)
    ---
  • Content: Current task, what was done, what's next, key decisions
  • Why: Survives /compact — last 30 lines re-injected by session-context.js
  • Cleanup: Clear at the start of each new feature/story

Polaris Protocol (north star)

memory/polaris.md contains the user's strategic context: top of mind, goals, and values.

  • Auto-injected at session start (~100 tokens) by session-context.js
  • Setup: run /polaris to fill or update interactively with guided questions
  • Auto-proposed when polaris.md is empty at session start
  • Update frequency: every 1-2 weeks, or when priorities shift
  • Modification: Level 3 (propose & wait for PO approval)
  • Usage: reference Polaris when evaluating alignment of decisions, priorities, or new opportunities

Project Tracking

  • Source of truth: GitHub Projects V2 — view project
  • Project number: {{PROJECT_NUMBER}} (set per repo after template copy)
  • Read backlog: gh project item-list {{PROJECT_NUMBER}} --owner wilsto --format json
  • Read issues: gh issue list --repo wilsto/{{REPO_NAME}} --state open
  • Create issue: 3-step process (see workflow.md → Issue Creation Procedure):
    1. gh issue create --repo wilsto/{{REPO_NAME}} — creates the issue
    2. gh project item-add {{PROJECT_NUMBER}} --owner wilsto --url <URL> — adds to project board
    3. Set all fields via GraphQL (Status, Phase, Priority, Size, Type, Start date)
  • Sub-issues: mcp__github__sub_issue_write for epic decomposition
  • Phase transitions: Level 3 (propose & wait for PO approval)
  • At session start: Claude reads the project backlog to understand current context
  • Discuss/migrate: use /roadmap skill
  • Field IDs: cached in CLAUDE.local.md → "GitHub Project Field IDs" section

Compact Instructions

When /compact is triggered, always preserve in the summary:

  • Full list of modified files and their purpose
  • Current task status (what's done, what's in progress)
  • Key decisions made and their rationale
  • Active test commands and environment-specific details
  • Any blocking issues or open questions for PO

Model Selection

TaskRecommended model
Quick fixes (typo, rename, single-file)Haiku (/model haiku)
Features, multi-file, debuggingSonnet (default)
Refactoring, architecture, complex plansOpus (/model opus)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.