write-claude-md
Create an effective CLAUDE.md file that provides project-specific instructions to AI coding assistants. Covers structure, common sections, do/don't patterns, and integration with MCP servers and agent definitions. Use when starting a new project where AI assistants will be used, improving AI behavior on an existing project, documenting project conventions and constraints, or integrating MCP servers or agent definitions into a project workflow.
Best use case
write-claude-md is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create an effective CLAUDE.md file that provides project-specific instructions to AI coding assistants. Covers structure, common sections, do/don't patterns, and integration with MCP servers and agent definitions. Use when starting a new project where AI assistants will be used, improving AI behavior on an existing project, documenting project conventions and constraints, or integrating MCP servers or agent definitions into a project workflow.
Teams using write-claude-md should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/write-claude-md/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How write-claude-md Compares
| Feature / Agent | write-claude-md | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create an effective CLAUDE.md file that provides project-specific instructions to AI coding assistants. Covers structure, common sections, do/don't patterns, and integration with MCP servers and agent definitions. Use when starting a new project where AI assistants will be used, improving AI behavior on an existing project, documenting project conventions and constraints, or integrating MCP servers or agent definitions into a project workflow.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Write CLAUDE.md Create a CLAUDE.md file that gives AI assistants effective project-specific context. ## When to Use - Starting a new project where AI assistants will be used - Improving AI assistant behavior on an existing project - Documenting project conventions, workflows, and constraints - Integrating MCP servers or agent definitions into a project ## Inputs - **Required**: Project type and technology stack - **Required**: Key conventions and constraints - **Optional**: MCP server configurations - **Optional**: Author and contributor information - **Optional**: Security and confidentiality requirements ## Procedure ### Step 1: Create Basic CLAUDE.md Place `CLAUDE.md` in the project root: ```markdown # Project Name Brief description of what this project is and its purpose. ## Quick Start Essential commands for working on this project: ```bash # Install dependencies npm install # or renv::restore() for R # Run tests npm test # or devtools::test() for R # Build npm run build # or devtools::check() for R ``` ## Architecture Key architectural decisions and patterns used in this project. ## Conventions - Always use descriptive variable names - Follow [language-specific style guide] - Write tests for all new functionality ``` **Got:** A `CLAUDE.md` file exists in the project root with at minimum a project description, quick start commands, architecture overview, and conventions section. **If fail:** If unsure what to include, start with the Quick Start section containing the three most important commands (install, test, build). The file can be expanded incrementally as the project evolves. ### Step 2: Add Technology-Specific Sections **For R packages**: ```markdown ## Development Workflow ```r devtools::load_all() # Load for development devtools::document() # Regenerate docs devtools::test() # Run tests devtools::check() # Full package check ``` ## Package Structure - `R/` - Source code (one function per file) - `tests/testthat/` - Tests mirror R/ structure - `vignettes/` - Long-form documentation - `man/` - Generated by roxygen2 (do not edit manually) ## Critical Files (Do Not Delete) - `.Rprofile` - Session configuration - `.Renviron` - Environment variables (git-ignored) - `renv.lock` - Locked dependencies ``` **For Node.js/TypeScript**: ```markdown ## Stack - Next.js 15 with App Router - TypeScript strict mode - Tailwind CSS for styling - Vercel for deployment ## Conventions - Use `@/` import alias for src/ directory - Server Components by default, `"use client"` only when needed - API routes in `src/app/api/` ``` **Got:** Technology-specific sections are added that match the project's actual stack — R package structure for R projects, Node.js stack details for web projects, etc. Commands and paths reference the real project layout. **If fail:** If the project uses an unfamiliar stack, inspect `package.json`, `DESCRIPTION`, `Cargo.toml`, or equivalent to identify the technology and add the corresponding section. ### Step 3: Add MCP Server Information ```markdown ## Available MCP Servers ### r-mcptools (R Integration) - **Purpose**: Connect to R/RStudio sessions - **Status**: Configured - **Configuration**: `claude mcp add r-mcptools stdio "Rscript.exe" -- -e "mcptools::mcp_server()"` ### hf-mcp-server (Hugging Face) - **Purpose**: AI/ML model and dataset access - **Status**: Configured - **Configuration**: `claude mcp add hf-mcp-server -e HF_TOKEN=token -- mcp-remote https://huggingface.co/mcp` ``` **Got:** Each configured MCP server has a subsection documenting its purpose, status (configured/available/not configured), and the command used to add it. No actual tokens or secrets are included. **If fail:** If MCP servers are not yet configured, document them as "Available" with setup instructions rather than "Configured." Use placeholder values like `your_token_here` for any credentials. ### Step 4: Add Author Information ```markdown ## Author Information ### Standard Package Authorship - **Name**: Author Name - **Email**: author@example.com - **ORCID**: 0000-0000-0000-0000 - **GitHub**: username ``` **Got:** Author information section includes name, email, ORCID (for academic/research projects), and GitHub username. For R packages, the format matches DESCRIPTION file requirements. **If fail:** If author information is sensitive or should not be public, use the organization name instead of personal details, or omit the section entirely for internal-only projects. ### Step 5: Add Security Guidelines ```markdown ## Security & Confidentiality - Never commit `.Renviron`, `.env`, or files containing tokens - Use placeholder values in documentation: `YOUR_TOKEN_HERE` - Environment variables for all secrets - Git-ignored: `.Renviron`, `.env`, `credentials.json` ``` **Got:** Security section lists files that must never be committed, placeholder conventions for documentation, and confirms that `.gitignore` covers all sensitive files. **If fail:** If unsure which files are sensitive, run `grep -rn "sk-\|ghp_\|password" .` to scan for exposed secrets. Any file containing real credentials should be added to `.gitignore` and mentioned in this section. ### Step 6: Reference Skills and Guides ```markdown ## Development Best Practices References @agent-almanac/skills/write-testthat-tests/SKILL.md @agent-almanac/skills/submit-to-cran/SKILL.md ``` **Got:** Relevant skills and guides are referenced using `@` paths, giving AI assistants access to detailed procedures for common tasks in the project. **If fail:** If the referenced skills or guides do not exist at the specified paths, verify the paths or remove the references. Broken `@` references provide no value and may confuse the assistant. ### Step 7: Add Quality and Status Information ```markdown ## Quality Status - R CMD check: 0 errors, 0 warnings, 1 note - Test coverage: 85% - Tests: 200+ passing - Vignettes: 3 (rated 9/10) ``` **Got:** Quality metrics section reflects the current state of the project with accurate numbers for check results, test coverage, test count, and documentation status. **If fail:** If metrics are not yet available (new project), add placeholder entries with "TBD" and update them as the project matures. Do not fabricate numbers. ## Validation - [ ] CLAUDE.md is in project root - [ ] Quick start commands are accurate and work - [ ] Architecture section reflects actual project structure - [ ] No sensitive information (tokens, passwords, private paths) - [ ] MCP server configurations are current - [ ] Referenced files and paths exist ## Pitfalls - **Stale information**: Update CLAUDE.md when project structure changes - **Too much detail**: Keep it concise. Link to detailed guides rather than duplicating content. - **Sensitive data**: Never include actual tokens or credentials. Use placeholders. - **Conflicting instructions**: Ensure CLAUDE.md doesn't contradict other config files - **Missing from `.Rbuildignore`**: For R packages, add `^CLAUDE\\.md$` to `.Rbuildignore` ## Examples Pattern observed across successful projects: 1. **putior** (829 lines): Comprehensive CLAUDE.md with quality metrics, 20 accomplishments, MCP integration details, and development workflow 2. **Simple project** (20 lines): Just quick start commands and key conventions Scale the CLAUDE.md to match project complexity. ## Related Skills - `create-r-package` - CLAUDE.md as part of package setup - `configure-mcp-server` - MCP configuration referenced in CLAUDE.md - `security-audit-codebase` - verify no secrets in CLAUDE.md
Related Skills
write-vignette
Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.
write-validation-documentation
Write IQ/OQ/PQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.
write-testthat-tests
Write comprehensive testthat (edition 3) tests for R package functions. Covers test organization, expectations, fixtures, mocking, snapshot tests, parameterized tests, and achieving high coverage. Use when adding tests for new package functions, increasing test coverage for existing code, writing regression tests for bug fixes, or setting up test infrastructure for a package that lacks it.
write-standard-operating-procedure
Write a GxP-compliant Standard Operating Procedure (SOP). Covers regulatory SOP template structure (purpose, scope, definitions, responsibilities, procedure, references, revision history), approval workflow design, periodic review scheduling, and operational procedures for system use. Use when a new validated system requires operational procedures, when existing informal procedures need formalisation, when an audit finding cites missing procedures, when a change control triggers SOP updates, or when periodic review identifies outdated procedural content.
write-roxygen-docs
Write roxygen2 documentation for R package functions, datasets, and classes. Covers all standard tags, cross-references, examples, and generating NAMESPACE entries. Follows tidyverse documentation style. Use when adding documentation to new exported functions, documenting internal helpers or datasets, documenting S3/S4/R6 classes and methods, or fixing documentation-related R CMD check notes.
write-incident-runbook
Create structured incident runbooks with diagnostic steps, resolution procedures, escalation paths, and communication templates for effective incident response. Use when documenting response procedures for recurring alerts, standardizing incident response across an on-call rotation, reducing MTTR with clear diagnostic steps, creating training materials for new team members, or linking alert annotations directly to resolution procedures.
write-helm-chart
Create production-ready Helm charts for Kubernetes application deployment with templating, values management, chart dependencies, hooks, and testing. Covers chart structure, Go template syntax, values.yaml design, chart repositories, versioning, and best practices for maintainable and reusable charts. Use when packaging a Kubernetes application for repeatable deployments, parameterizing manifests for multiple environments, managing complex multi-component applications with dependencies, or standardizing deployment practices with versioned rollback capability across teams.
write-continue-here
Write a CONTINUE_HERE.md file capturing current session state so a fresh Claude Code session can pick up where this one left off. Covers assessing recent work, structuring the continuation file with objective, completed, in-progress, next-steps, and context sections, and verifying the file is actionable. Use when ending a session with unfinished work, handing off context between sessions, or preserving task state that git alone cannot capture.
skill-name-here
One to three sentences describing what this skill accomplishes, followed by key activation triggers. This field is the primary mechanism agents use to decide whether to activate the skill — it is read during discovery before the full body is loaded. Start with a verb. Include the most important "when to use" conditions inline. Max 1024 characters.
vishnu-bhaga
Preservation and sustenance — maintaining working state under perturbation, memory anchoring, consistency enforcement, and protective stabilization. Maps Vishnu's sustaining presence to AI reasoning: holding what works steady, anchoring verified knowledge against drift, and ensuring continuity through change. Use when a working approach is at risk from scope creep, when context drift threatens verified knowledge, after shiva-bhaga dissolution to protect what survived, when a long session risks losing earlier decisions through context compression, or before making changes to a currently functioning system.
version-ml-data
Version machine learning datasets using DVC (Data Version Control) with remote storage backends, build reproducible data pipelines with dependency tracking, integrate with Git workflows, and ensure data lineage for model reproducibility. Use when versioning large datasets that do not fit in Git, tracking data changes alongside code changes, ensuring ML experiment reproducibility, sharing datasets across team members, or auditing data lineage for compliance requirements.
verify-agent-output
Validate deliverables and build evidence trails when work passes between agents. Covers expected outcome specification before execution, structured evidence generation during execution, deliverable validation against external anchors after execution, fidelity checks for compressed or summarized outputs, trust boundary classification, and structured disagreement reporting on verification failure. Use when coordinating multi-agent workflows, reviewing cross-agent handoffs, producing external-facing outputs, or auditing whether an agent's summary faithfully represents its source material.