project-standards
Apply project coding standards, conventions, and best practices. Activate when writing or reviewing code.
When & Why to Use This Skill
This Claude skill automates the enforcement of project-specific coding standards, naming conventions, and best practices. It ensures codebase consistency by providing real-time guidance during code generation and review, helping teams maintain high-quality, readable, and testable code while adhering to conventional commit standards and architectural patterns.
Use Cases
- Standardizing naming conventions: Automatically apply camelCase for variables and PascalCase for components during development to maintain repository consistency.
- Code quality enforcement: Ensure functions remain modular and focused by flagging code blocks that exceed 50 lines or contain deep nesting beyond three levels.
- Automated documentation checks: Verify that all public APIs include necessary JSDoc or docstrings to improve codebase maintainability and developer onboarding.
- Commit message validation: Guide developers to follow the Conventional Commits specification (feat, fix, docs) for a cleaner and more searchable version history.
- Safety guardrails: Prevent unauthorized or accidental modifications to sensitive files such as .env, lock files, and database migrations.
| name | project-standards |
|---|---|
| description | Apply project coding standards, conventions, and best practices. Activate when writing or reviewing code. |
Project Standards Skill
This skill ensures code follows the project's established patterns and conventions.
When to Use
Activate this skill when:
- Writing new code in this repository
- Reviewing or modifying existing code
- Setting up new components or modules
- Implementing features or fixing bugs
Coding Conventions
General Rules
- Follow existing code patterns in the repository
- Use consistent naming conventions
- Write self-documenting code with clear variable names
- Add JSDoc/docstrings for public APIs
- Prefer explicit over implicit
Naming Conventions
- Variables/Functions: camelCase
- Classes/Components: PascalCase
- Constants: SCREAMING_SNAKE_CASE
- Files: kebab-case
Code Style
- Use consistent indentation (2 spaces recommended)
- Keep functions focused and small (<50 lines)
- Prefer composition over inheritance
- Avoid deep nesting (max 3 levels)
Testing Requirements
- Write unit tests for new functionality
- Ensure tests pass before committing:
npm test - Include edge cases in test coverage
- Use descriptive test names
Commit Standards
Use conventional commits:
feat:new featuresfix:bug fixesdocs:documentation changesrefactor:code improvementstest:test additions/changeschore:maintenance tasks
Verification Commands
npm test # Run tests
npm run lint # Check code style
npm run build # Verify build
Files to Avoid
Never modify without explicit permission:
.envfiles (contain secrets)- Lock files (package-lock.json, yarn.lock)
- Generated files in dist/ or build/
- Migration files (create new ones instead)