| name | code-style-validator |
| description | Programmatic code style validation using AST analysis. Complements (not replaces) code-style rules by providing automated checking and instant feedback. |
| version | 1.1.0 |
| model | haiku |
| invoked_by | both |
| user_invocable | true |
| tools | ["Read","Grep","Bash","Glob"] |
| best_practices | ["Use AST analysis for accurate validation","Provide auto-fix suggestions","Integrate with pre-commit hooks"] |
| error_handling | graceful |
| streaming | supported |
| verified | true |
| lastVerifiedAt | "2026-02-22T00:00:00.000Z" |
| source | builtin |
| trust_score | 100 |
| provenance_sha | 3c302af23964a90d |
Installation
No separate download: the skill runs the in-repo tool .claude/tools/cli/security-lint.cjs.
- Ensure Node.js (v18+) is installed: nodejs.org or
winget install OpenJS.NodeJS.LTS (Windows), brew install node (macOS).
- From the project root, the script is invoked automatically; no extra install steps.
Cheat Sheet & Best Practices
AST-based validation: Use ESLint (or equivalent) with selectors/patterns; rules listen for specific node types. Prefer existing community rules before writing custom ones; custom rules need meta (type, fixable, schema) and create.
Process: Check naming (camelCase/PascalCase/snake_case), indentation, import order, function/class structure, comment style. Run in pre-commit and CI; provide auto-fix where possible.
Hacks: Use --fix for auto-fixable rules; combine with security-lint for policy. Define rule metadata clearly for docs and tooling. Use AST selectors for precise pattern matching (node type, attributes, child/sibling).
Certifications & Training
ESLint: Use in project, custom rules, selectors. No cert; skill data: AST-based validation, pre-commit/CI, auto-fix, naming/indent/imports.
Hooks & Workflows
Suggested hooks: Pre-commit: run security-lint (skill script) or ESLint; block commit on failure. Use with developer (secondary), code-reviewer (secondary), qa (CI).
Workflows: Use with code-reviewer (secondary), developer (secondary). Flow: before commit or in CI → run validator → fix or block. See code-review-workflow.md, validation hooks.
Code Style Validator - Programmatically validates code style using AST (Abstract Syntax Tree) analysis. Complements code-style rules by providing automated checking.
- Before committing code
- In pre-commit hooks
- During code review
- In CI/CD pipelines
- To enforce consistent code style
Step 1: Identify Code Style Patterns
Analyze the codebase to identify style patterns:
- Naming conventions (camelCase, PascalCase, snake_case)
- Indentation style (spaces vs tabs, width)
**TypeScript/JavaScript AST Validation**:
1. **Complement, Don't Replace**: This tool complements code-style rules, doesn't replace them
2. **Configurable Rules**: Allow teams to customize validation rules
3. **Auto-fix When Possible**: Provide auto-fix suggestions for common issues
4. **Fast Feedback**: Provide instant feedback during development
5. **Clear Messages**: Show clear error messages with line numbers and suggestions