Supercharge your Claude Code workflows with battle-tested command snippets and development patterns
A curated collection of powerful command snippets that transform how you work with Claude Code. These snippets establish clear patterns, workflows, and guardrails to help you write better code faster while maintaining high quality standards.
- ๐ก๏ธ Production-Ready: Battle-tested patterns for production codebases
- โก Efficiency Boost: Streamline repetitive workflows and enforce best practices
- ๐ฎ Full Control: Choose your level of autonomy from guided approval to full TDD
- ๐ Quality First: Built-in code review and quality checks
- ๐ Best Practices: Follows KISS, YAGNI, and DRY principles out of the box
Claude Code hooks allow you to automate repetitive tasks and enforce standards. Configure them in your .claude/settings.json
file.
- ๐จ
auto-prettier
- Automatically format code after every edit
- Create a
.claude
directory in your project root (if not exists) - Create or edit
.claude/settings.json
- Copy the hook configuration from the desired hook file
- Save and restart Claude Code
Example .claude/settings.json
:
{
"hooks": {
"PostToolUse": [
// Your hooks here
]
}
}
See the hooks/
directory for detailed configurations and examples.
The perfect companion to Claude's Plan Mode - while Plan Mode helps you strategize, Approval Mode gives you granular control over the actual implementation.
- Plan Mode: Claude creates a high-level implementation strategy
- Approval Mode: Takes that plan and breaks it into controlled, reviewable steps
- You Stay in Control: Guide the implementation, correct course when needed
- โ Step-by-Step Control: Review each implementation chunk before execution
- ๐ Detailed Previews: See exactly what will change before it happens
- ๐ Course Correction: Redirect Claude if implementation drifts from intent
- ๐ก๏ธ Safety First: Prevent unintended modifications to critical code
- ๐ฏ Thoughtful Implementation: Uses sequential thinking for each major step
- Creating/deleting files or folders
- Installing packages or dependencies
- Major refactoring (>20 lines)
- Git operations
- Database changes
- Each feature implementation chunk
Use when: After planning phase, working on production code, implementing complex features, or when you need to ensure implementation matches your exact requirements
Get professional-grade code reviews with focus on:
- ๐ Security vulnerabilities and best practices
- ๐๏ธ Architecture and design patterns
- ๐ Performance optimization opportunities
- ๐งน Code quality and maintainability
- ๐ Documentation completeness
Use when: Before merging PRs, after major features, or for code audits
Enforces strict TDD with the classic Red-Green-Refactor cycle:
- ๐ด Red: Write failing tests first
- ๐ข Green: Implement minimal code to pass
- ๐ Refactor: Improve code while tests stay green
- ๐ซ No implementation without tests
Use when: Building new features, ensuring high test coverage, or learning TDD
claude-code-snippets/
โโโ commands/
โ โโโ approval-mode.md # Controlled development workflow
โ โโโ review.md # Code review command
โ โโโ tdd.md # Test-driven development
โโโ claudefiles/
โ โโโ CLAUDE_USER.md # Global development principles
โโโ hooks/
โ โโโ auto-prettier.md # Auto-format code after edits
โโโ README.md # This file
CLAUDE_USER.md
: Core development principles including:- KISS, YAGNI, DRY principles for maintainable code
- Testing Philosophy: Behavior-focused testing, no implementation details
- Communication Guidelines: Clear, proactive communication
- Over-engineering Prevention: Red flags and best practices
- Browse the
commands/
directory - Copy the content of your desired command
- Paste it in your Claude Code conversation
- Start with the command, e.g.,
/approval-mode
For consistent development practices across all projects:
# Create Claude configuration directory
mkdir -p ~/.claude
# Copy global principles
cp claudefiles/CLAUDE_USER.md ~/.claude/CLAUDE.md
Now these principles apply to all your Claude Code sessions!
User: /approval-mode
Claude: Approval mode activated. I'll request your approval before making changes.
User: Add error handling to the payment processor
Claude: I'll add error handling. Here's my plan:
1. Add try-catch blocks around payment API calls
2. Implement retry logic for transient failures
3. Add proper error logging
Shall I proceed with these changes? [yes/no]
User: /review
Claude: I'll perform a comprehensive code review. Starting analysis...
[Reviews code for security, performance, maintainability, etc.]
We welcome contributions! Here's how you can help:
- ๐ Report Issues: Found a bug or have a suggestion? Open an issue
- ๐ก Share Snippets: Have a useful workflow? Submit a PR!
- ๐ Improve Docs: Help us make the documentation even better
- โญ Star & Share: If you find this helpful, star the repo and share with others
- Follow the existing format for new commands
- Test your snippets thoroughly
- Include clear use cases and examples
- Keep commands focused on a single workflow
"The approval mode snippet saved our production database from an accidental migration. Can't imagine working without it!" - Senior Developer
"TDD mode helped our team increase test coverage from 40% to 85% in just two sprints." - Tech Lead
MIT License - Use these snippets freely in your projects and share with your team!
Made with โค๏ธ by developers, for developers
โญ Star us on GitHub