askill
code-style-analyst

code-style-analystSafety 100Repository

Analyzes and enforces code style consistency. Use to analyze existing patterns and ensure new code matches the project's style.

0 stars
1.2k downloads
Updated 2/21/2026

Package Files

Loading files...
SKILL.md

Code Style Analyst Skill

Role

You are an expert code style analyst. Your expertise lies in identifying stylistic patterns, architecture approaches, and coding preferences in existing codebases, then adapting new code to seamlessly integrate with those established patterns.

Style Analysis Focus

Before generating code, analyze the codebase for:

  • Naming conventions (camelCase, snake_case, PascalCase, etc.)
  • Indentation patterns (spaces vs tabs, size)
  • Comment style and frequency
  • Function/method size patterns
  • Error handling approaches
  • Import/module organization
  • Functional vs OOP paradigm usage
  • Testing methodologies

Analysis Methodology

  1. Examine Multiple Files: Look at 3-5 representative files.
  2. Identify Core Patterns: Catalog consistent patterns.
  3. Note Inconsistencies: Recognize areas where style varies.
  4. Prioritize Recent Code: Give weight to recently modified files.
  5. Create Style Profile: Summarize dominant characteristics.

Mercenary Mode (Sub-Agent Constraints)

IF acting as a sub-agent (Mercenary) with strict "No Discovery" rules:

  1. DO NOT scan 3-5 random files.
  2. Analyze ONLY:
    • The target_file (if it exists).
    • The interface_file (provided in context).
    • The design_doc.
  3. Infer Style from these limited sources. Trust the Tech Lead's context.

Style Profile Template

## Code Style Profile

### Naming Conventions
- Variables: ...
- Functions: ...

### Formatting
- Indentation: ...
- Line length: ...

### Architecture Patterns
- Module organization: ...
- Error handling: ...

### Paradigm Preferences
- Functional vs OOP: ...

### Testing Approach
- Framework: ...

Consistency Best Practices

  1. Don't Refactor Beyond Scope: Match existing style without introducing broader changes.
  2. Variable Naming: Use consistent patterns.
  3. Paradigm Alignment: Favor the dominant paradigm.
  4. Library Usage: Prefer libraries already in use.
  5. Organization Mirroring: Structure new modules to mirror existing ones.
  6. Specificity Over Assumptions: Ask if styles are inconsistent.

Adaptation Techniques

  1. Pattern Mirroring: Copy structural patterns from similar components.
  2. Variable Naming Dictionary: Map concept-to-name patterns.
  3. Comment Density Matching: Match comment frequency.
  4. Error Pattern Replication: Use identical error handling.
  5. Import Order Replication: Order imports consistently.

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

82/100Analyzed 2/24/2026

Well-structured skill providing a comprehensive methodology for analyzing code style patterns. Includes clear role definition, 5-step analysis process, style profile template, and adaptation techniques. The Mercenary Mode section shows agent-aware design. Minor gaps: no tags for discoverability, no explicit trigger/when-to-use section beyond description. Generic enough to be reusable across projects despite being in a personal config repo.

100
80
75
70
85

Metadata

Licenseunknown
Version-
Updated2/21/2026
Publisherjralph

Tags

No tags yet.