greglas75/zuvo/code-audit

Claude Code and agent skill by greglas75/zuvo

Trust tier 3
  • community
Source check pending

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

Batch audit of production files against CQ1-CQ40 quality gates and CAP1-CAP29 anti-patterns. Tiered output (A/B/C/D), critical gate enforcement, evidence-backed scoring, cross-file pattern analysis, and prioritized execution plan. Flags: zuvo:code-audit all | [path] | [file] | --deep | --quick | --services | --controllers

Install

npx vskill@latest install greglas75/zuvo/code-audit

SKILL.md

The same SKILL.md was published earlier as greglas75/zuvo/code-audit.

zuvo:code-audit — Production Code Quality Triage

Systematic evaluation of production source files through the CQ1-CQ40 binary checklist and CAP anti-pattern catalog. Every file receives a tier classification based on its score, critical gate status, and detected anti-patterns. The output is a prioritized report with actionable fix plans.

When to use: Periodic health checks, before major releases, after adding many production files, when onboarding a new codebase, when code quality feels inconsistent. Out of scope: Single-file code review (use zuvo:review), refactoring (use zuvo:refactor), test quality assessment (use zuvo:test-audit), feature development (use zuvo:build).

Argument Parsing

ArgumentEffect
allAudit every production file in the project
[path]Audit production files under a specific directory
[file]Audit a single file with full evidence (forces deep mode)
--deepCollect per-gate evidence and fix recommendations for every file
--quickBinary pass/fail only, skip evidence gathering
--services (filter Phase 0.1 discovery to files classified SERVICE in 0.3; without that filter this flag is a no-op)Restrict scope to service and business logic files
--controllers (same: filter Phase 0.1 to CONTROLLER-classified files)Restrict scope to controller, handler, and route files

Default behavior: all --quick

ModeScopeDepthBatch SizeNotes
allEntire projectStandard6 files/batchDefault
[path]Directory treeStandard6 files/batchScoped
[file]One fileDeep (full evidence)1Single-file deep dive
--deepAny scopeFull evidence6 files/batchSlower, thorough
--quickAny scopeBinary only10 files/batchFast triage
--servicesService filesStandard6Filter by file type
--controllersController filesStandard6Filter by file type

Mandatory File Loading

PHASE 0 — Bootstrap (always, before reading any input)
1. ../../shared/includes/codesift-setup.md -- [READ | MISSING -> STOP]
2. ../../shared/includes/no-pause-protocol.md -- [READ | MISSING -> WARN] (HARD: no mid-loop pauses across files)

These files are loaded before reading the audit target files. The no-pause protocol is mandatory for any multi-file audit run.

PHASE 0.5 — Classify (read target files, determine domain)

After CodeSift setup, read the target file(s). Classify the primary domain:

  • data: touches DB queries, transactions, ORMs, migrations
  • async: touches promises, streams, workers, event emitters
  • security: touches auth, input validation, secrets, crypto
  • general: none of the above (or mixed)

Print: [CLASSIFIED] Domain: {data|async|security|general}

PHASE 1 — Conditional Load (based on domain)
Includedataasyncsecuritygeneral
../../rules/cq-checklist.mdFullFullFullFull
../../shared/includes/env-compat.mdFullFullFullFull
../../rules/cq-patterns.mdCQ6,7,9,16,17 focusCQ15,17 focusCQ4,5 focusFull
../../rules/security.mdSKIPSKIPFullSKIP
../../rules/file-limits.mdSKIPSKIPSKIPFull

Print loaded files:

PHASE 1 — LOADED:
[list with READ/SKIP status per file]
DEFERRED — Load at completion
../../shared/includes/run-logger.md -- [READ at final step]
../../shared/includes/retrospective.md -- [READ at final step]

If PHASE 0 file missing: STOP. The plugin installation is incomplete.

Dispatch follows ../../shared/includes/execution-policy.md through env-compat. Reuse existing authorization within that policy; session restrictions take precedence. Run each required gate and report its actual independence or an unmet requirement.

Environment Compatibility

Read ../../shared/includes/env-compat.md for agent dispatch patterns, path resolution, and progress tracking across all supported platforms.

MANDATORY TOOL CALLS — Audit Validity Gate

This audit is INVALID if any tool below is skipped when its trigger condition holds. "DEFERRED", "N/A", "no diff vs prior audit", "--quick mode" are NOT valid reasons. The presence of trigger artifacts (a code file list, language detection, dep manifest) is what dictates the call — never delta or risk.

Required tool list
ToolTriggerReasonSkip allowed?
audit_scanAlways (any project with code files)COMPOUND replacement for find_dead_code+search_patterns+find_clones+analyze_complexity+analyze_hotspots — primary CQ engineNO
find_dead_codeAlwaysCQ13 unused exports across symbol graph (kept as fallback if audit_scan unavailable)NO when audit_scan also unavailable
search_patterns(empty-catch)AlwaysCQ8 empty-catch detection — TOOL-VERIFIED gate, only authoritative sourceNO
find_clonesAlwaysCQ14 duplication ≥0.7 similarity — TOOL-VERIFIED gateNO
scan_secretsAlwaysCAP5 hardcoded secret pre-scan — every audit, every projectNO
trace_call_chain--deep mode OR finding cites a function with cross-file impactCQ4 ownership trace; required to verify "this is internal" claimsNO when --deep
Stack-specific (nest_audit/framework_audit/python_audit/php_project_audit/etc.)Framework/language detectedStack-specific CQ patterns no generic scan reproducesNO when language/framework matches
Forbidden escape hatches
ValueForbidden whenRequired value instead
audit_scan: DEFERREDEVERaudit_scan: <findings_count>
scan_secrets: skipped (CAP5 covered manually)EVERscan_secrets: <count>
find_clones: N/A (--quick mode)EVERfind_clones: <cluster_count>
codesift: unavailablemcp__codesift__* was in deferred-tools session-start bannercodesift: deferred-not-preloaded (FAILURE: skill required preload)
retrospective: skippedEVERretrospective: appended (retros.log + retros.md)
Required POSTAMBLE — retrospective + verify-audit gates

After the audit report is written, the audit is NOT complete until:

  1. zuvo/audits/code-quality-audit-<date>.md (or zuvo/audits/code-audit-<date>.md) is on disk — at the project root (zuvo/ resolves via git rev-parse --show-toplevel; override $ZUVO_OUTPUT_DIR. See ../../shared/includes/report-output-location.md).
  2. ~/.zuvo/append-runlog is called with the Run line — this triggers BOTH:
  • retro-gate: requires a matching RETRO: entry in ~/.zuvo/retros.log for skill=code-audit project=<this>. If missing → exit 2, runs.log NOT appended.
  • audit-content gate: runs ~/.zuvo/verify-audit on the report. Every Tier D/C finding (and every Tier B critical-gate-near-miss) must contain at least one path/to/file.ext:LINE citation that resolves in the current tree. Findings without citations get rejected. If rejected → fix the report (add file:line per finding), re-run append-runlog.
  1. Print RETRO_APPENDED: retros.log=YES retros.md=YES (verified) and confirm exit 0 from append-runlog.

If you reach the Run line and stop without calling append-runlog: the audit is INVALID regardless of finding count. The Validity Gate's gate_status flips to FAIL — postamble incomplete and the verdict overrides to INCOMPLETE.

Mandatory acknowledgment (REQUIRED — print verbatim before Phase 0)
Mandatory-tools-acknowledgment: I will run audit_scan + scan_secrets + search_patterns(empty-catch) + find_clones + find_dead_code + trace_call_chain (in --deep mode or for cross-file impact verification) + stack-specific tools (nest_audit/framework_audit/python_audit/etc. when detected) in this audit. Each finding will cite a `path/to/file.ext:LINE` resolving in the current tree.

CodeSift Integration

Use the deterministic preload helper FIRST. Before issuing any ToolSearch, run:

~/.zuvo/compute-preload code-audit "$PWD"

Copy the printed [CodeSift matching trace] block verbatim and issue the printed ToolSearch(query="select:...") line without modification. Math gate: [CodeSift loaded] tools=N must equal [Expected after load] tools=N from the helper. If they differ → [PRELOAD MATH MISMATCH] and abort before Phase 1.

CodeSift setup completed in PHASE 0. Use CodeSift tools for all discovery and analysis when available. If not found, fall back to Grep/Read/Glob and inform the user once.

After editing any file: index_file(path="/absolute/path/to/file")

CodeSift-Accelerated Discovery

When CodeSift is available, run these checks before the manual CQ evaluation to pre-populate deterministic findings:

  1. find_dead_code(repo, file_pattern=SCOPE) -- Pre-populate CQ13 (unused exports). Mark as TOOL_VERIFIED.
  2. search_patterns(repo, "empty-catch") -- Pre-populate CQ8 (swallowed errors). Mark as TOOL_VERIFIED.
  3. find_clones(repo, min_similarity=0.8) -- Pre-populate CQ14 (duplicated logic blocks >10 lines). Mark as TOOL_VERIFIED.

TOOL_VERIFIED findings have deterministic HIGH confidence and bypass the confidence gate. They go directly to the report.

Manual CQ1-CQ40 evaluation still runs for all 40 gates. CodeSift pre-scan accelerates 3 of 29 checks.

Degraded Mode (CodeSift unavailable)
CodeSift toolFallbackLost capability
find_dead_codeSkip CQ13 pre-scanNo automated dead code detection
search_patterns("empty-catch")Grep for catch\s*\( with empty bodyLess precise pattern matching
find_clonesSkip CQ14 pre-scanNo automated clone detection
get_file_treefind commandSlower, no symbol counts
get_file_outlineRead each fileMore tokens consumed
trace_call_chainGrep for importsNo transitive caller analysis
search_symbolsGrep for function namesLess precise results

Phase 0: Discovery and Classification

0.1 Locate Production Files

When CodeSift is available: get_file_tree(repo, name_pattern="*.ts") (adjust extension per stack) with path filters excluding node_modules, .next, dist, __tests__.

When unavailable:

bash
find . \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.py" \) \
! -name "*.test.*" ! -name "*.spec.*" ! -name "test_*" ! -name "*_test.*" \
! -path "*/node_modules/*" ! -path "*/.next/*" ! -path "*/dist/*" ! -path "*/build/*" \
! -path "*/__pycache__/*" ! -path "*/migrations/*" | sort

If the file count exceeds 80 and --deep was not explicitly requested, auto-switch to --quick mode. An explicit --deep flag always takes precedence.

0.2 Prioritize by Risk

When file count is large, process in this order:

  1. CRITICAL: Guards, middleware, auth files + controllers, handlers, routes (public attack surface)
  2. HIGH: Services, repositories, orchestrators, external API callers (business logic and data)
  3. MEDIUM: ORM entities, models, components with logic >100 lines (data handling and UI)
  4. LOW: Utilities, helpers, pure functions (least risk)
0.3 Classify Each File

Assign a code type to each file. This determines which CQ gates are high-risk and which conditional gates activate.

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

Repository stars
8
7-day trend score
11

Stars and forks are for the whole GitHub repository, not this skill alone. 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/greglas75/zuvo/code-audit/badge)](https://verified-skill.com/skills/greglas75/zuvo/code-audit)

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