audit

Full codebase audit orchestrator covering security, code quality, performance, and accessibility analysis with prioritized findings.

39 stars

Best use case

audit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Full codebase audit orchestrator covering security, code quality, performance, and accessibility analysis with prioritized findings.

Teams using audit should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/audit/SKILL.md --create-dirs "https://raw.githubusercontent.com/InugamiDev/ultrathink-oss/main/.claude/skills/audit/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/audit/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How audit Compares

Feature / AgentauditStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Full codebase audit orchestrator covering security, code quality, performance, and accessibility analysis with prioritized findings.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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:
   - File count and types
   - Directory structure
   - Dependency list and versions
   - Configuration files
   - Test coverage status
   - CI/CD configuration
3. **Establish baselines** -- Record current metrics:
   - Test count and pass rate
   - Lint error count
   - Bundle size (if applicable)
   - Dependency count and age

### Phase 2: Security Audit
4. **Dependency vulnerability scan** -- Check all dependencies for known vulnerabilities:
   - Outdated packages with security patches available
   - Packages with known CVEs
   - Abandoned or unmaintained dependencies
5. **Secret detection** -- Scan for accidentally committed secrets:
   - API keys, tokens, passwords in source code
   - Hardcoded credentials in configuration
   - Secrets in git history (if accessible)
   - Proper .gitignore coverage for sensitive files
6. **Input validation analysis** -- Check all user input handling:
   - SQL injection vectors (raw queries, string concatenation)
   - XSS vectors (unescaped output, unsafe innerHTML usage)
   - Command injection (exec, spawn with user input)
   - Path traversal (file operations with user input)
7. **Authentication & authorization review** -- Examine auth implementation:
   - Session management (secure cookies, expiration, rotation)
   - Token handling (JWT validation, refresh flow, storage)
   - Route protection (middleware coverage, missing auth checks)
   - CORS configuration
   - Rate limiting
8. **Data handling review** -- Check sensitive data practices:
   - PII exposure in logs
   - Encryption at rest and in transit
   - Data sanitization before storage
   - Proper error messages (no stack traces to users)

### Phase 3: Code Quality Audit
9. **Architecture analysis** -- Evaluate structural health:
   - Separation of concerns adherence
   - Single responsibility violations
   - Circular dependencies
   - Module coupling analysis (via `mermaid` dependency graph)
   - Dead code detection
10. **Code patterns analysis** -- Check for antipatterns:
    - God objects or functions (> 200 lines)
    - Deep nesting (> 4 levels)
    - Callback hell or promise chains
    - Magic numbers and strings
    - Copy-paste code (DRY violations)
    - Inconsistent naming conventions
    - TODO/FIXME/HACK comment inventory
11. **Error handling analysis** -- Examine error management:
    - Uncaught promise rejections
    - Empty catch blocks
    - Generic error messages
    - Missing error boundaries (React)
    - Insufficient logging
12. **Test quality analysis** -- Evaluate the test suite:
    - Coverage percentage and gaps
    - Test quality (assertions per test, edge cases)
    - Flaky test indicators
    - Missing test categories (unit, integration, e2e)
    - Test organization and naming

### Phase 4: Performance Audit
13. **Bundle analysis** (frontend) -- Evaluate client-side performance:
    - Bundle size and composition
    - Tree-shaking effectiveness
    - Code splitting coverage
    - Dynamic import usage
    - Image optimization
    - Font loading strategy
14. **Runtime performance** -- Check for performance antipatterns:
    - N+1 query patterns
    - Missing database indexes (if schema is accessible)
    - Unnecessary re-renders (React)
    - Memory leak patterns (event listeners, intervals)
    - Expensive computations without memoization
    - Missing pagination on large data sets
15. **API performance** -- Review API design:
    - Response payload sizes
    - Missing caching headers
    - Over-fetching or under-fetching patterns
    - Connection pooling configuration
    - Timeout handling

### Phase 5: Accessibility Audit
16. **Semantic HTML analysis** -- Check markup quality:
    - Proper heading hierarchy
    - Landmark usage (nav, main, aside, etc.)
    - List markup for list content
    - Table markup for tabular data
17. **Interactive element analysis** -- Check usability:
    - Keyboard navigation support
    - Focus management
    - Touch target sizes
    - Form label associations
    - Error message accessibility
18. **ARIA analysis** -- Check assistive technology support:
    - ARIA role usage and correctness
    - Live region announcements
    - Modal/dialog focus trapping
    - Loading state announcements
19. **Visual analysis** -- Check visual accessibility:
    - Color contrast ratios (WCAG AA: 4.5:1 text, 3:1 UI)
    - Font size minimums (>= 14px body)
    - Motion preferences respected (prefers-reduced-motion)
    - Focus indicator visibility

### Phase 6: Report
20. **Compile findings** -- Aggregate all findings with severity ratings:
    - **Critical**: Security vulnerabilities, data exposure, auth bypass
    - **High**: Performance blockers, major accessibility failures, architectural debt
    - **Medium**: Code quality issues, minor security concerns, missing tests
    - **Low**: Style inconsistencies, minor optimization opportunities
    - **Info**: Suggestions, best practice recommendations
21. **Generate executive summary** -- Produce a high-level health assessment:
    - Overall health score (A-F or numeric)
    - Per-dimension scores
    - Top 5 priority fixes
    - Trend comparison (if previous audit data exists)
22. **Invoke `docs-writer`** -- Format the audit report.
23. **Present findings** -- Deliver the report with actionable next steps.
24. **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:**
- Pre-release quality gates
- Codebase health assessments
- New team member onboarding (to understand tech debt)
- Compliance and security reviews
- Post-incident reviews
- Regular health checkups

**Not ideal for:**
- Building features (use `cook`)
- Fixing specific bugs (use `debug` + `fix`)
- Reviewing a single PR (use `code-review`)

## 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

- **Read-only by default.** Audit reports findings but does not change code unless explicitly asked.
- **Always complete the full scope.** If the user asks for a "full audit," run all four dimensions.
- **Severity must be justified.** Every finding needs a clear explanation of why it's rated at that severity.
- **Findings must be actionable.** Every finding needs a remediation recommendation.
- **No false positives.** Verify findings before reporting. A false alarm erodes trust.
- **Respect scope constraints.** If the user says "security only," don't report code quality issues (but mention if you notice critical non-security issues).
- **Maintain confidentiality.** If the audit finds secrets, report their presence without displaying the actual values.

Related Skills

seo-audit

39
from InugamiDev/ultrathink-oss

Audit affiliate blog posts and landing pages for SEO issues. Triggers on: "audit my blog post for SEO", "check my SEO", "SEO review", "improve my rankings", "SEO checklist", "on-page SEO audit", "keyword optimization check", "why isn't my page ranking", "SEO score", "content quality audit", "check my meta tags", "internal linking audit", "quick SEO wins".

app-audit

39
from InugamiDev/ultrathink-oss

Full application quality audit. Chains impeccable-audit + security-scanner + performance-profiler + accessibility + web-vitals + owasp. Produces a single prioritized report with severity scores, WCAG citations, and fix commands for each issue.

ultrathink

39
from InugamiDev/ultrathink-oss

UltraThink Workflow OS — 4-layer skill mesh with persistent memory and privacy hooks for complex engineering tasks. Routes prompts through intent detection to activate the right domain skills automatically.

ultrathink_review

39
from InugamiDev/ultrathink-oss

Multi-pass code review powered by UltraThink's quality gate — checks correctness, security (OWASP), performance, readability, and project conventions in a single structured pass.

ultrathink_memory

39
from InugamiDev/ultrathink-oss

Persistent memory system for UltraThink — search, save, and recall project context, decisions, and patterns across sessions using Postgres-backed fuzzy search with synonym expansion.

ui-design

39
from InugamiDev/ultrathink-oss

Comprehensive UI design system: 230+ font pairings, 48 themes, 65 design systems, 23 design languages, 30 UX laws, 14 color systems, Swiss grid, Gestalt principles, Pencil.dev workflow. Inherits ui-ux-pro-max (99 UX rules) + impeccable-frontend-design (anti-AI-slop). Triggers on any design, UI, layout, typography, color, theme, or styling task.

Zod

39
from InugamiDev/ultrathink-oss

> TypeScript-first schema validation with static type inference.

webinar-registration-page

39
from InugamiDev/ultrathink-oss

Build a webinar or live event registration page as a self-contained HTML file with countdown timer, speaker bio, agenda, and registration form. Triggers on: "build a webinar registration page", "create a webinar sign-up page", "event registration landing page", "live training registration page", "workshop sign-up page", "create a webinar page", "build an event page", "free webinar landing page", "live demo registration page", "online event page", "create a registration page for my webinar", "build a training event page".

webhooks

39
from InugamiDev/ultrathink-oss

Webhook design patterns — delivery, retry with exponential backoff, HMAC signature verification, payload validation, idempotency keys

web-workers

39
from InugamiDev/ultrathink-oss

Offload heavy computation from the main thread using Web Workers, SharedWorkers, and Comlink — structured messaging, transferable objects, and off-main-thread architecture patterns

web-vitals

39
from InugamiDev/ultrathink-oss

Core Web Vitals monitoring (LCP, FID, CLS, INP, TTFB), measurement with web-vitals library, reporting to analytics, and optimization strategies for Next.js

web-components

39
from InugamiDev/ultrathink-oss

Native Web Components, custom elements API, Shadow DOM, HTML templates, slots, lifecycle callbacks, and framework-agnostic design patterns