Code Quality Audit

    by Artak Kolyan

    1

    Execute internal code quality audits with local progress tracking and timestamped delta reports.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Code Quality Audit

    Example session with this skill installed

    /han-code-quality-audit run modularity and complexity on the current repo

    • Read your context and instructions
    • Compiled the code quality audit

    Audit started for 2 properties. **Progress URL:** http://localhost:8080/han-code-quality-audit/2025-05-20T101500 I have completed the audit for Modularity and Complexity. The reports are available in `han-code-quality-audit/2025-05-20T101500/`. ## 08.Complexity.2025-05-20T101500.md - Run: 2025-05-20T101500 - Kind: baseline - Previous: none - Evidence: source code and tool output only This report analyzes cyclomatic complexity and nesting depth across the `src/core` and `src/api` trees. The analysis focused on functions exceeding a 15-point complexity threshold as reported by internal tooling. ## Index | | Where | Hardness | Problem | | --- | --- | --- | --- | | 1 | `src/api/router.ts` `handleRequest` | Large | Deeply nested switch statement handles routing, auth, and validation in one block. | | 2 | `src/core/processor.ts` `transformData` | Moderate | Multiple interdependent loops process data streams without intermediate state. | ## 1. Deeply nested routing logic creates high maintenance risk - Id: `complexity | src/api/router.ts | handleRequest | baseline` - Status: new - Hardness: Large **Where.** `src/api/router.ts` `handleRequest` lines 45–180. **Excerpt.** ```typescript // src/api/router.ts lines 45-60 async function handleRequest(req: Request) { switch (req.method) { case 'POST': if (req.url.includes('/upload')) { // ... 120 more lines of nested logic ``` **Why it is bad.** The `handleRequest` function manages three distinct responsibilities: URL routing, payload validation, and authentication checks. A single change to the auth flow requires touching this critical path, risking total service downtime. The nesting depth (7 levels) makes it difficult to trace error propagation. **How to improve.** Extract the route matching into a dedicated `Router` class. Move payload validation for each method into separate middleware functions. The `handleRequest` symbol should only orchestrate calls to these units. **Done when.** `handleRequest` is under 30 lines and contains no nested `switch` or `if` statements related to payload structure. **Next steps** 1. Open the progress page at the URL provided to see the tool execution logs. 2. Review `07.Modularity.2025-05-20T101500.md` for related structural issues. 3. Address the `Large` hardness finding in `router.ts` before starting new feature work.

    08.Complexity.2025-05-20T101500.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Maintaining code quality in large repositories is difficult when architectural drift and technical debt go unmonitored. This skill executes a deep, internal code quality audit across nine specific properties, ranging from architectural consistency to observability, without modifying your source code. ## What it does - **Architectural Audit** verifies code adherence to in-repository architectural decisions and style guides. - **Deduplication Engine** identifies both exact and near-duplicate code blocks that increase maintenance burden. - **Concern Isolation** flags violations in separation of concerns and identifies non-pure functions. - **Literal Extraction** detects hardcoded domain values that should be modularized. - **Complexity Analysis** pinpointing units with high cognitive load or poor modularity. - **Live Monitoring** serves a local progress page to track the audit status without polluting chat history. ## How it works 1. **Initialization** starts a local Python-based progress server and resolves the workspace path. 2. **Environment Check** detects project languages and identifies missing linting or analysis tools. 3. **Automated Analysis** runs internal scripts to collect tool output and scan the source tree. 4. **Report Generation** produces timestamped Markdown reports for each property in a dedicated audit folder. ## Frameworks & tools The skill utilizes a suite of Python-based utility scripts including `progress.py`, `detect_languages.py`, `check_tools.py`, and `run_tools.py`. It integrates with standard language-specific static analysis tools and reads internal project guides for observability and architecture. ## Why this beats prompting it yourself Manual prompts often result in vague suggestions or missed edge cases in large files. This skill follows a strict nine-point inspection protocol, maintains a delta baseline between runs to track new vs. existing issues, and provides specific "Why it is bad" justifications rooted in actual code logic. ## Use cases - Auditing a legacy repository to prioritize refactoring efforts based on risk. - Checking architectural compliance after a large feature merge. - Finding near-duplicate logic that should be unified into a shared utility. - Validating observability coverage against internal logging standards. ## Known limitations Does not support creating tasks or tickets directly from reports. Requires user permission to install missing third-party analysis tools. Only reads source code and tool outputs, ignoring markdown documentation and comments.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    The skill supports any environment where the agent has access to a local Python runtime and the project workspace. It is designed to work across major programming languages by detecting your specific project stack and leveraging relevant static analysis tools.

    Unlike a standard prompt, this skill runs an internal multi-step pipeline that tracks progress via a local server and generates timestamped delta reports. It follows a strict nine-point inspection protocol to ensure consistency, whereas manual prompting often misses edge cases in large repositories.

    No, the skill operates in a strictly read-only mode regarding your source code. It scans your files and generates analysis reports in a separate audit folder, ensuring your codebase remains untouched while providing actionable insights.

    The audit provides a "delta" report that compares current results against previous runs. This allows you to distinguish between long-standing technical debt and new issues introduced in recent commits or feature merges.

    The skill requires a Python environment to run its internal progress and analysis scripts. During the 'Environment Check' phase, it will notify you if specific third-party linting or analysis tools are missing and will request your permission before attempting to install them.

    You receive the full suite of Python-based utility scripts, including the progress server and language detection engines, along with the nine-point inspection protocol. This includes all necessary logic to generate the Markdown-based delta reports and architectural compliance audits.

    New in Code Quality & Review

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.