Claude Code Modular Framework
A comprehensive, production-ready modular framework template for Claude Code that achieves 2-10x productivity gains through proven patterns, token optimization, and systematic development workflows.
Loading actions...
Skill content
Main instructions and any bundled files for this skill.
Claude Code Modular Framework
A comprehensive, production-ready modular framework template for Claude Code that achieves 2-10x productivity gains through proven patterns, token optimization, and systematic development workflows.
☕ If this framework saves you time, you can help me out:
🚀 Quick Start
1. Clone and Setup
git clone https://gitlab.com/thirteenth_mang/claude-modular.git
cd claude-modular
cp templates/CLAUDE.md.template CLAUDE.md
# Edit CLAUDE.md with your project-specific details
2. Initialize Your Project
# Copy the .claude directory to your project root
cp -r .claude /path/to/your/project/
# Customize configuration for your environment
cd /path/to/your/project/.claude/config
# Edit settings.json, development.json, etc.
3. Start Using Commands
# In your project with Claude Code
/project:setup-environment
/project:create-feature user-authentication
/test:generate-tests
/dev:code-review
📚 Features
✅ Token Optimization (50-80% savings)
- Progressive disclosure - Load only necessary context
- Modular instructions - Just-in-time command loading
- Context compression - Efficient context management
- Smart boundaries - Automatic context switching
✅ 20+ Production-Ready Commands
- Project Management - Feature creation, component scaffolding
- Development Workflow - Code review, refactoring, debugging
- Testing Automation - Test generation, coverage analysis
- Deployment - Release preparation, staging deployment, rollback
- Documentation - API docs, README updates, architecture review
✅ Environment-Specific Configuration
- Development - Relaxed rules, verbose logging
- Staging - Quality gates, review requirements
- Production - Strict security, multi-factor auth
✅ Security-First Design
- Secret scanning prevention
- Permission validation for sensitive operations
- Audit logging for compliance
- Environment variable management
🔬 Research & Documentation
Research Papers
This framework is based on comprehensive research into modular Claude Code architectures and optimization techniques:
📄 The Modular Claude Code Implementation Playbook
Comprehensive guide to implementing modular setups that achieve 2-10x productivity gains
Teams implementing modular Claude Code setups achieve dramatic productivity improvements by following structured patterns that separate public templates from private configurations, enable gradual migration from monolithic structures, and integrate seamlessly with existing development workflows. This paper documents proven patterns from successful implementations.
📄 Optimizing Agentic Development Workflows with Claude Code
Performance optimization research and architectural patterns for maximum effectiveness
Based on extensive research into production implementations, this paper identifies practical strategies for maximizing Claude Code's effectiveness in agentic development workflows. Covers context window optimization, modular architecture benefits, and token management strategies that deliver 50-80% token savings.
Key Research Findings
- Modular architecture achieves 50-80% token savings vs monolithic approaches
- Hierarchical configuration enables secure collaboration without compromising productivity
- Progressive disclosure patterns reduce context overhead while maintaining functionality
- Environment-specific configurations balance security with development velocity
🏗️ Architecture
Directory Structure
your-project/
├── .claude/ # Framework configuration
│ ├── config/ # Environment-specific settings
│ │ ├── settings.json # Base configuration
│ │ ├── development.json # Dev environment
│ │ ├── staging.json # Staging environment
│ │ └── production.json # Production environment
│ └── commands/ # Modular command library
│ ├── project/ # Project management
│ ├── development/ # Development workflow
│ ├── testing/ # Testing automation
│ ├── deployment/ # Deployment operations
│ └── documentation/ # Documentation generation
├── CLAUDE.md # Your project-specific configuration
└── [your project files]
Command Structure
Each command follows a proven XML structure:
<instructions>
<context>When and why to use this command</context>
<requirements>Prerequisites and dependencies</requirements>
<execution>Step-by-step implementation</execution>
<validation>Quality checks and acceptance criteria</validation>
<examples>Concrete usage examples</examples>
</instructions>
📖 Command Reference
Project Management
/project:create-feature- Full feature scaffolding with tests and docs/project:scaffold-component- Component creation with boilerplate/project:setup-environment- Development environment initialization
Development Workflow
/dev:code-review- Structured code review with automated analysis/dev:refactor-analysis- Code improvement recommendations/dev:debug-session- Systematic debugging and problem solving
Testing
/test:generate-tests- Comprehensive test suite generation/test:coverage-analysis- Test coverage assessment and improvement/test:integration-tests- Integration test creation and execution
Deployment
/deploy:prepare-release- Release preparation with quality gates/deploy:deploy-staging- Staging deployment with validation/deploy:rollback-procedure- Emergency rollback execution
Documentation
/docs:api-docs- API documentation generation/docs:update-readme- README maintenance and updates/docs:architecture-review- Architecture documentation and review
⚙️ Configuration
Environment Configuration
The framework supports layered configuration inheritance:
// Base settings.json
{
"defaults": {
"max_tokens_per_session": 50000,
"progressive_disclosure": true
}
}
// development.json overrides
{
"extends": "./settings.json",
"overrides": {
"defaults": {
"max_tokens_per_session": 100000
}
}
}
Security Configuration
{
"security": {
"require_env_vars": true,
"audit_logging": true,
"permission_validation": true,
"secret_scanning": true
}
}
🔧 Customization
Creating Custom Commands
- Create a new command file in appropriate category
- Follow the XML structure template
- Include comprehensive examples
- Test with realistic scenarios
Adapting for Your Stack
- Edit
templates/CLAUDE.md.templatewith your technologies - Update command examples for your build tools
- Customize quality gates for your requirements
- Add stack-specific validation rules
📊 Performance Metrics
Token Optimization Results
- 50-80% token savings vs monolithic setups
- Sub-30-second setup time for new projects
- 20+ core commands covering 80% of workflows
- Progressive disclosure reduces context overhead
Quality Improvements
- Consistent code review quality
- Automated testing coverage
- Standardized deployment procedures
- Comprehensive documentation generation
🛠️ Integration
MCP Server Support
- Memory MCP - Context persistence between sessions
- Git MCP - Version control integration
- Filesystem MCP - File operations and watching
- Linear MCP - Issue tracking integration
- Notion MCP - Documentation synchronization
CI/CD Integration
- GitHub Actions support
- Quality gate enforcement
- Automated testing pipelines
- Deployment automation
📚 Examples
Basic Usage
# Setup new project
/project:setup-environment
# Create a feature
/project:create-feature user-authentication --type=service
# Review code
/dev:code-review --focus=security,performance
# Deploy to staging
/deploy:deploy-staging
Advanced Workflows
# Complex feature development
/project:create-feature payment-processing --framework=express --database=postgresql
# Comprehensive testing
/test:generate-tests --types=unit,integration,e2e
/test:coverage-analysis --target=90%
# Production deployment
/deploy:prepare-release --type=major
/deploy:deploy-staging --validate
/deploy:rollback-procedure --preserve-data
🤝 Contributing
- Fork the repository
- Create feature branch:
git checkout -b feature/new-command - Add your command following the XML structure
- Include comprehensive examples and tests
- Update documentation
- Submit pull request
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
Special thanks to the Claude Code community for their contributions, feedback, and the open-source projects that make this framework possible.
Community Contributors: This framework has been shaped by valuable feedback from the Reddit community. See our Community-Driven Improvements tracking issue for transparency on how community suggestions become features.
💝 Support This Project
If this framework has saved you time or improved your workflow, consider supporting its continued development:
☕ Buy Me a Coffee
Your support helps:
- 🔧 Maintain and improve the framework
- 📚 Create better documentation and examples
- 🚀 Develop new features based on community feedback
- 🛠️ Fix issues and provide timely support
🌟 Other Ways to Support
- Star this repository to help others discover it
- Share with your team and development community
- Contribute improvements through pull requests
- Report issues to help improve the framework
📞 Get Help & Support
- Issues: GitLab Issues
- Discussions: GitLab Discussions
- Documentation: GitLab Wiki
- Community: Join our growing community of developers using modular Claude Code
Start building better, faster, and more consistently with Claude Code's modular framework.
Prompt Playground
1 VariableFill Variables
Preview
# Claude Code Modular Framework
A comprehensive, production-ready modular framework template for Claude Code that achieves 2-10x productivity gains through proven patterns, token optimization, and systematic development workflows.
☕ **If this framework saves you time, you can help me out:** [](https://ko-fi.com/thirteenth_mang)
## 🚀 Quick Start
### 1. Clone and Setup
```bash
git clone https://gitlab.com/thirteenth_mang/claude-modular.git
cd claude-modular
cp templates/CLAUDE.md.template CLAUDE.md
# Edit CLAUDE.md with your project-specific details
```
### 2. Initialize Your Project
```bash
# Copy the .claude directory to your project root
cp -r .claude /path/to/your/project/
# Customize configuration for your environment
cd /path/to/your/project/.claude/config
# Edit settings.json, development.json, etc.
```
### 3. Start Using Commands
```bash
# In your project with Claude Code
/project:setup-environment
/project:create-feature user-authentication
/test:generate-tests
/dev:code-review
```
## 📚 Features
### ✅ Token Optimization (50-80% savings)
- **Progressive disclosure** - Load only necessary context
- **Modular instructions** - Just-in-time command loading
- **Context compression** - Efficient context management
- **Smart boundaries** - Automatic context switching
### ✅ 20+ Production-Ready Commands
- **Project Management** - Feature creation, component scaffolding
- **Development Workflow** - Code review, refactoring, debugging
- **Testing Automation** - Test generation, coverage analysis
- **Deployment** - Release preparation, staging deployment, rollback
- **Documentation** - API docs, README updates, architecture review
### ✅ Environment-Specific Configuration
- **Development** - Relaxed rules, verbose logging
- **Staging** - Quality gates, review requirements
- **Production** - Strict security, multi-factor auth
### ✅ Security-First Design
- **Secret scanning** prevention
- **Permission validation** for sensitive operations
- **Audit logging** for compliance
- **Environment variable** management
## 🔬 Research & Documentation
### Research Papers
This framework is based on comprehensive research into modular Claude Code architectures and optimization techniques:
#### [📄 The Modular Claude Code Implementation Playbook](./The%20modular%20Claude%20Code%20implementation%20playbook.md)
*Comprehensive guide to implementing modular setups that achieve 2-10x productivity gains*
Teams implementing modular Claude Code setups achieve dramatic productivity improvements by following structured patterns that separate public templates from private configurations, enable gradual migration from monolithic structures, and integrate seamlessly with existing development workflows. This paper documents proven patterns from successful implementations.
#### [📄 Optimizing Agentic Development Workflows with Claude Code](./Optimizing%20Agentic%20Development%20Workflows%20with%20Claude%20Code.md)
*Performance optimization research and architectural patterns for maximum effectiveness*
Based on extensive research into production implementations, this paper identifies practical strategies for maximizing Claude Code's effectiveness in agentic development workflows. Covers context window optimization, modular architecture benefits, and token management strategies that deliver 50-80% token savings.
### Key Research Findings
- **Modular architecture** achieves 50-80% token savings vs monolithic approaches
- **Hierarchical configuration** enables secure collaboration without compromising productivity
- **Progressive disclosure** patterns reduce context overhead while maintaining functionality
- **Environment-specific configurations** balance security with development velocity
## 🏗️ Architecture
### Directory Structure
```
your-project/
├── .claude/ # Framework configuration
│ ├── config/ # Environment-specific settings
│ │ ├── settings.json # Base configuration
│ │ ├── development.json # Dev environment
│ │ ├── staging.json # Staging environment
│ │ └── production.json # Production environment
│ └── commands/ # Modular command library
│ ├── project/ # Project management
│ ├── development/ # Development workflow
│ ├── testing/ # Testing automation
│ ├── deployment/ # Deployment operations
│ └── documentation/ # Documentation generation
├── CLAUDE.md # Your project-specific configuration
└── [your project files]
```
### Command Structure
Each command follows a proven XML structure:
```xml
<instructions>
<context>When and why to use this command</context>
<requirements>Prerequisites and dependencies</requirements>
<execution>Step-by-step implementation</execution>
<validation>Quality checks and acceptance criteria</validation>
<examples>Concrete usage examples</examples>
</instructions>
```
## 📖 Command Reference
### Project Management
- `/project:create-feature` - Full feature scaffolding with tests and docs
- `/project:scaffold-component` - Component creation with boilerplate
- `/project:setup-environment` - Development environment initialization
### Development Workflow
- `/dev:code-review` - Structured code review with automated analysis
- `/dev:refactor-analysis` - Code improvement recommendations
- `/dev:debug-session` - Systematic debugging and problem solving
### Testing
- `/test:generate-tests` - Comprehensive test suite generation
- `/test:coverage-analysis` - Test coverage assessment and improvement
- `/test:integration-tests` - Integration test creation and execution
### Deployment
- `/deploy:prepare-release` - Release preparation with quality gates
- `/deploy:deploy-staging` - Staging deployment with validation
- `/deploy:rollback-procedure` - Emergency rollback execution
### Documentation
- `/docs:api-docs` - API documentation generation
- `/docs:update-readme` - README maintenance and updates
- `/docs:architecture-review` - Architecture documentation and review
## ⚙️ Configuration
### Environment Configuration
The framework supports layered configuration inheritance:
```json
// Base settings.json
{
"defaults": {
"max_tokens_per_session": 50000,
"progressive_disclosure": true
}
}
// development.json overrides
{
"extends": "./settings.json",
"overrides": {
"defaults": {
"max_tokens_per_session": 100000
}
}
}
```
### Security Configuration
```json
{
"security": {
"require_env_vars": true,
"audit_logging": true,
"permission_validation": true,
"secret_scanning": true
}
}
```
## 🔧 Customization
### Creating Custom Commands
1. Create a new command file in appropriate category
2. Follow the XML structure template
3. Include comprehensive examples
4. Test with realistic scenarios
### Adapting for Your Stack
1. Edit `templates/CLAUDE.md.template` with your technologies
2. Update command examples for your build tools
3. Customize quality gates for your requirements
4. Add stack-specific validation rules
## 📊 Performance Metrics
### Token Optimization Results
- **50-80% token savings** vs monolithic setups
- **Sub-30-second** setup time for new projects
- **20+ core commands** covering 80% of workflows
- **Progressive disclosure** reduces context overhead
### Quality Improvements
- **Consistent code review** quality
- **Automated testing** coverage
- **Standardized deployment** procedures
- **Comprehensive documentation** generation
## 🛠️ Integration
### MCP Server Support
- **Memory MCP** - Context persistence between sessions
- **Git MCP** - Version control integration
- **Filesystem MCP** - File operations and watching
- **Linear MCP** - Issue tracking integration
- **Notion MCP** - Documentation synchronization
### CI/CD Integration
- **GitHub Actions** support
- **Quality gate** enforcement
- **Automated testing** pipelines
- **Deployment automation**
## 📚 Examples
### Basic Usage
```bash
# Setup new project
/project:setup-environment
# Create a feature
/project:create-feature user-authentication --type=service
# Review code
/dev:code-review --focus=security,performance
# Deploy to staging
/deploy:deploy-staging
```
### Advanced Workflows
```bash
# Complex feature development
/project:create-feature payment-processing --framework=express --database=postgresql
# Comprehensive testing
/test:generate-tests --types=unit,integration,e2e
/test:coverage-analysis --target=90%
# Production deployment
/deploy:prepare-release --type=major
/deploy:deploy-staging --validate
/deploy:rollback-procedure --preserve-data
```
## 🤝 Contributing
1. Fork the repository
2. Create feature branch: `git checkout -b feature/new-command`
3. Add your command following the XML structure
4. Include comprehensive examples and tests
5. Update documentation
6. Submit pull request
## 📄 License
MIT License - see [LICENSE](LICENSE) file for details.
## 🙏 Acknowledgments
Special thanks to the Claude Code community for their contributions, feedback, and the open-source projects that make this framework possible.
**Community Contributors:** This framework has been shaped by valuable feedback from the Reddit community. See our [Community-Driven Improvements](https://gitlab.com/thirteenth_mang/claude-modular/-/issues/1) tracking issue for transparency on how community suggestions become features.
## 💝 Support This Project
If this framework has saved you time or improved your workflow, consider supporting its continued development:
### ☕ Buy Me a Coffee
[](https://ko-fi.com/thirteenth_mang)
Your support helps:
- 🔧 **Maintain and improve** the framework
- 📚 **Create better documentation** and examples
- 🚀 **Develop new features** based on community feedback
- 🛠️ **Fix issues** and provide timely support
### 🌟 Other Ways to Support
- **Star this repository** to help others discover it
- **Share with your team** and development community
- **Contribute improvements** through pull requests
- **Report issues** to help improve the framework
### 📞 Get Help & Support
- **Issues**: [GitLab Issues](https://gitlab.com/thirteenth_mang/claude-modular/-/issues)
- **Discussions**: [GitLab Discussions](https://gitlab.com/thirteenth_mang/claude-modular/-/issues)
- **Documentation**: [GitLab Wiki](https://gitlab.com/thirteenth_mang/claude-modular/-/wikis/home)
- **Community**: Join our growing community of developers using modular Claude Code
---
**Start building better, faster, and more consistently with Claude Code's modular framework.**Related Skills
Frontend Typescript Linting.mdc
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend li...
2. Apply Deepthink Protocol (reason about dependencies
risks