skills/code-quality-audit/SKILL.md
Comprehensive code quality audit that combines ruthless analysis with a solution-focused refactoring roadmap. Reads source code files, produces a brutal audit report with per-file quality scores, and generates prioritized refactoring improvements.
npx skillsauth add harshitsinghbhandari/domain-expansion code-quality-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides two-phase code quality review:
Both outputs are produced in a single run, enabling teams to understand what's broken in their implementation and how to fix it systematically.
Explicit triggers only. This skill activates ONLY when the user explicitly mentions:
Required input: User must provide or reference source code files (e.g., Python, JS, Go, etc.) or a directory. If no files are provided, respond normally and politely request: "Please provide the source code files you'd like audited."
File format: All audited content is source code. Do NOT attempt to run static analysis tools if not available, rely on your deep understanding of code principles.Keep both files in code-audit folder.
audit.md)The audit phase adopts a no-nonsense, penetrating analytical approach:
Generate audit.md with this exact structure:
# Code Quality Audit Report
## Executive Summary
- **Overall Score**: X/1000
- **Maintainability Verdict**: [Maintainable / Requires Refactoring / Unmaintainable (Rewrite Suggested)]
- **Primary Strengths**: ...
- **Critical Weaknesses**: ...
## File/Component Scores
| File/Path | Score /100 | Assessment |
|-----------|------------|------------|
| [file] | [score] | [one-line verdict] |
## Detailed Findings
### Complexity & Duplication
[Findings on cognitive complexity, overly nested loops, long methods, DRY violations]
### Style & Convention Adherence
[Analysis of naming conventions, consistency, idiomatic usage (e.g., Pythonic code)]
### Readability & Maintainability
[Assessment of self-documenting code vs over-reliance on comments, clarity of logic]
### Performance Anti-patterns
[O(N^2) loops where O(N) is possible, memory leaks, inefficient data structures]
### Security & Error Handling
[Swallowed exceptions, hardcoded secrets, injection vectors, poor validation]
## Final Verdict
[Summary of overall health and whether major refactoring is needed]
Per-file scores (/100):
Overall score (/1000):
Evaluation criteria:
if/else block makes unit testing impossible and violates Open/Closed principle").improvements.md)The improvements phase adopts a calm, methodical, strategic mindset:
Generate improvements.md with this exact structure:
# Refactoring Improvements Roadmap
## Critical Refactors
[Issues that must be fixed immediately; they block extensibility, hurt performance, or cause bugs]
### Refactor: [Name]
- **Location**: [File/line reference]
- **Problem**: [Clear description]
- **Impact**: [Why this is critical]
- **Suggested Approach**: [Solution outline, with short code snippet if useful]
## Medium Priority Improvements
[Issues that degrade quality or maintainability over time]
### Refactor: [Name]
- **Location**: [File/line reference]
- **Problem**: [Clear description]
- **Impact**: [Why this matters]
- **Suggested Approach**: [Solution outline/Snippet]
## Nice-to-Have Enhancements
[Modernization, type-hinting improvements, or minor style polishes]
### Enhancement: [Name]
- **Location**: [File/line reference]
- **Description**: [What could be improved]
- **Benefit**: [Why it's worth doing]
- **Suggested Approach**: [Solution outline]
audit.md with ruthless, systematic code breakdown.improvements.md with solution-focused refactoring roadmap.development
Aggressive user-flow and boundary-bug analysis on a diff or branch. Auto-detects entry points, traces flows through changed code, finds every seam (cross-module calls, serialization, file I/O, shared state, schema versioning, network/IPC), and refuses to mark the work complete until each unverified boundary has a real round-trip test or an explicit written out-of-scope record persisted in an audit file. Use whenever the user says "boundary check", "seam check", "round-trip check", "flow boundaries", "user-flow check", "before merge", "is this safe to ship", "pre-merge gate", "boundary bugs", "verify the joins", or asks to validate cross-module joins, producer/consumer contracts, or end-to-end coverage of a change. Also use as a final gate from pr-review on any diff that touches more than one file, module, or process. Be pushy. Most surviving production bugs live at seams, not inside units — if the diff crosses any boundary, this skill almost certainly applies.
development
Run existing work through 5 specialist craftspeople who each produce an improved version, then peer-review and synthesize the best into a single improved artifact. Use when the user says "forge this", "improve this", "make this better", "level this up", "refine this", or asks for multi-angle improvement on code, copy, strategy, plans, designs, or any artifact where the current version works but could be significantly better. Do NOT use for decisions (use llm-council), simple edits, or creation from scratch.
development
Expert skill for maintaining a Keep a Changelog formatted CHANGELOG.md file. Use this skill whenever you add features, fix bugs, or release a new version. You MUST use this skill to record any changes that have a user-facing impact. It handles categorization (Added, Changed, Fixed, etc.), semantic versioning, and reverse-chronological ordering with surgical precision.
development
Comprehensive test suite audit that combines ruthless analysis with a solution-focused roadmap. Reads test suites (unit, integration, e2e) and source code, produces a brutal audit report of test quality and gaps, and generates prioritized testing improvements.