Audit

From InugamiDev/ultrathink-oss · View interactive version

Audit is an AI agent skill from the GitHub repository InugamiDev/ultrathink-oss. Full codebase audit orchestrator covering security, code quality, performance, and accessibility analysis with prioritized findings.

How to use this skill

Skill file

Audit

Purpose

Audit is the comprehensive codebase analysis orchestrator. It systematically examines a codebase across four dimensions -- security, code quality, performance, and accessibility -- and produces a prioritized report of findings with remediation recommendations. Think of it as a thorough health checkup for your code.

Audit is read-only by default. It analyzes and reports but does not change code unless the user explicitly asks it to fix findings. This makes it safe to run at any time without risk of unintended changes.

Workflow

Phase 1: Scope & Inventory

  1. Parse audit parameters -- Determine what to audit (full or specific dimensions) and any focus areas.
  2. Invoke scout -- Build a comprehensive inventory of the codebase:
  1. Establish baselines -- Record current metrics:

Phase 2: Security Audit

  1. Dependency vulnerability scan -- Check all dependencies for known vulnerabilities:
  1. Secret detection -- Scan for accidentally committed secrets:
  1. Input validation analysis -- Check all user input handling:
  1. Authentication & authorization review -- Examine auth implementation:
  1. Data handling review -- Check sensitive data practices:

Phase 3: Code Quality Audit

  1. Architecture analysis -- Evaluate structural health:
  1. Code patterns analysis -- Check for antipatterns:
  1. Error handling analysis -- Examine error management:
  1. Test quality analysis -- Evaluate the test suite:

Phase 4: Performance Audit

  1. Bundle analysis (frontend) -- Evaluate client-side performance:
  1. Runtime performance -- Check for performance antipatterns:
  1. API performance -- Review API design:

Phase 5: Accessibility Audit

  1. Semantic HTML analysis -- Check markup quality:
  1. Interactive element analysis -- Check usability:
  1. ARIA analysis -- Check assistive technology support:
  1. Visual analysis -- Check visual accessibility:

Phase 6: Report

  1. Compile findings -- Aggregate all findings with severity ratings:
  1. Generate executive summary -- Produce a high-level health assessment:
  1. Invoke docs-writer -- Format the audit report.
  2. Present findings -- Deliver the report with actionable next steps.
  3. Suggest remediation plan -- Invoke plan to create a fix plan if the user wants to address findings.

Severity Matrix

| Dimension | Critical | High | Medium | Low |

|-----------|----------|------|--------|-----|

| Security | Data breach risk, auth bypass | Injection vectors, weak crypto | Missing headers, verbose errors | Outdated non-vulnerable deps |

| Quality | Circular deps, no tests | God objects, no error handling | DRY violations, magic numbers | Naming inconsistencies |

| Performance | Memory leaks, N+1 in loops | Missing indexes, huge bundles | Missing memoization | Minor optimization opportunities |

| Accessibility | No keyboard access, missing alt | No focus management, low contrast | Missing ARIA labels | Suboptimal heading order |

Usage

Use Audit when you want a comprehensive understanding of a codebase's health. It's especially valuable before major releases, after inheriting a codebase, or on a regular cadence (monthly/quarterly).

Best for:

Not ideal for:

Examples

Example 1: Full audit

User: /audit Run a full audit on this codebase

Audit workflow:
1. scout -> Inventory: 342 files, 18 deps, 67% test coverage
2. Security -> 2 critical (exposed API key in config, SQL injection in search),
              4 medium (missing rate limiting, verbose error messages)
3. Quality -> 1 high (circular dependency in models/), 8 medium (DRY violations),
             12 low (naming inconsistencies)
4. Performance -> 1 high (N+1 in user list endpoint), 3 medium (no code splitting)
5. Accessibility -> 2 high (no keyboard nav on modal, missing form labels),
                   5 medium (low contrast on secondary text)
Report: Overall score C+, 2 critical security fixes needed immediately

Example 2: Security-focused audit

User: /audit Security audit only, we're preparing for SOC 2

Audit workflow:
1. scout -> Full codebase inventory
2. Security deep dive -> All 5 security sub-phases with extra scrutiny
3. Report -> Security-specific findings with compliance mapping
4. Suggest -> Plan for remediating all findings before SOC 2 audit

Example 3: Performance audit

User: /audit Our app is slow, audit the performance

Audit workflow:
1. scout -> Inventory with focus on bundle size, API routes, DB queries
2. Performance deep dive -> Bundle analysis, runtime patterns, API review
3. Report -> Ranked performance findings with estimated impact
4. Suggest -> Top 5 optimizations with expected improvement

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.