coding-conventions
Automatically apply standard coding conventions when writing or modifying code. Use this skill when working with Python, TypeScript, JavaScript, Go, PHP, or creating git commits. Triggers include writing new code, refactoring existing code, or committing changes in supported languages.
When & Why to Use This Skill
This Claude skill automates the enforcement of industry-standard coding conventions (such as PEP 8, Airbnb Style Guide, and PSR) during the development process. It ensures that every line of code and every git commit adheres to professional standards, significantly reducing technical debt and improving team collaboration through consistent formatting, naming, and documentation.
Use Cases
- Standardizing Python codebases: Automatically refactoring scripts to comply with PEP 8 requirements for better readability and maintainability.
- Enforcing Frontend Styles: Applying Airbnb or Google style guides to TypeScript and JavaScript files to maintain consistency across large-scale web projects.
- Automating Git Workflow: Generating structured commit messages using the Conventional Commits format (feat, fix, docs) to improve changelog clarity and versioning.
- Cross-Language Refactoring: Maintaining uniform standards when switching between Go, PHP, and Node.js environments within polyglot repositories.
- Legacy Code Modernization: Updating older PHP projects to meet modern PSR standards for better interoperability.
| name | Coding Conventions |
|---|---|
| description | Automatically apply standard coding conventions when writing or modifying code. Use this skill when working with Python, TypeScript, JavaScript, Go, PHP, or creating git commits. Triggers include writing new code, refactoring existing code, or committing changes in supported languages. |
Coding Conventions
Supported Languages
- Python - PEP 8
- TypeScript - Google & Microsoft Style Guide
- JavaScript - Airbnb Style Guide
- Go - Effective Go & Google Style Guide
- PHP - PSR Standards
- Git Commits - Conventional Commits
Workflow
When writing or modifying code:
- Identify the language of the file being edited
- Read the appropriate convention file from
references/directory - Apply conventions consistently to naming, formatting, documentation, and organization
Convention Files
references/python-conventions.md- Python (PEP 8)references/typescript-conventions.md- TypeScriptreferences/javascript-conventions.md- JavaScript (Airbnb)references/golang-conventions.md- Goreferences/php-conventions.md- PHP (PSR)references/git-commit-conventions.md- Git commit format
Git Commit Quick Reference
Follow Conventional Commits format:
<type>(<scope>): <subject>
Common types: feat, fix, docs, style, refactor, test, chore
Rules:
- Imperative present tense: "add" not "added"
- Lowercase subject, no period
- Keep subject under 50 characters
- Include
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Example:
feat(auth): add user authentication
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
For complete git commit guidelines, see references/git-commit-conventions.md.
Priority Rules
- Project-specific conventions override language defaults
- Existing code style should be matched for consistency
- Automatic tools (ESLint, Prettier, gofmt) should be respected if configured
- Convention files provide the default standards