check-best-practices — Claude Code command: code standards review
The check-best-practices command reviews code against language-specific standards, conventions, and best practices. It spots issues from critical bugs to style violations and suggests concrete improvements.
MIT ★ 2,744 updated 2026-10-08
.claude/commands/check-best-practices.mdWhat check-best-practices does
The command identifies your code's language and framework, then applies relevant guidelines: PEP 8 for Python, ES6+ for JavaScript, TypeScript strict mode, React patterns. It checks naming, file organization, separation of concerns, error handling, caching, and test coverage.
Results are structured by priority — high, medium, low — with examples of current code and recommended fixes. The review prioritizes impactful changes over nitpicks and stays grounded in your project's existing patterns. It works best on complete functions, modules, or API endpoints; small snippets without context yield less useful feedback.
Output includes an overall score, key areas to improve, quick wins you can implement today, and longer-term architectural recommendations.
What it helps with
- verify Python code against PEP 8 and type hints
- spot ES6+ and async/await issues in JavaScript
- assess React component structure and state management
- review REST API design: naming, status codes, versioning
- strengthen error handling and logging practices
Example prompts for the agent
- Check if this Python code follows PEP 8
- Review this React component for best practices
- What issues would you flag in this REST API?
How to install check-best-practices
Manually: put the files in place
.claude/commands/check-best-practices.mdCall it with /check-best-practices. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/check-best-practices.mdCall it with /prompts:check-best-practices. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/check-best-practices.prompt.mdManually: put the files in place
.gemini/commands/check-best-practices.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about check-best-practices
How do I install check-best-practices in Claude Code?
Save the command file to .claude/commands/check-best-practices.md. Then call it with /check-best-practices in Claude Code or ask Claude to review your code for best practices.
What does check-best-practices do?
It analyzes your code against language standards and conventions — PEP 8 for Python, ES6+ for JavaScript, TypeScript strict mode. It flags issues by priority and provides specific improvements with code examples.
Which languages and frameworks does it support?
The command covers Python, JavaScript, TypeScript, React, Vue, Angular, and REST API design. Each gets its own set of guidelines, from code style to architecture patterns.
Source text
check-best-practices.md · MIT
# Check Best Practices Analyze code against language-specific best practices, coding standards, and community conventions to improve code quality and maintainability. ## Usage Examples ### Basic Usage "Check if this code follows Python best practices" "Review JavaScript code for ES6+ best practices" "Analyze React components for best practices" ### Specific Checks "Check if this follows PEP 8 conventions" "Review TypeScript code for proper type usage" "Verify REST API design best practices" "Check Git commit message conventions" ## Instructions for Claude When checking best practices: 1. **Identify Language/Framework**: Detect the languages and frameworks being used 2. **Apply Relevant Standards**: Use appropriate style guides and conventions 3. **Context Awareness**: Consider project-specific patterns and existing conventions 4. **Actionable Feedback**: Provide specific examples of improvements 5. **Prioritize Issues**: Focus on impactful improvements over nitpicks ### Language-Specific Guidelines #### Python - PEP 8 style guide compliance - PEP 484 type hints usage - Pythonic idioms and patterns - Proper exception handling - Module and package structure #### JavaScript/TypeScript - Modern ES6+ features usage - Async/await over callbacks - Proper error handling - Module organization - TypeScript strict mode compliance #### React/Vue/Angular - Component structure and organization - State management patterns - Performance optimizations - Accessibility considerations - Testing patterns #### API Design - RESTful conventions - Consistent naming patterns - Proper HTTP status codes - API versioning strategy - Documentation standards ### Code Quality Aspects #### Naming Conventions - Variable and function names - Class and module names - Consistency across codebase - Meaningful and descriptive names #### Code Organization - File and folder structure - Separation of concerns - DRY (Don't Repeat Yourself) - Single Responsibility Principle - Modular design #### Error Handling - Comprehensive error catching - Meaningful error messages - Proper logging practices - Graceful degradation #### Performance - Efficient algorithms - Proper caching strategies - Lazy loading where appropriate - Database query optimization - Memory management #### Testing - Test coverage adequacy - Test naming conventions - Test organization - Mock usage patterns - Integration vs unit tests ### Output Format Structure the analysis as: ```markdown ## Best Practices Review ### Summary - Language/Framework: [Detected stack] - Overall Score: X/10 - Key Areas for Improvement: [List] ### Excellent Practices Found - [Practice 1]: Brief explanation - [Practice 2]: Brief explanation ### Areas for Improvement #### High Priority 1. **[Issue Name]** - Current: `code example` - Recommended: `improved code` - Reason: Explanation of why this matters #### Medium Priority [Similar format] #### Low Priority [Similar format] ### Quick Wins - [Easy improvement 1] - [Easy improvement 2] ### Long-term Recommendations - [Strategic improvement 1] - [Strategic improvement 2] ``` Focus on: - Practical, implementable suggestions - Learning opportunities - Maintaining consistency with existing code - Balancing perfection with pragmatism
© centminmod · MIT · centminmod/my-claude-code-setup