Skip to main content
commandsSource-backedReview first Safety Privacy

/zod-audit - Zod Auditor Command for Claude Code

Production codebase auditor specialized in Zod schema validation coverage, security vulnerability detection, and dead code elimination

by JSONbored·added 2025-09-26·
HarnessClaude Code
Invocation:/zod-audit [audit-type=full|security|duplication|validation|zod] [path]
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://owasp.org/www-project-top-ten/, https://github.com/JSONbored/awesome-claude/blob/main/content/commands/zod-audit.mdx
Safety notes
Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project., Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.
Privacy notes
Reads the source files it audits, which may include schema definitions and sample data, and sends them to the model as part of the request; it does not transmit them anywhere else.
Author
JSONbored
Claim status
unclaimed
Last verified
2025-09-26

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

CLI install

Copy-ready — paste the snippet to get started.

Install command

Provided

Config snippet

Not provided

Copy snippet

Provided

Prerequisites

None

Platforms

1 listed

Difficulty

65/100

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Safety & privacy surface

Safety & privacy surface

2 safety and 1 privacy notes across 3 risk areas. Review closely: permissions & scopes, network access.

3 areas
  • SafetyExecution & processesReview generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project.
  • SafetyPermissions & scopesLimit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.
  • PrivacyNetwork accessReads the source files it audits, which may include schema definitions and sample data, and sends them to the model as part of the request; it does not transmit them anywhere else.

Safety notes

  • Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project.
  • Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.

Privacy notes

  • Reads the source files it audits, which may include schema definitions and sample data, and sends them to the model as part of the request; it does not transmit them anywhere else.

Schema details

Install type
cli
Reading time
3 min
Difficulty score
65
Troubleshooting
Yes
Breaking changes
No
Runtime and command metadata
Command syntax
/zod-audit [audit-type=full|security|duplication|validation|zod] [path]
Argument hint
[audit-type=full|security|duplication|validation|zod] [path]
Allowed tools
Bash(find:*)Bash(grep:*)Bash(rg:*)Bash(ls:*)ReadWriteEditGrepGlobTask
Full copyable content
/zod-audit security apps/web

About this resource

Context

  • Current directory: !pwd
  • Project structure: !ls -la
  • TypeScript/JavaScript files: !find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) -not -path "*/node_modules/*" -not -path "*/dist/*" | head -20
  • Package dependencies: ![ -f package.json ] && cat package.json | grep -A 20 '"dependencies"'

Audit Scope

Audit Type: ${1:-full} Target Path: ${2:-.}

Command Metadata

allowed-tools:
  - Bash(find:*)
  - Bash(grep:*)
  - Bash(rg:*)
  - Bash(ls:*)
  - Read
  - Write
  - Edit
  - Grep
  - Glob
  - Task
argument-hint: [audit-type=full|security|duplication|validation|zod] [path]
description: Audits codebase for Zod validation coverage, security gaps, and code quality issues
model: sonnet

Your Task

Perform a comprehensive codebase audit focusing on:

Phase 1: Security Analysis

  • Identify ALL missing input validations, especially Zod schemas
  • Find unvalidated API endpoints and form handlers
  • Detect exposed secrets, API keys, or sensitive data
  • Spot authentication/authorization gaps
  • Check for common vulnerabilities (XSS, SQL injection, CSRF)
  • Verify environment variable validation

Phase 2: Code Quality Assessment

  • Find exact duplicates and near-duplicate code (>80% similarity)
  • Identify dead code and unused exports
  • Locate commented-out code blocks
  • Spot orphaned files and abandoned features
  • Detect inconsistent naming patterns
  • Find magic numbers and hardcoded values

Phase 3: Validation Coverage

  • Every user input MUST have Zod validation
  • All API responses MUST be validated
  • Database query results MUST have schemas
  • File uploads MUST be sanitized
  • Environment variables MUST use schemas
  • Form submissions MUST validate all fields

Phase 4: Modernization Opportunities

  • Identify legacy patterns needing updates
  • Find opportunities for React/Next.js optimizations
  • Detect outdated dependencies
  • Spot over-engineered abstractions
  • Locate performance bottlenecks

Deliverables

Provide a structured report with:

Critical Security Issues

  • File paths and line numbers
  • Specific vulnerability details
  • Recommended fixes with code examples
  • Priority: CRITICAL

Code Duplication Report

  • Duplicated code blocks with locations
  • Consolidation strategies
  • Estimated lines of code reduction
  • Priority: HIGH

Missing Validations

  • Unvalidated endpoints/inputs
  • Required Zod schemas
  • Implementation examples
  • Priority: CRITICAL

Modernization Recommendations

  • Legacy patterns to update
  • Modern alternatives
  • Migration strategies
  • Priority: MEDIUM

Metrics Summary

  • Total files audited
  • Security gaps identified
  • Lines of duplicate code
  • Missing validation schemas
  • Estimated maintenance reduction %

Open-Source Considerations

This audit assumes an open-source production codebase:

  • No security through obscurity
  • All code is publicly visible
  • Clear, auditable validation logic
  • Explicit security boundaries
  • Well-documented threat model

Installation

Create command directory:

mkdir -p .claude/commands

Create command file: audit-codebase.md in the commands directory

Copy the command content with YAML frontmatter format

Usage:

  • /audit-codebase - Execute the full audit
  • /audit-codebase security - Security-focused audit
  • /audit-codebase validation - Validation coverage check

Config Format: Markdown file with YAML frontmatter

Config Paths:

  • Project: .claude/commands/audit-codebase.md
  • User: ~/.claude/commands/audit-codebase.md

Implementation Notes

When auditing:

  1. Start with high-risk areas (auth, API, forms)
  2. Use ripgrep for fast pattern matching
  3. Check all file extensions, not just .ts/.tsx
  4. Include configuration files in security scan
  5. Verify all external data sources have validation

Prioritize findings by:

  • CRITICAL: Security vulnerabilities, missing validations
  • HIGH: Major duplication, abandoned code
  • MEDIUM: Modernization opportunities
  • LOW: Style inconsistencies

Source citations

Add this badge to your README

Show that /zod-audit - Zod Auditor Command for Claude Code is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/commands/zod-audit.svg)](https://heyclau.de/entry/commands/zod-audit)

How it compares

/zod-audit - Zod Auditor Command for Claude Code side by side with its closest alternative on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

Field

Production codebase auditor specialized in Zod schema validation coverage, security vulnerability detection, and dead code elimination

Open dossier

Deploy 100 specialized sub-agents for comprehensive enterprise-grade security, performance, and optimization audit of production codebase

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backed
Submitter
Install riskReview firstReview first
Notes Safety Privacy Safety Privacy
Brand
Categorycommandscommands
Sourcesource-backedsource-backed
AuthorJSONboredJSONbored
Added2025-09-262025-10-25
Platforms
Claude Code
Claude Code
Source repo
Safety notesReview generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project. Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project. Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.
Privacy notesReads the source files it audits, which may include schema definitions and sample data, and sends them to the model as part of the request; it does not transmit them anywhere else.Prompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution. Redact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace.
Prerequisites— none listed— none listed
Install
/zod-audit
/security-audit [scope]
Config
Citations
ClaimUnclaimedUnclaimed
Open in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.