ezos26/claude-skills/audit

Claude Code and agent skill by ezos26/claude-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Comprehensive multi-domain codebase audit. Runs security, architecture, data, UI, integration, and performance audits in parallel with cross-examination. Usage /audit [scope]. Examples /audit full, /audit security, /audit tesla, /audit iterations 40-52

Install

npx vskill@latest install ezos26/claude-skills/audit

SKILL.md

Comprehensive Audit

Full-spectrum codebase audit with configurable scope and domain focus. This is the deep audit — thorough, multi-pass, with cross-examination and fix-and-verify cycles.

Scope Detection

Parse user input for scope:

InputScopeWhat Gets Audited
/audit full or /auditEntire codebaseAll packages, all apps, all services
/audit {service-name}Single serviceOnly that service's code (e.g., /audit tesla, /audit rideshare)
/audit phase-{N}Single phaseOnly files created/modified by that phase
/audit iterations {X}-{Y}Iteration rangeOnly changes in those Ralph iterations
/audit securitySecurity domain onlyAll security-relevant code, entire codebase
/audit dataData domain onlySchema, migrations, queries, tenant isolation
/audit uiUI domain onlyPages, components, accessibility, states
/audit {domain1} {domain2}Multiple domainsSelected domains only

Service vs domain detection: If the input matches a known service directory (check AGENTS.md or scan for directories with package.json + src/), treat it as a service scope. Otherwise treat it as a domain scope.

Phase 0: Build Project Context

Before launching any agents, you MUST build a context block from the actual codebase.

Read these files (in order, skip if missing):

  1. AGENTS.md — canonical patterns, conventions, tech stack
  2. CLAUDE.md — project instructions, dev commands
  3. package.json (root) — workspace structure, scripts, dependencies
  4. Monorepo config if present (turbo.json, nx.json, pnpm-workspace.yaml)
  5. api-contract.md for the scoped service (if service-scoped audit)

From these, construct a {context block} that includes:

  • Tech stack (framework, language, package manager, monorepo tool if any)
  • Project structure (apps, packages, key directories)
  • Auth/security patterns (from AGENTS.md — RBAC, RLS, session handling, etc.)
  • Key conventions (import aliases, naming, file organization)
  • Dev commands (typecheck, lint, build, test — and what "pass" looks like)

This context block gets injected into every agent prompt below where {context block} appears.

Also detect:

  • Typecheck command: Look in package.json scripts for typecheck, type-check, tsc; fallback to npx tsc --noEmit
  • Test command: Look for test, vitest, jest; note if per-service or monorepo-wide
  • Lint command: Look for lint; fallback to npx eslint .; skip if none found
  • Build command: Look for build

Also detect which audit domains are relevant:

  • Has database/schema files? -> include Data audit
  • Has frontend/UI code (React, Vue, HTML pages)? -> include UI/UX audit
  • Has only backend/API code? -> skip UI/UX audit
  • Has webhook handlers? -> include webhook checks in Security audit
  • Has multi-package structure? -> include Integration audit
  • Single-service scope? -> skip Integration audit unless it has cross-service deps

Phase 1: Quick Gates (Always Run First)

bash
{TYPECHECK_COMMAND} 2>&1 | tail -30
{TEST_COMMAND} 2>&1 | tail -50
{LINT_COMMAND} 2>&1 | tail -30 # skip if no lint script

Report immediately. If any FAIL, fix before proceeding. Tests are a hard gate.

Phase 2: Audit Agents

Launch agents in parallel based on scope. All use run_in_background: true.

  • All agents: model: "sonnet" — use Sonnet for all agents, never Haiku
  • All agents use subagent_type: "Explore"

CRITICAL: Every agent prompt starts with the context block built in Phase 0.

CRITICAL: Every agent prompt MUST include the Agent Roster so agents can flag cross-cutting concerns:

## Agent Roster (you are Agent {N})
1. Security Auditor — auth, access control, injection, secrets, HMAC, CORS
2. Architecture Auditor — patterns, conventions, file organization, dependencies
3. Data Layer Auditor — schema, queries, indexes, migrations, tenant isolation
4. UI/UX Auditor — pages, components, accessibility, loading/error/empty states
5. Integration Auditor — cross-package wiring, type flow, env vars, contract compliance
6. Performance Auditor — N+1, pagination, unbounded queries, caching, bundle size
If you find something outside your domain, note it as:
CROSS-REF [Agent N]: [what they should check]

Skip agents for irrelevant domains — if Phase 0 determined a domain doesn't apply (e.g., no frontend = skip UI/UX), don't launch that agent. Note which were skipped in the final report.

Available Audit Domains

SECURITY AUDIT (Agent: Explore, Model: sonnet)

Use sonnet for security — higher reasoning needed for vulnerability detection.

{context block}
{agent roster}
## Your Focus: Security Audit — {SCOPE}
### OWASP Top 10 Checks
1. **Injection**: Search for raw SQL (string concatenation in queries), unvalidated user input
2. **Broken Auth**: Verify all mutations require auth, check session handling
3. **Sensitive Data Exposure**: Search for secrets in code, error messages leaking internals in production
4. **XXE/XSS**: Check for dangerouslySetInnerHTML, unescaped user content, innerHTML
5. **Broken Access Control**: Verify access control covers ALL routes/procedures, check tenant isolation
6. **Security Misconfiguration**: CSP headers, HSTS, security headers
7. **Insecure Deserialization**: Check webhook payload handling
8. **Components with Vulnerabilities**: Note any known-vulnerable dependencies
9. **Insufficient Logging**: Verify security events are logged
10. **SSRF**: Check for user-controlled URLs in server-side fetches
### Application-Specific Checks (adapt to what exists)
1. **Access Control**:
- If RBAC/permissions matrix exists: list ALL routes/procedures, cross-reference against matrix, flag any NOT registered
- If role checks exist: verify role assignments make sense (read-only vs mutation roles)
2. **Tenant Isolation** (if multi-tenant):
- Is tenant scoping enforced in middleware?
- Do all tenant-scoped tables have row-level filtering?
- Are there queries that could leak data across tenants?
3. **Webhook Security** (if webhooks exist):
- All webhooks validate signatures
- HMAC uses crypto.timingSafeEqual (not === comparison)
- timingSafeEqual has length guard
- Secrets loaded from env config (not process.env directly)
4. **Token Handling**:
- OAuth tokens encrypted at rest
- No tokens in URL parameters
- Refresh token rotation
5. **Rate Limiting** (if exists):
- All public endpoints rate-limited
- Rate limit headers returned
6. **CSP & Headers** (if web app):
- Content-Security-Policy configured
- HSTS with max-age
- X-Content-Type-Options: nosniff
- X-Frame-Options or frame-ancestors
7. **Error Handling**:
- Production error messages are generic (no stack traces)
- NODE_ENV guard on detailed errors
- No error.message exposed to users in production
## OUTPUT FORMAT (MANDATORY)
SECURITY AUDIT REPORT
=====================
Scope: {scope}
Date: {date}
Risk Level: [CRITICAL/HIGH/MEDIUM/LOW]
Findings: {total} ({H} HIGH, {M} MEDIUM, {L} LOW)
HIGH:
- [H-NNN]: [title]
File: [path:line]
Issue: [description]
Fix: [recommendation]
MEDIUM:
- [M-NNN]: [title]
File: [path:line]
Issue: [description]
Fix: [recommendation]
LOW:
- [L-NNN]: [title]
File: [path:line]
Issue: [description]
Fix: [recommendation]
CROSS-REF:
- [Agent N]: [what they should verify]
Access Control: [summary]
Tenant Isolation: [status or N/A]
Webhook Security: [all validated / gaps / N/A]
CSP Status: [configured / gaps / N/A]

ARCHITECTURE AUDIT (Agent: Explore, Model: sonnet)
{context block}
{agent roster}
## Your Focus: Architecture & Patterns — {SCOPE}
1. **Dependency Graph Integrity**:
- Read package.json in each workspace package (if monorepo)
- Verify no circular dependencies
- Verify dependency direction matches architecture (leaf packages don't import app layer)
- Confirm dependency graph matches AGENTS.md (if documented)
2. **Import Conventions**:
- Cross-package imports use the project's alias convention (not relative paths across package boundaries)
- Import style matches project conventions
3. **File Organization**:
- Files are in the correct directories per AGENTS.md/CLAUDE.md conventions
- No misplaced files (e.g., backend code in frontend, shared code in app-specific dirs)
4. **Naming Conventions**:
- Route/file/variable naming follows project patterns
- Consistent naming across similar concepts
5. **Middleware/Pipeline Chain** (if applicable):
- Security -> auth -> business logic chain is intact
- Each layer verified present
6. **Pattern Violations**:
- Server/client boundary violations (if SSR framework)
- Proper use of framework conventions (loading states, error boundaries, etc.)
## OUTPUT FORMAT (MANDATORY)
ARCHITECTURE AUDIT REPORT
=========================
Scope: {scope}
Findings: {total} ({H} HIGH, {M} MEDIUM, {L} LOW)
HIGH:
- [H-NNN]: [title] | [file] | [description] | [fix]
MEDIUM:
- [M-NNN]: [title] | [file] | [description] | [fix]
LOW:
- [L-NNN]: [title] | [file] | [description] | [fix]
CROSS-REF:
- [Agent N]: [what they should verify]
Dependency Graph: [CLEAN/VIOLATIONS: list]
Import Conventions: [PASS/FAIL: violations]
File Organization: [PASS/FAIL: misplaced files]
Middleware Chain: [INTACT/BROKEN/N/A: issues]

DATA LAYER AUDIT (Agent: Explore, Model: sonnet)
{context block}
{agent roster}
## Your Focus: Database, Schema & Data Integrity — {SCOPE}
1. **Schema Completeness**:
- All tables have appropriate column types (numeric precision, enum usage, not text for structured data)
- FK relationships with proper ON DELETE behavior
- Tenant isolation columns on all tenant-scoped tables (if multi-tenant)
- Timestamps (created_at, updated_at) where appropriate
- Type helpers exported if ORM supports it
2. **Migration Quality** (if migrations exist):
- Each migration wrapped in transaction
- Idempotent (IF NOT EXISTS / IF EXISTS patterns)
- Data migration present when changing column types
- No destructive operations without safety (DROP with IF EXISTS)
- Migrations numbered sequentially
3. **Query Patterns**:
- ALL tenant queries include tenant filter (if multi-tenant)
- Pagination on list queries (cursor-based preferred over offset)
- No N+1 patterns (look for db operations inside loops)
- Batch operations for bulk inserts
- Proper transaction usage for multi-table operations
4. **Index Coverage**:
- Composite indexes on frequently filtered columns
- FK columns indexed
- Columns used in WHERE/ORDER BY indexed
5. **Enum Consistency**:
- DB enums match application-level enums
- Validation schemas reference same enum values
## OUTPUT FORMAT (MANDATORY)
DATA LAYER AUDIT REPORT
=======================
Scope: {scope}
Findings: {total} ({H} HIGH, {M} MEDIUM, {L} LOW)
HIGH:
- [H-NNN]: [title] | [file:line] | [description] | [fix]
MEDIUM:
- [M-NNN]: [title] | [file:line] | [description] | [fix]
LOW:
- [L-NNN]: [title] | [file:line] | [description] | [fix]
CROSS-REF:
- [Agent N]: [what they should verify]
Schema Integrity: [PASS/PARTIAL/FAIL]
Migration Quality: [PASS/PARTIAL/FAIL/N/A]
Tenant Isolation: [PASS/PARTIAL/FAIL/N/A]
N+1 Risks: [none/list]
Index Coverage: [adequate/gaps: list]

UI/UX AUDIT (Agent: Explore, Model: sonnet)

Skip entirely if Phase 0 determined no frontend exists. Note "SKIPPED — no frontend" in final report.

{context block}
{agent roster}
## Your Focus: UI/UX Quality & Consistency — {SCOPE}
1. **Page Completeness** — for every page:
- Has loading state (skeleton, spinner, loading.tsx, Suspense)
- Has error boundary coverage
- Has empty state when data list is empty
- Has proper metadata (title, description) if SSR/SSG

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ezos26/claude-skills/audit/badge)](https://verified-skill.com/skills/ezos26/claude-skills/audit)

Something wrong with this skill or its page? Tell us.