aiskillstore/marketplace/code-style-enforcer
Claude Code and agent skill by aiskillstore/marketplace
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Author "aiskillstore" has blocked skill(s)
Analyzes code for style consistency and applies project-specific formatting conventions beyond what linters catch. Use when reviewing code, ensuring style consistency, or when user requests code style improvements.
Install
npx vskill@latest install aiskillstore/marketplace/code-style-enforcerSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as aiskillstore/marketplace/code-style-enforcer.
Code Style Enforcer
This skill ensures code follows project-specific style conventions and patterns that automated linters may miss.
When to Use This Skill
- User requests code style review or improvements
- Ensuring consistency across the codebase
- Onboarding new code or contributors
- Pre-commit code review
- User mentions "style", "consistency", "formatting", or "conventions"
Instructions
1. Detect Project Style Guides
Look for style configuration files:
JavaScript/TypeScript:
.eslintrc.*- ESLint configuration.prettierrc.*- Prettier configurationtsconfig.json- TypeScript compiler options.editorconfig- Editor configuration
Python:
.pylintrc,pylint.cfg- Pylintpyproject.toml- Black, isort configuration.flake8- Flake8 configurationsetup.cfg- Various tool configs
Ruby:
.rubocop.yml- RuboCop configuration
Go:
go.fmtenforced (standard).golangci.yml- GolangCI-Lint
Java:
checkstyle.xml- Checkstyle.editorconfig
General:
CONTRIBUTING.md- Contribution guidelinesSTYLE_GUIDE.md- Project style guide.editorconfig- Cross-editor settings
Use Glob to find these files and Read to understand the project's style preferences.
2. Analyze Existing Code Patterns
Sample existing code to understand implicit conventions:
File organization:
- Directory structure patterns
- File naming conventions (camelCase, kebab-case, snake_case)
- Import/export organization
Code structure:
- Class/function ordering
- Public vs private method placement
- Constant/variable declaration location
Formatting:
- Indentation (spaces vs tabs, size)
- Line length limits
- Blank line usage
- Comment styles
Naming:
- Variable naming (camelCase, snake_case)
- Class naming (PascalCase, capitalization)
- Constant naming (UPPER_CASE, etc.)
- File naming patterns
Use Grep to find common patterns across similar files.
3. Beyond Linters: Check for Patterns
Focus on style issues that automated tools often miss:
Naming Consistency:
- Boolean variables:
is,has,shouldprefixes - Event handlers:
handle*,on*patterns - Getters/setters:
get*,set*consistency - Collection naming: plural vs singular
- Acronyms: consistent capitalization
Code Organization:
- Related functions grouped together
- Consistent file structure across modules
- Logical ordering (public before private, etc.)
- Separation of concerns
Comments and Documentation:
- JSDoc/docstring completeness
- Comment style consistency
- TODO/FIXME format
- Inline vs block comments
Import/Export Patterns:
- Import ordering (external, internal, relative)
- Named vs default exports
- Destructuring consistency
- Aliasing patterns
Error Handling:
- Consistent error message format
- Error class usage
- Try/catch patterns
- Logging format
Type Usage (TypeScript/typed languages):
- Explicit vs inferred types
interfacevstypepreference- Generic naming (T, K, V vs descriptive)
- Null/undefined handling
4. Identify Common Anti-Patterns
Flag code smells and anti-patterns:
Magic Numbers:
Inconsistent null checks:
Nested ternaries:
Long parameter lists:
5. Check Project-Specific Conventions
Look for patterns unique to this project:
- Custom naming for specific domains (e.g., "repo" vs "repository")
- Preferred libraries for common tasks
- Architectural patterns (MVC, service layer, etc.)
- Test file naming and structure
- Configuration patterns
Read CONTRIBUTING.md, README.md, or similar docs for explicit guidelines.
6. Generate Style Recommendations
For each issue, provide:
Current code:
Issue:
- Inconsistent naming (
getDatavs other functions usefetch*) - Single-letter variable name (
d) - String concatenation instead of template literals
Recommended:
7. Prioritize Issues
Order by impact:
High Priority (Consistency):
- Naming inconsistencies across similar functions
- Mixed indentation or formatting
- Inconsistent error handling
Medium Priority (Readability):
- Magic numbers/strings
- Unclear variable names
- Missing documentation
Low Priority (Nice-to-have):
- Comment formatting
- Import ordering
- Extra blank lines
8. Suggest Automated Tools
Recommend tools to enforce styles:
JavaScript/TypeScript:
Python:
Go:
Ruby:
9. Create or Update EditorConfig
Suggest .editorconfig if missing:
10. Style Review Checklist
When reviewing code for style:
- [ ] Naming follows project conventions
- [ ] Indentation and formatting consistent
- [ ] Imports organized properly
- [ ] Comments where needed, not excessive
- [ ] No magic numbers or strings
- [ ] Error handling consistent
- [ ] File organization matches project structure
- [ ] No obvious code smells
- [ ] Type annotations consistent (if applicable)
- [ ] Tests follow testing conventions
Best Practices
- Consistency over perfection: Follow existing patterns even if not ideal
- Document decisions: Add style guides for ambiguous cases
- Automate where possible: Use Prettier, Black, gofmt, etc.
- Be pragmatic: Don't refactor working code just for style
- Team agreement: Align on styles that matter
- Incremental improvement: Fix styles in touched files, not all at once
- Readability first: Style serves readability, not vice versa
Common Style Conflicts
Tabs vs Spaces
- Check
.editorconfigor existing files - When in doubt, use project majority
Quote Style (Single vs Double)
- JavaScript: Single (
') common - Python: Either, be consistent
- Go: Always double (
") - Follow linter config if present
Semicolons (JavaScript)
- Check existing code majority
- If mixed, suggest Prettier to enforce
Line Length
- Common limits: 80, 100, 120 characters
- Check linter config or
.editorconfig
Import Ordering
- Usually: stdlib, external, internal, relative
- Use automated tools (isort, organize imports)
Supporting Files
reference/style-guides.md: Links to popular style guidesexamples/before-after.md: Code examples showing improvements
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/crazydubya/code-style-enforcer/SKILL.md
Popularity
- Repository stars
- 429
- Repository forks
- 45
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aiskillstore/marketplace/code-style-enforcer)