claude-code-basecamp
CLAUDE.md17 starsChanged 59 days agoMITView on GitHub
This is a meta-repository for Claude Code. It serves as a unified workspace with shared skills, commands, and hooks — so every team member gets consistent, high-quality AI assistance from day one. Note: The "Agent Docs" listing below is auto-generated from frontmatter in markdown files in agent-docs/. The ladder runs after understanding the problem, not instead of it: read the task and code it touches, trace the real flow end-to-end, then climb. Mark deliberate simplifications with a ponytail: comment naming…
- Commits and pushes
In this repository9 other files it gives its agents.
- brainstormingSkill
- ci-guardSkill
- cost-speed-meterSkill
- python-patternsSkill
- refactoring-patternsSkill
- security-checkSkill
- semantic-versioningSkill
- update-docsSkill
- verification-loopSkill
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Read relevant documentation first: - Before taking action on any task:
- Distinctive: line 14
Read ALL documents relevant to your task before proceeding
- Distinctive: line 19
Use available skills: - Check if relevant skills are available in your environment for your tasks, and if there are - utilize them.
- Distinctive: line 21
Verify before diagnosing: - When analyzing failures or investigating issues, use documentation and available tools to verify facts.
- Distinctive: line 30
Only then: write the minimum code that works.
- Distinctive: line 127
Recommended workflow: After completing tasks, run pre-commit to validate the workspace:
- Very specific: line 150
Before making changes to any repo in repositories/, read its documentation:
- Distinctive: line 167
Use this information to decide whether to switch branches, pull latest changes, or proceed as-is.
- Very specific: line 171
When working in a repo under repositories/, commit and push directly from within that repo.
≈ “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.
Files
Overview
This is a meta-repository for Claude Code. It serves as a unified workspace with shared skills, commands, and hooks — so every team member gets consistent, high-quality AI assistance from day one.
Note: The "Agent Docs" listing below is auto-generated from frontmatter in markdown files in agent-docs/.
Critical Requirements
<critical-requirements>
These requirements ALWAYS apply. Follow them throughout every task - some apply at task start, others when specific situations arise:- Read relevant documentation first - Before taking action on any task:
- Review the Agent Docs list below
- Read ALL documents relevant to your task before proceeding
- Re-evaluate after encountering failures or gaining new insights—additional documents may become relevant
- Use
uvfor Python execution - Execute all scripts and tools withuv run <script/tool>. This workspace exclusively usesuvfor package and environment management. For scripts with inline dependencies (PEP 723), run them directly (uv run script.py) to ensure dependencies resolve correctly. - Use available skills - Check if relevant skills are available in your environment for your tasks, and if there are - utilize them.
- Verify before diagnosing - When analyzing failures or investigating issues, use documentation and available tools to verify facts. Provide diagnoses ONLY after verification.
Write minimal, correct code (Ponytail ladder) - Before writing any code, stop at the first rung that holds:
- Does this need to be built at all? (YAGNI)
- Does it already exist in this codebase? Reuse the helper, util, or pattern that's already here, don't re-write it.
- Does the standard library already do this? Use it.
- Does a native platform feature cover it? Use it.
- Does an already-installed dependency solve it? Use it.
- Can this be one line? Make it one line.
- Only then: write the minimum code that works.
The ladder runs after understanding the problem, not instead of it: read the task and code it touches, trace the real flow end-to-end, then climb. Mark deliberate simplifications with a
ponytail:comment naming the ceiling and upgrade path. Never skip validation, error handling, security, or accessibility — these are never on the chopping block.
Violating these requirements results in incomplete solutions, wasted effort, and task failures.
</critical-requirements>
Modular Documentation System
The agent-docs/ directory contains modular, task-focused documentation that provides crucial information, context, and instructions for various tasks relevant to this workspace.
Documentation review workflow:
- ALWAYS review the "Agent Docs" list below when starting any task
- Identify documents relevant to your task based on their descriptions and "When to read" sections
- Read ALL identified relevant documents before proceeding
- Re-evaluate relevance whenever you gain new insights during the task - when discoveries change your understanding, immediately check if additional documents are now relevant
For more information, see agent-docs/README.md.
Agent Docs
<agent-docs-items>
<doc path="agent-docs/codebase-onboarding.md">
<name>Codebase Onboarding</name>
<description>Systematic onboarding to unfamiliar codebases. Analyzes project structure, tech stack, conventions, entry points, and data flow to produce an onboarding guide. Use when joining a new project or helping a team member get started.</description>
<when-to-read>When exploring an unfamiliar repository for the first time. When generating onboarding docs for a new team member. When analyzing project structure, conventions, dependencies, or entry points of a codebase you haven't worked in before.</when-to-read>
</doc>
<doc path="agent-docs/deep-research.md">
<name>Deep Research</name>
<description>Multi-source deep research with citations. Use when the user wants thorough research on any topic — technology evaluation, library comparison, algorithm analysis, literature review, or competitive analysis. Searches the web, synthesizes findings, and delivers cited reports.</description>
<when-to-read>When the user asks for research, comparison, or evaluation of technologies, libraries, algorithms, or approaches. When producing a literature review, competitive analysis, or trade-off assessment that requires multiple web sources.</when-to-read>
</doc>
<doc path="agent-docs/mcp-patterns.md">
<name>Mcp Patterns</name>
<description>Patterns for building, securing, and consuming MCP (Model Context Protocol) servers. Covers schema-first design, authentication, input validation, audit logging, and security best practices.</description>
<when-to-read>When building, modifying, or debugging an MCP server. When defining MCP tool schemas, configuring MCP authentication, or reviewing MCP security. When a .mcp.json file is present and the user is working on MCP integration.</when-to-read>
</doc>
<doc path="agent-docs/subagent-driven-development.md">
<name>Subagent-Driven Development Guide</name>
<description>Execute implementation plans by dispatching a fresh subagent per task with two-stage review (spec compliance, then code quality). Power-user workflow for complex multi-task implementations.</description>
<when-to-read>When executing implementation plans with many independent tasks in the current session. When you need isolated context per task to avoid pollution.</when-to-read>
</doc>
<doc path="agent-docs/workspace-development.md">
<name>Workspace Development Guide</name>
<description>How to modify, configure, and extend this workspace. Covers configuration, package management, creating agent-docs/skills/commands, tool discovery, and session hooks.</description>
<when-to-read>When modifying workspace infrastructure or configuration. When creating or editing agent-docs, skills, or commands. When adding dependencies or changing ai-workspace.toml. When adding session hook support for a new AI tool.</when-to-read>
</doc>
<doc path="agent-docs/writing-skills.md">
<name>Writing Skills Guide</name>
<description>TDD methodology for creating new AI skills. Covers skill types, SKILL.md structure, Claude Search Optimization, testing with subagents, and the RED-GREEN-REFACTOR cycle applied to documentation.</description>
<when-to-read>When creating new skills, editing existing skills, or verifying skills work before deployment. When extending the workspace with new team-specific patterns.</when-to-read>
</doc>
</agent-docs-items>Agent Resources Overview
In addition to environment-provided capabilities (e.g., tools, MCPs, Skills), this workspace defines project-specific resources:
- Documentation (
agent-docs/) — AI reads when relevant to tasks - Skills (
skills/) — Reusable agent capabilities with scripts and instructions - Commands (
commands/) — Human invokes via/command; AI receives prompt
<commands-section>
## CommandsThe commands/ directory contains AI commands invoked by humans via /command syntax.
For more information, see commands/README.md.
</commands-section>
<skills-section>
## SkillsThe skills/ directory contains reusable agent skills following the Agent Skills specification.
For more information, see skills/README.md.
</skills-section>
Configuration
This workspace is configured via ai-workspace.toml at the repository root. After changing configuration or agent docs, regenerate workspace files:
uv run .ai-workspace/scripts/align-workspace.pyFor configuration reference, see .ai-workspace/README.md.
Pre-commit Hooks
Pre-commit hooks are configured to maintain code quality and documentation consistency.
Setup (if not already installed):
uv run pre-commit installRecommended workflow: After completing tasks, run pre-commit to validate the workspace:
uv run pre-commit run --all-filesTemporary Files
The .tmp/ directory is git-ignored and available for transient artifacts, design documents, logs, or intermediate files.
When writing files to .tmp/: First create a task-specific subdirectory:
uv run .ai-workspace/scripts/mktmpdir.py [name]The script outputs the created path. If the directory exists, returns the existing path.
When delegating subtasks: Pass the directory path so related work stays together.
Working with Repositories
The repositories/ directory is where users clone the repos they work on. These repos are not tracked by the workspace — each user clones what they need.
Before making changes to any repo in repositories/, read its documentation:
- CLAUDE.md — Follow repo-specific conventions, commands, and workflows
- README.md — Understand project context, structure, and development practices
- Other relevant docs — Review additional documentation as needed
Repository Focus
The user can type /focus to select which repo(s) to work on. After selection, constrain all file operations to the selected repo(s) — do not read or modify files in unselected repos under repositories/ unless the user explicitly asks.
Repository Status
At session start, each repository's git state is reported via <repository-status> in the session context. This includes:
- Current branch and configured default branch
- Whether there are uncommitted changes
- How many commits behind the remote tracking branch
Use this information to decide whether to switch branches, pull latest changes, or proceed as-is. Verify current repo state with git commands before branch switches or destructive operations — this status is a snapshot from session start and may be outdated.
Commit/Push Workflow
When working in a repo under repositories/, commit and push directly from within that repo. Changes push to that repo's own remote — the workspace is never involved.
cd repositories/<repo>
git add <files> && git commit -m "Your changes"
git push origin <branch>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
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.

