# Audit Code Style with Auto-Fix

Style drift makes code reviews slower and less consistent. This skill guides Claude, Codex, or Claude Code through scans, reports, safe fixes, and validation.

## Install

```bash
npx skillstore add dnyoussef/when-auditing-code-style-use-style-audit
```

## Metadata

- Status: approved
- Slug: dnyoussef-when-auditing-code-style-use-style-audit
- Version: 1.0.0
- Author version: 1.0.0
- Skillstore revision: r1
- Version status: valid
- Tree hash: 5e0aaab03f76e0f444290ee1c3cb931b68464a743df2cb1dcfc281484842bb55
- Author: DNYoussef
- GitHub username: DNYoussef
- License: MIT
- Repository: https://github.com/DNYoussef/ai-chrome-extension/tree/main/.claude/skills/testing-quality/when-auditing-code-style-use-style-audit
- Ref: c579efd02184f1128d6741d16e6c8d951d7d4208
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/dnyoussef-when-auditing-code-style-use-style-audit
- Manifest: https://skillstore.pages.dev/api/skills/dnyoussef-when-auditing-code-style-use-style-audit/manifest

## Capabilities

- Runs ESLint, Prettier, and TypeScript checks described in the workflow.
- Compares project rules against documented standards and common defaults.
- Groups violations by priority, rule, file, and fix type.
- Applies ESLint and Prettier auto-fixes with backup guidance.
- Validates results with linting, tests, build checks, and compliance thresholds.

## Use Cases

- Clean Up Before Review: Run a dry style scan before opening a pull request and fix formatting issues early.
- Create Team Standards Report: Compare lint, formatting, and TypeScript settings against documented standards for planning work.
- Add Style Gate to CI: Use the compliance threshold and report outputs to build a repeatable style check.

## Prompt Templates

### Scan Without Changes

```
Use style-audit to scan this repository for ESLint, Prettier, TypeScript, naming, and organization issues. Report findings only.
```

### Compare Project Standards

```
Use style-audit to compare this project with its documented coding standards. List missing rules, conflicts, and clear recommendations.
```

### Apply Reviewed Fixes

```
Use style-audit to create a backup, apply only safe ESLint and Prettier fixes, then show remaining manual work.
```

### Build CI Compliance Plan

```
Use style-audit to design a CI style gate with a compliance threshold, required reports, and failure criteria.
```

## Limitations

- Best suited to JavaScript and TypeScript projects with npm tooling.
- Auto-fix steps can modify files and require review before commit.
- Naming changes need reliable reference checks before renaming files.
- Compliance scores depend on project configuration and may need tuning.

## Best Practices

- Start with a dry scan before enabling auto-fix.
- Review generated changes before committing the result.
- Pin tool versions in the project for repeatable results.

## Anti Patterns

- Running auto-fix without a backup or version control state.
- Treating sample compliance numbers as project truth.
- Renaming files before checking imports and references.

## Security Audit

- Audited at: 2026-07-05T13:47:58.188\+00:00
- Summary: Reviewed all 216 static findings against SKILL.md, README.md, and PROCESS.md. The detections are false positives from Markdown fences, command examples, local linting scripts, and expected project file operations. No prompt injection, credential access, exfiltration, or malicious intent was found.

## Stats

- Views: 189
- Downloads: 9
- Favorites: 0
- Popularity score: 0
