audit-performance
Skill2 starsChanged 9 months agoApache-2.0View on GitHub
Run a single-session performance audit on the codebase
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
When the task doesn't match this skill's scope -- check related skills
- Distinctive: line 20
When a more specialized skill exists for the specific task
- Distinctive: line 99
Before running performance audit, search for context from past sessions:
- Very specific: line 159
Run npm run review:check and report results.
- Distinctive: line 161
If no thresholds triggered: "⚠️ No review thresholds triggered.
- Very specific: line 190
Read docs/technical-debt/FALSE_POSITIVES.jsonl and filter findings matching:
- Very specific: line 200
Read docs/audits/multi-ai/templates/PERFORMANCE_AUDIT_PLAN.md and verify:
- Distinctive: line 206
If outdated, note discrepancies but proceed with current values.
- Distinctive: line 239
Search relevant files using Grep/Glob
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Single-Session Performance Audit
When to Use
- Tasks related to audit-performance
- User explicitly invokes
/audit-performance
When NOT to Use
- When the task doesn't match this skill's scope -- check related skills
- When a more specialized skill exists for the specific task
Execution Mode Selection
| Condition | Mode | Time |
| Task tool available + no context pressure | Parallel | ~20 min |
| Task tool unavailable | Sequential | ~50 min |
| Context running low (<20% remaining) | Sequential | ~50 min |
| User requests sequential | Sequential | ~50 min |
Section A: Parallel Architecture (2 Agents)
When to use: Task tool available, sufficient context budget
Agent 1: bundle-and-rendering
Focus Areas:
- Bundle Size & Loading (large deps, code splitting, dynamic imports)
- Rendering Performance (re-renders, memoization, virtualization)
- Core Web Vitals (LCP, INP, CLS optimization)
Files:
app/**/*.tsx(pages, layouts)components/**/*.tsxpackage.json(dependencies)next.config.mjs
Agent 2: data-and-memory
Focus Areas:
- Data Fetching & Caching (query optimization, caching strategy)
- Memory Management (effect cleanup, subscription leaks)
- Offline Support (offline state, sync strategy)
Files:
lib/**/*.ts(services, utilities)hooks/**/*.ts(custom hooks)- Components with
useEffect,onSnapshot - Service worker, cache configurations
Parallel Execution Command
Invoke both agents in a SINGLE Task message:
Task 1: bundle-and-rendering agent - audit bundle size, rendering, Core Web
Vitals Task 2: data-and-memory agent - audit data fetching, memory, offline
support
Each agent prompt MUST end with:
CRITICAL RETURN PROTOCOL:
- Write findings to the specified output file using Write tool or Bash
- Return ONLY: `COMPLETE: [agent-id] wrote N findings to [output-path]`
- Do NOT return full findings content — orchestrator checks completion via fileDependency constraints: Both agents are independent -- no ordering required. Each writes to a separate JSONL section. Results are merged after both complete.
Coordination Rules
- Each agent writes findings to separate JSONL section
- Bundle findings include estimated KB savings
- Memory findings include leak detection results
- Both agents note cross-cutting concerns
Pre-Audit: Episodic Memory Search (Session #128)
Before running performance audit, search for context from past sessions:
// Search for past performance audit findings
mcp__plugin_episodic -
memory_episodic -
memory__search({
query: ["performance audit", "bundle size", "rendering"],
limit: 5,
});
// Search for specific optimization work done before
mcp__plugin_episodic -
memory_episodic -
memory__search({
query: ["Core Web Vitals", "LCP", "memory leak"],
limit: 5,
});Why this matters:
- Compare against previous performance baselines
- Identify recurring bottlenecks (may need architectural fixes)
- Track optimization progress over time
- Prevent re-flagging already-addressed issues
Section B: Sequential Fallback (Single Agent)
When to use: Task tool unavailable, context limits, or user preference
Execution Order:
- AI Performance Patterns (high-impact AI-generated issues) - 10 min
- Bundle & Loading - 15 min
- Data Fetching - 10 min
- Remaining categories - 15 min
Total: ~50 min (vs ~20 min parallel)
Checkpoint Format
{
"started_at": "ISO timestamp",
"categories_completed": ["Bundle", "Rendering"],
"current_category": "DataFetch",
"findings_count": 12,
"last_file_written": "stage-2-findings.jsonl"
}Pre-Audit Validation
Step 1: Check Thresholds
Run npm run review:check and report results.
- If no thresholds triggered: "⚠️ No review thresholds triggered. Proceed anyway?"
- Continue with audit regardless (user invoked intentionally)
Step 2: Gather Current Baselines
Collect these metrics by running commands:
# Build output (bundle sizes)
npm run build 2>&1 | tail -30
# Count client vs server components
grep -rn "use client" app/ components/ --include="*.tsx" 2>/dev/null | wc -l
grep -rn "use server" app/ components/ --include="*.tsx" 2>/dev/null | wc -l
# Count useEffect hooks (potential performance issues)
grep -rn "useEffect" --include="*.tsx" --include="*.ts" 2>/dev/null | wc -l
# Count real-time listeners
grep -rn "onSnapshot" --include="*.ts" --include="*.tsx" 2>/dev/null | wc -l
# Image optimization check
grep -rn "<img" --include="*.tsx" 2>/dev/null | wc -l
grep -rn "next/image" --include="*.tsx" 2>/dev/null | wc -lStep 3: Load False Positives Database
Read docs/technical-debt/FALSE_POSITIVES.jsonl and filter findings matching:
- Category:
performance - Expired entries (skip if
expiresdate passed)
Note patterns to exclude from final findings. If file doesn't exist, proceed with no exclusions.
Step 4: Check Template Currency
Read docs/audits/multi-ai/templates/PERFORMANCE_AUDIT_PLAN.md and verify:
- Stack versions match package.json
- Bundle size baseline is recent
- Performance-critical paths are accurate
If outdated, note discrepancies but proceed with current values.
Audit Execution
Focus Areas (6 Categories):
- Bundle Size & Loading (large deps, code splitting, dynamic imports)
- Rendering Performance (re-renders, memoization, virtualization)
- Data Fetching & Caching (query optimization, caching strategy)
- Memory Management (effect cleanup, subscription leaks)
- Core Web Vitals (LCP, INP, CLS optimization)
- Offline Support (NEW - 2026-01-17):
- Offline state storage (localStorage, IndexedDB, cache API)
- Sync strategy (optimistic updates, conflict resolution)
- Failure mode handling (network errors, retry logic)
- Offline-first data patterns (queue writes, batch sync)
- Service worker caching strategy
- Offline testability (can app function without network?)
- AI Performance Patterns (AI-Codebase Specific - NEW 2026-02-02):
- Naive Data Fetching: AI defaults to fetch-all then filter client-side (S1)
- Missing Pagination: AI often forgets pagination for lists (S2)
- Redundant Re-Renders: AI-generated components without memo/useMemo (S2)
- Duplicate API Calls: Same data fetched in multiple places (S2)
- Sync Where Async Needed: AI sometimes uses sync file ops in Node.js (S2)
- Over-Fetching: Fetching entire documents when only fields needed (S2)
- Missing Loading States: No suspense boundaries or loading indicators (S2)
- Unbounded Queries: Firestore queries without limit() (S1)
For each category:
- Search relevant files using Grep/Glob
- Identify specific issues with file:line references
- Classify severity: S0 (>50% impact) | S1 (20-50%) | S2 (5-20%) | S3 (<5%)
- Estimate effort: E0 (trivial) | E1 (hours) | E2 (day) | E3 (major)
- Note affected metric (LCP, bundle, render, memory)
- Assign confidence level (see Evidence Requirements below)
Performance Patterns to Find:
- Inline arrow functions in JSX props
- Object literals in JSX props
- Missing React.memo on frequently re-rendered components
- useEffect without cleanup
- Large components without code splitting
- Queries without limits
- onSnapshot where one-time fetch would suffice
Scope:
- Include:
app/,components/,lib/,hooks/ - Exclude:
node_modules/,.next/,docs/,tests/
Output Requirements
1. Markdown Summary (display to user):
## Performance Audit - [DATE]
### Baselines
- Build time: Xs
- Bundle size: X KB (gzipped)
- Client components: X
- useEffect hooks: X
- Real-time listeners: X
### Findings Summary
| Severity | Count | Affected Metric | Confidence |
| -------- | ----- | --------------- | ----------- |
| S0 | X | ... | HIGH/MEDIUM |
| S1 | X | ... | HIGH/MEDIUM |
| S2 | X | ... | ... |
| S3 | X | ... | ... |
### Top 5 Optimization Opportunities
1. [file:line] - Description (S1/E1) - Est. X% improvement - DUAL_PASS_CONFIRMED
2. ...
### False Positives Filtered
- X findings excluded (matched FALSE_POSITIVES.jsonl patterns)
### Quick Wins (E0-E1)
- ...
### Recommendations
- ...2. JSONL Findings (save to file):
Create file: docs/audits/single-session/performance/audit-[YYYY-MM-DD].jsonl
Category field: category MUST be performance. Also include
performance_details with affected_metric, current_metric, and
expected_improvement.
3. Markdown Report (save to file):
Create file: docs/audits/single-session/performance/audit-[YYYY-MM-DD].md
Full markdown report with all findings, baselines, and optimization plan.
Standard Audit Procedures
Read
.claude/skills/_shared/AUDIT_TEMPLATE.mdfor: Evidence Requirements, Dual-Pass Verification, Cross-Reference Validation, JSONL Output Format, Context Recovery, Post-Audit Validation, MASTER_DEBT Cross-Reference, Interactive Review, TDMS Intake & Commit, Documentation References, Agent Return Protocol, and Honesty Guardrails.
Skill-specific TDMS intake:
node scripts/debt/intake-audit.js <output.jsonl> --source "audit-performance-<date>"Performance audit triggers (check AUDIT_TRACKER.md):
- 30+ commits since last performance audit, OR
- Bundle size change detected, OR
- New heavy dependencies added
Version History
| Version | Date | Description |
| 1.0 | 2026-02-25 | Initial implementation |
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- ben-manes/caffeine★ 18ksame name
- dzhng/jevgrep★ 3.1ksame name
- dzhng/skills★ 1.4ksame name
- dzhng/yap★ 112same name
- kensaurus/cursor-kenji★ 9same name
- kensaurus/skills★ 9same name
- Buddhilive/buddhi-cli★ 1same name
- krixon/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use marketing-pages, close-spec and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dzhngSkillmarketing-pages
Best-practice rulebook for a marketing site's pages, organized by page class — campaign landers, product pages, programmatic SEO trees, editorial. Use when writing or updating a landing/marketing page, wiring a campaign lander to an attribution identifier, changing site-wide nav/footer links, touching sitemap/robots/agent-readable surfaces, or auditing a public site's indexing, reachability, and conversion setup.
Also in 3 projects that use this
dzhngSkillclose-spec
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).
Also in 3 projects that use this
transitive-bullshitSkillcompare-screenshots
Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.
Also in 3 projects that use this
LucasMatuszewskiSkillaudit-agents
Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.
Also in 3 projects that use this
rhnfzlSkillexplore-unknowns
Walk the user through mapping the unknowns of a task before, during, and after they build it, and hand them a four-quadrant map (settled ground, open decisions, taste, and landmines) they keep. Reach for this eagerly whenever a request is ambiguous or underspecified, the codebase or domain is unfamiliar, the user will "know it when they see it", a reference implementation must be understood before porting, a build-queue or architecture-changing task is about to start, a mid-build deviation needs capturing, or a finished change needs buy-in or verified understanding before merge. Trigger even when the skill is not named: "do a blindspot pass", "find my unknown unknowns", "interview me about this change", "brainstorm the approach for a task I am about to build", "help me scope this", "what am I missing here", "plan this before I build", "I know nothing about X in this codebase". When a territory profile is present it reads memory and the graph first and feeds the map into the build pipeline; without one it degrades to a plain general map. Not for trivial or mechanical tasks with clear acceptance criteria, single-fact lookups, pure debugging of a known symptom, or pure code review, those have their own tools. Do not use it to run the build itself; the map is the deliverable and implementation remains a separate task, whether it has not started or is already underway.
Also in 3 projects that use this
christyjacob4Skillauto-research
Autonomous research loop that iteratively improves code through experiments. Runs experiments on local or remote GPUs, tracks results, keeps improvements, discards failures, and never stops. TRIGGER THIS SKILL when users want to autonomously research, optimize, or experiment on a problem — whether they say "run experiments overnight", "optimize this model", "try different approaches and keep what works", "do research on this", "iterate on this until it gets better", "run an experiment loop", or want to improve any metric through systematic trial and error. Also trigger when users mention autonomous experimentation, hyperparameter search, architecture search, ablation studies, or want Claude to keep trying things while they step away. This skill works for ML training, compiler optimization, algorithm tuning, performance benchmarking, or any problem with a measurable metric.
Also in 3 projects that use this
- +4 more from dzhng
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- find-skillsSkill
- add-debtSkill
- alertsSkill
- analyzeSkill
- artifacts-builderSkill
- audit-agent-qualitySkill
- audit-aggregatorSkill
- audit-ai-optimizationSkill
- audit-codeSkill
- audit-comprehensiveSkill
- audit-documentationSkill
- audit-engineering-productivitySkill
- audit-enhancementsSkill
- audit-healthSkill
- audit-processSkill
- audit-refactoringSkill
- audit-securitySkill
- brainstormSkill
- checkpointSkill
- code-reviewerSkill
- comprehensive-ecosystem-auditSkill
- content-research-writerSkill
- convergence-loopSkill
- create-auditSkill
- data-effectiveness-auditSkill
- debt-runnerSkill
- decrypt-secretsSkill
- deep-planSkill
- deep-researchSkill
- developer-growth-analysisSkill
- doc-ecosystem-auditSkill
- doc-optimizerSkill
- docs-maintainSkill
- document-analysisSkill
- ecosystem-healthSkill
- Excel AnalysisSkill
- find-skillsSkill
- frontend-designSkill
- gh-fix-ciSkill
- github-healthSkill
- health-ecosystem-auditSkill
- hook-ecosystem-auditSkill
- market-research-reportsSkill
- mcp-builderSkill
- media-analysisSkill
- multi-ai-auditSkill
- pre-commit-fixerSkill
- pr-ecosystem-auditSkill
- pr-retroSkill
- pr-reviewSkill
- quick-fixSkill
- recallSkill
- repo-analysisSkill
- repo-synthesisSkill
- script-ecosystem-auditSkill
- session-beginSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

