A comprehensive development framework and best practices collection for working with Claude Code on various technology stacks.
This repository contains structured guidelines, best practices, and tools for efficient software development with Claude Code. It provides technology-specific guidance, workflow automation, and quality assurance processes.
The framework now includes an intelligent session management system that:
- Prevents conversation limit issues with health monitoring (π’ Healthy β π‘ Approaching β π΄ Handover)
- Enables seamless handovers between Claude sessions
- Tracks work context including mode, scope, and task progress
- Integrates with existing workflow for continuous development
Try it: Start any conversation with <Health-Check> to see session status!
.
βββ .claude/
β βββ best_practices/ # Technology-specific best practices
β β βββ angular-best-practices.md
β β βββ api-design-best-practices.md
β β βββ apostrophe-best-practices.md
β β βββ database-best-practices.md
β β βββ docker-best-practices.md
β β βββ java-best-practices.md
β β βββ logging-monitoring-best-practices.md
β β βββ nodejs-best-practices.md
β β βββ php-best-practices.md
β β βββ python-best-practices.md
β β βββ security-best-practices.md
β β βββ mcp-best-practices.md
β βββ commands/
β β βββ jira.md
β β βββ fix-github-issues.md
β β βββ document.md
β β βββ health-check.md # Session health monitoring
β βββ config/ # Team configurations
β β βββ examples/ # Example configurations
β β βββ config-schema.yaml
β β βββ default-config.yaml
β β βββ load-config.sh
β βββ guides/ # How-to guides
β β βββ customization-guide.md
β β βββ session-management-guide.md
β βββ session/ # Session state management
β β βββ current-session.yaml
β βββ templates/ # Project templates
β βββ code-review-checklist.md
β βββ pull-request-template.md
β βββ task-spec-template.md
β βββ custom-best-practice-template.md
β βββ best-practice-addendum-template.md
β βββ team-quick-reference.md
β βββ migration-guide-template.md
β βββ handover-template.md # Session handover documentation
βββ claude_code_changes/ # Session change tracking
βββ scripts/ # Utility scripts
β βββ setup-dev-env.sh # Development environment setup
β βββ customize-framework.sh # Interactive customization tool
β βββ validate-best-practices.sh # Validation tool for customizations
βββ tasks/ # Task specifications and implementations
β βββ specs/ # Task specification documents
βββ CLAUDE.md # Main Claude Code guidelines
βββ README.md # This file
-
Clone the repository:
git clone <repository-url> cd claude_code_stuffs
-
Set up development environment: This only applies if it is a new project and fits with your workflow.
./scripts/setup-dev-env.sh
-
Customize for your team (optional but recommended):
./scripts/customize-framework.sh
-
Review the main guidelines:
- Read
CLAUDE.mdfor core development principles - Check relevant technology-specific guides in
.claude/best_practises/
- Read
- Health Monitoring: Automatic tracking of conversation length with visual indicators
- Smart Handovers: Generate comprehensive handover documents when approaching limits
- Mode Switching: DEBUG, BUILD, REVIEW, LEARN, RAPID modes for different contexts
- Scope Tracking: MICRO to EPIC classifications for work complexity
- Command Triggers:
<Health-Check>,<Handover01>, mode/scope commands - State Persistence: Maintains context across sessions in
.claude/session/
Comprehensive guides for:
- Frontend: Angular, JavaScript/TypeScript
- Backend: Node.js, Python, PHP, Java
- Infrastructure: Docker, Database (SQL/NoSQL)
- API Development: RESTful APIs, OpenAPI/Swagger
- CMS: ApostropheCMS
- Security: OWASP compliance, authentication, encryption
- Monitoring: Logging strategies, performance monitoring
- MCP Tools: Model Context Protocol, version management, tool integration
- JIRA Integration: Structured task management
- Git Workflow: Branch naming, commit conventions
- Change Tracking: Automatic session documentation
- Test-Driven Development: TDD methodology and practices
- Security Best Practices: OWASP Top 10 compliance checklist
- Code Quality: Linting, testing, and review processes
- API Security: Authentication, rate limiting, CORS
- Database Security: Query parameterization, encryption
- Config Directory:
.claude/config/stores all team-specific settings - Example Configs: Pre-built configurations for startups, enterprises, and open source
- Config Schema: Validation schema for configuration files
- Config Loader: Shell script to load configurations as environment variables
- Best Practice Template: Create new technology-specific best practices
- Addendum Template: Add team customizations without modifying originals
- Quick Reference: One-page team reference guide
- Migration Guide: Template for teams transitioning from other frameworks
Environment-specific logging strategies:
- Development: Verbose console and file logging
- Production: Error-only logging with monitoring integration
The best practices files in .claude/best_practices/ provide comprehensive defaults based on industry standards. However, these files are meant to be customized to match your team's specific workflows and requirements.
π Quick Start: Run ./scripts/customize-framework.sh for an interactive setup that customizes practices based on your team's needs.
π Manual Customization: See the Customization Guide for detailed instructions.
β
Validate Customizations: Run ./scripts/validate-best-practices.sh to check your customizations for errors and consistency.
Feel free to edit these files to:
- Add project-specific conventions
- Modify guidelines to match your team's practices
- Include company-specific requirements
- Remove sections that don't apply to your use case
When working with Claude Code, the session management system helps prevent conversation limit issues:
-
Start with a health check:
<Health-Check>This shows your session status and sets appropriate mode/scope.
-
Monitor session health:
- π’ Healthy (0-30 messages): Continue normally
- π‘ Approaching (31-45 messages): Plan for handover
- π΄ Handover Now (46+ messages): Generate handover immediately
-
Switch modes as needed:
MODE: DEBUG # For troubleshooting MODE: BUILD # For implementation MODE: REVIEW # For code review MODE: RAPID # For quick responses -
Generate handover when needed:
<Handover01>This creates a comprehensive handover document for the next session.
For detailed information, see the Session Management Guide.
-
Start with session initialization:
<Health-Check> Please retrieve the task from Jira MCP with the ID TASK-123 and proceed to create documentation for it. -
Create implementation:
Create implementation from TASK-123 -
Track your changes:
- Claude Code automatically creates session files in
claude_code_changes/ - Format:
claude_changes_YYYY-MM-DD_HH-MM.txt - Session state tracked in
.claude/session/current-session.yaml
- Claude Code automatically creates session files in
-
Test your code in real-world cases
Do your usual testing. Since I recommend always having a separate branch for each task, you can easily view the changes using Git Diff in any visual editor. This allows you to see what needs testing, what has been affected, and to apply your programming skills accordingly. Of course, test it and code it until it works. -
Linting and retest
Sometimes linting modifies files, so you will need to review the changes and retest your code. -
Commit
Commit your changes, push them, and create a pull request (PR) in Git, or merge directly into the develop/main branch (depending on your workflow). You can also request a version tag if needed. Use any Git commands you typically work with. -
Create Jira Comment/Change status
Ask Claude to add a comment summarizing the work youβve done. You can also ask to log the time spent or change the task status so it moves to QA for review.
- Only commit when explicitly requested
- Use clear, descriptive commit messages
- Include task IDs in branch names
- Run linters before committing
- Write tests before implementation (TDD)
- Document API endpoints
- Follow technology-specific conventions
- Never commit secrets or credentials
- Use environment variables for configuration
- Implement proper authentication and authorization
- Follow OWASP guidelines
- Development: Console + error logs for debugging
- Production: No console output unless configured
- Use structured logging with appropriate levels
- Include request IDs for tracing
- Follow the established patterns in existing files
- Update relevant documentation when adding features
- Test all changes thoroughly
- Create pull requests with detailed descriptions
[Your License Here]
For questions or issues, please refer to the project's issue tracker or contact the development team.