perf-audit

perf-audit is a command for Claude Code from travisjneuman/.claude. It costs 5 tokens per session (1,632 once invoked), scanned A, original, MIT.

A performance checker for web applications that examines bundle size, page rendering, API response times, and database queries.

In plain words
What is it for?
Use it to inspect frontend builds, backend services, and supported database setups, then get optimization suggestions.
Why use it?
It helps identify which parts of an application are making it slow.

Command for Claude Code

Written for Claude Code: arguments in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to inspect frontend builds, backend services, and supported database setups, then get optimization suggestions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/travisjneuman/.claude/perf-audit
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.

Clone the repo
git clone --depth 1 https://github.com/travisjneuman/.claude

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 perf-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/travisjneuman/.claude/perf-audit/github.svg)](https://agentmods.dev/commands/travisjneuman/.claude/perf-audit)
Your own site
<a href="https://agentmods.dev/commands/travisjneuman/.claude/perf-audit"><img src="https://agentmods.dev/badge/commands/travisjneuman/.claude/perf-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for perf-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/travisjneuman/.claude/perf-audit"><img src="https://agentmods.dev/badge/commands/travisjneuman/.claude/perf-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,632 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00005 $0.01632
Opus 5 $0.00003 $0.00816
Sonnet 5 $0.00001 $0.00326
Haiku 4.5 $0.00001 $0.00163

Measured 7d ago against content hash 05315178692a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

perf-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 7d 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.

commands/perf-audit.md · 218 lines

How it starts

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

Performance Audit

Analyzes application performance across bundle size, rendering, API response times, and database queries. Provides actionable optimization recommendations.


Execution Flow

Step 1: Detect Application Type

# Frontend frameworks
[ -f "next.config.js" ] || [ -f "next.config.mjs" ] || [ -f "next.config.ts" ] && echo "NEXTJS"
[ -f "vite.config.ts" ] || [ -f "vite.config.js" ] && echo "VITE"
[ -f "webpack.config.js" ] && echo "WEBPACK"

# Backend frameworks
[ -f "package.json" ] && grep -qE '"(express|fastify|koa)"' package.json && echo "NODE_API"
[ -f "requirements.txt" ] && grep -qE "(fastapi|django|flask)" requirements.txt && echo "PYTHON_API"
[ -f "go.mod" ] && echo "GO_API"

# Database
[ -d "prisma" ] && echo "PRISMA"
[ -f "drizzle.config.ts" ] && echo "DRIZZLE"
[ -f "alembic.ini" ] && echo "ALEMBIC"

Step 2: Run Audits by Focus

Focus: {{focus}} (default: all)

bundle - Bundle Size Analysis
# Next.js
ANALYZE=true npm run build 2>/dev/null

# Vite
npx vite-bundle-visualizer 2>/dev/null

# Check raw sizes
du -sh .next/ dist/ build/ 2>/dev/null
ls -lhS .next/static/chunks/*.js 2>/dev/null | head -20

Analyze source code for bundle bloat:

  • Search for large library imports that could be tree-shaken
  • Find full-library imports that should be specific named imports
  • Identify duplicate dependencies in lock file
  • Check for unneeded polyfills
Bundle Analysis
---------------
Total bundle:     542 KB (gzipped)
Target:           < 200 KB

Largest chunks:
  vendor.js        312 KB  (lodash: 72KB, moment: 67KB, chart.js: 45KB)
  main.js          128 KB
  pages/dashboard  102 KB

Optimization opportunities:
  1. Replace moment.js (67KB) with date-fns (12KB)      -> Save 55KB
  2. Import specific lodash functions                     -> Save ~60KB
  3. Lazy-load chart.js (only used on dashboard)          -> Save 45KB initial
  4. Enable tree-shaking for UI library                   -> Save ~30KB

  Estimated savings: ~190KB (35% reduction)

Read the full file on GitHub · 218 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. 7d ago First seen · 218 lines · 5 tokens per session scan A 05315178692a

Subscribe to this mod's changes

perf-audit is a command published in the GitHub repository travisjneuman/.claude (97 stars, last pushed 6d ago), licensed MIT. It adds 5 tokens to every session and 1,632 once invoked, about $0.0000 per session on Opus 5. 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-09-03.