claude-md-templates  by abhishekray07

LLM instruction management framework using markdown

Created 5 months ago
282 stars

Top 92.2% on SourcePulse

GitHubView on GitHub
Project Summary

This starter kit provides a structured approach to optimizing output from Claude Code by organizing instructions across different scopes. It targets developers seeking to enhance AI-assisted coding efficiency through well-defined Markdown configurations, reducing setup time to minutes.

How It Works

The system leverages a three-level hierarchy for Claude Code instructions: global (~/.claude/CLAUDE.md), project (.claude/CLAUDE.md), and local overrides (CLAUDE.local.md). These files are concatenated into Claude's context, with later instructions taking precedence. Additionally, modular, path-scoped rules (.claude/rules/) allow for fine-grained control over specific file types or directories. Claude Code also maintains an auto-memory feature for discovered patterns, further refining context without explicit configuration. This layered approach ensures lean, effective instruction sets within Claude's attention budget.

Quick Start & Requirements

  1. Create global file: mkdir -p ~/.claude && cp global/CLAUDE.md ~/.claude/CLAUDE.md
  2. Create project file: mkdir -p .claude && cp project/<template>.md .claude/CLAUDE.md (e.g., nextjs-typescript.md, python-fastapi.md, generic.md)
  3. Create local overrides: cp local/local.md ./CLAUDE.local.md && echo "CLAUDE.local.md" >> .gitignore
  4. Add rules (optional): mkdir -p .claude/rules && cp rules/<rule>.md .claude/rules/<rule>.md

Setup is estimated at ~10 minutes. Global files should ideally be under 15 lines, and project root files under 80 lines. Relevant resources include principles.md, workflows/self-improvement-rules.md, and workflows/prompting-patterns.md.

Highlighted Details

  • Hierarchical Context Management: Organizes instructions into global, project, and local scopes for clarity and reusability.
  • Modular Rules: Enables path-scoped rules for targeted application based on file type or directory.
  • Self-Improvement Loop: Promotes a feedback mechanism where users instruct Claude to update CLAUDE.md based on corrections, fostering continuous improvement.
  • Attention Budget Optimization: Focuses on concise instructions to maximize effectiveness within Claude's context window limits.
  • Scalable Architecture: Supports module-specific CLAUDE.md files in subdirectories for larger codebases.

Maintenance & Community

This kit is developed by "Claude Code Camp," with contributions and references from notable individuals and organizations like Matt Pocock, Boris Cherny, HumanLayer, Cloudflare, and ChrisWiles. Community resources include josix/awesome-claude-md and hesreallyhim/awesome-claude-code. Future work includes stack-specific rule templates and migration guides.

Licensing & Compatibility

The specific open-source license for this repository is not explicitly stated in the provided README. Users should verify licensing before integration, especially for commercial use or closed-source projects. The system is designed for Claude Code and does not directly modify source code, suggesting broad compatibility.

Limitations & Caveats

Maintaining CLAUDE.md files within Claude's effective instruction limit (~200 tokens) requires discipline, as overly long files can lead to ignored instructions. Generic personality instructions are discouraged due to token inefficiency. The repository's license requires verification. Some advanced features, such as stack-specific rule templates, are still under development.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
32 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.