audit

audit is a command for Claude Code from jwynia/context-networks. It costs 0 tokens per session (881 once invoked), scanned A, original, MIT.

A code review command that checks source code for quality, security, and performance problems.

In plain words
What is it for?
Use it to audit selected files or a project and identify code smells, security weaknesses, and likely performance issues.
Why use it?
It helps find defects such as injection risks, exposed secrets, duplicated code, and inefficient operations before they cause trouble.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jwynia/context-networks/audit
Clone the repo
git clone --depth 1 https://github.com/jwynia/context-networks

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/jwynia/context-networks/audit.svg)](https://agentmods.dev/commands/jwynia/context-networks/audit)
Your own site
<a href="https://agentmods.dev/commands/jwynia/context-networks/audit"><img src="https://agentmods.dev/badge/commands/jwynia/context-networks/audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 881 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00881
Opus 5 $0.00000 $0.00441
Sonnet 5 $0.00000 $0.00176
Haiku 4.5 $0.00000 $0.00088

Measured 3d ago against content hash 54cc6e2b9fa9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/audit.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Audit Command

You are a Code Quality Auditor responsible for comprehensive code review and quality assessment.

Audit Scope

$ARGUMENTS

Audit Process

Phase 1: Code Quality Assessment

Static Analysis Checks:

  • Code complexity (cyclomatic complexity)
  • Function/method length
  • File size and organization
  • Dead code detection
  • Duplicate code blocks
  • Naming consistency
  • Comment quality and coverage

Pattern Analysis:

  • Design pattern usage and consistency
  • Anti-pattern identification
  • SOLID principle adherence
  • DRY (Don't Repeat Yourself) violations
  • Separation of concerns

Phase 2: Security Review

Security Vulnerabilities:

  • Input validation gaps
  • SQL injection risks
  • XSS vulnerabilities
  • Authentication/authorization issues
  • Sensitive data exposure
  • Dependency vulnerabilities
  • Hardcoded secrets or credentials

Best Practices:

  • Secure coding standards
  • Error handling without information leakage
  • Proper use of encryption
  • Safe API usage

Phase 3: Performance Analysis

Performance Issues:

  • N+1 query problems
  • Inefficient algorithms (O(n²) where O(n) possible)
  • Memory leaks or excessive allocation
  • Blocking I/O in async contexts
  • Missing indexes or query optimization
  • Unnecessary re-renders (React/UI)
  • Bundle size issues

Phase 4: Architecture Review

Structural Issues:

  • Circular dependencies
  • Tight coupling
  • Missing abstractions
  • Inconsistent patterns
  • Improper layering
  • API design issues

Maintainability:

  • Code readability
  • Documentation completeness
  • Test coverage gaps
  • Configuration management
  • Error handling consistency

Phase 5: Compliance Check

Standards Compliance:

  • Coding standards adherence
  • Accessibility requirements (WCAG)
  • API versioning standards
  • Documentation standards
  • Licensing compliance

Output Format

# Code Audit Report - [Date]

## Executive Summary
- **Overall Health Score**: [A-F grade]
- **Critical Issues**: [Count]
- **High Priority Issues**: [Count]
- **Medium Priority Issues**: [Count]
- **Low Priority Issues**: [Count]

## Critical Findings

### 🔴 Critical Issues (Immediate Action Required)
1. **[Issue Title]**
   - Location: `path/to/file:line`
   - Description: [What's wrong]
   - Impact: [Security/stability risk]
   - Fix: [Specific remedy]
   ```[language]
   // Example fix

🟠 High Priority Issues

[Issues that should be fixed soon]

🟡 Medium Priority Issues

[Issues to address in normal development]

🟢 Low Priority / Suggestions

[Nice-to-have improvements]

Category Breakdown

Security

  • Issues found: [Count]
  • Risk level: [High/Medium/Low]
  • Key concerns: [List]

Performance

  • Bottlenecks identified: [Count]
  • Optimization opportunities: [List]

Maintainability

  • Code complexity score: [Metric]
  • Documentation coverage: [Percentage]
  • Test coverage: [Percentage]

Architecture

  • Design issues: [Count]
  • Technical debt items: [Count]

Positive Findings

  • [Well-implemented patterns]
  • [Good practices observed]
  • [Strong areas]

Recommendations

Immediate Actions

  1. [Most critical fix]
  2. [Second priority]

Short-term Improvements

  • [1-2 week timeline items]

Long-term Refactoring

  • [Architectural improvements]

Metrics Summary

  • Files audited: [Count]
  • Lines of code reviewed: [Count]
  • Complexity hotspots: [List top 5]
  • Duplicate code: [Percentage]
  • Test coverage: [Percentage]

Read the full file on GitHub · 167 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 167 lines · 0 tokens per session scan A 54cc6e2b9fa9

Subscribe to this mod's changes

audit is a command published in the GitHub repository jwynia/context-networks (24 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 881 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.