performance-audit
Skill24 starsChanged 24 days agoMITView on GitHub
Systematic performance investigation workflow. Use when performance regressions are suspected, before and after optimisation work, or as a pre-release gate for performance-critical features. Produces a baseline, identifies the real bottleneck, and validates improvement with hard numbers.
- Installs packages
20 other projects use a version of this.
Adopted by
Most recently taken up by
- LeonardoEnnes/ai-engineering-toolkittheir own version, first seen Nov 8, 2026
- nseney1/Soma-Governancetheir own version, first seen Nov 1, 2026
- nseney1/Aegis-Guardrailstheir own version, first seen Oct 25, 2026
- greglas75/zuvotheir own version, first seen Oct 16, 2026
- arndvs/ctrlshfttheir own version, first seen Oct 15, 2026
- 26zl/universal-agent-skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use threat-model, security-audit and 6 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.
OpenAISkillthreat-model
Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 8 projects that use this
SentrySkillwrite-tests
Write tests following project conventions. Use when adding new tests or modifying existing ones.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 4 projects that use this
Microsoft AzureSkillrelease-notes
Author and update release notes for Azure App Configuration libraries and providers. USE FOR: write release notes, add release note entry, update release notes, draft release notes, new version release notes, format release notes. DO NOT USE FOR: generating changelogs from git history, writing internal engineering notes.
Also in 3 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- octanejs/octane★ 1.5ksame name
- gwdevhub/GWToolboxpp★ 1.1ksame name
- termio-sh/termio★ 787same name
- me2resh/apexyard★ 542same name
- wallstop/unity-helpers★ 176same name
- patrickserrano/skills★ 13same name
- fritzprix/libr-agent★ 11same name
- greglas75/zuvo★ 7same name
- nseney1/Aegis-Guardrails★ 4same name
- nseney1/Soma-Governance★ 4same name
10 more not listed
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.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- api-contract-firstSkill
- architecture-auditSkill
- brainstormingSkill
- data-migrationSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- five-whysSkill
- incident-responseSkill
- skill-duplication-auditSkill
- smart-initSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-a-teamSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Before any optimisation work (establish baseline first)
- Distinctive: line 19
When a performance regression is reported
- Distinctive: line 21
After an optimisation to validate the improvement
- Distinctive: line 27
Before measuring anything, define what "good" looks like:
- Distinctive: line 38
If no target exists, the first audit establishes the baseline that becomes the target.
- Distinctive: line 42
Run the benchmark before any changes.
- Distinctive: line 67
Use the appropriate tool for the stack.
- Distinctive: line 133
Run the exact same benchmark from Step 2.
“Common” is measured: kept by at least 6 in 10 of the 17 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
Performance Audit
The Law
A PERFORMANCE CLAIM WITHOUT NUMBERS IS AN OPINION.
"I think it's faster" is not a result.
"p95 latency dropped from 480ms to 42ms on a 1000-item dataset" is a result.When to Use
- Before any optimisation work (establish baseline first)
- When a performance regression is reported
- As a pre-release gate on performance-critical features
- After an optimisation to validate the improvement
Audit Workflow
Step 1: Define the Performance Goal
Before measuring anything, define what "good" looks like:
| Category | Example target |
| API latency | p95 < 200ms at 100 concurrent users |
| Page load | First Contentful Paint < 1.5s on 4G |
| Mobile frame rate | 60fps during scroll, 0 jank frames |
| Build time | Full build < 3 minutes |
| Memory | Peak heap < 512MB under load |
| Bundle size | JS bundle < 250KB gzipped |
If no target exists, the first audit establishes the baseline that becomes the target.
Step 2: Measure the Baseline
Run the benchmark before any changes. Record:
- Tool used and exact command
- Input size and conditions
- Raw numbers (min, p50, p95, p99, max)
- System state (CPU, memory, concurrent users)
## Baseline — YYYY-MM-DD
**Feature:** User search endpoint
**Tool:** k6
**Command:** `k6 run --vus 50 --duration 60s scripts/search-load-test.js`
**Input:** 1000-user dataset, query="test"
| Metric | Value |
|--------|-------|
| p50 | 45ms |
| p95 | 380ms |
| p99 | 720ms |
| Error rate | 0.2% |
| Throughput | 210 req/s |Step 3: Profile — Find the Real Bottleneck
Use the appropriate tool for the stack. Read the output. Don't guess.
Web APIs
# Node.js — CPU profile
node --prof app.js
# Run load test, then:
node --prof-process isolate-*.log > profile.txt
# Python — flame graph
pip install py-spy
py-spy record -o profile.svg --pid $(pgrep -f "python app.py")
# Go — pprof
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30
# Database — slow query log
EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) SELECT ...;Frontend
# Bundle analysis
npx webpack-bundle-analyzer stats.json
npx source-map-explorer dist/main.js
# Runtime: Chrome DevTools → Performance tab
# Record interaction → identify long tasks (>50ms)
# Lighthouse CI
npx lhci autorunMobile
- Android: Android Studio → Profiler → CPU/Memory/Network
- iOS: Xcode → Instruments → Time Profiler
- Flutter:
flutter run --profile→ DevTools → Performance overlay
Step 4: Report the Finding
State the bottleneck with evidence, not assumption:
## Bottleneck Found
**Location:** `UserSearchService.search()` — lines 45-67
**Evidence:** pprof shows 78% of CPU time in this function
**Root cause:** For each of 50 search results, a separate `getUserById()` DB call is made (N+1 query)
**Impact:** 47 sequential DB calls per request × ~8ms each = ~376ms per requestStep 5: Apply One Change
Single change. Document hypothesis and expected impact before applying:
## Change Applied
**Hypothesis:** Replacing per-item DB lookups with a single JOIN will eliminate 46 of the 47 DB calls
**Change:** `UserSearchService.search()` — replace loop + `getUserById()` with `getUsersByIds(ids)` JOIN
**Files modified:** `src/services/UserSearchService.ts`
**Expected impact:** p95 latency from 380ms to < 50msStep 6: Re-Measure and Compare
Run the exact same benchmark from Step 2.
## After Optimisation — YYYY-MM-DD
**Change:** N+1 query replaced with single JOIN
| Metric | Before | After | Delta |
|--------|--------|-------|-------|
| p50 | 45ms | 12ms | -73% |
| p95 | 380ms | 38ms | -90% |
| p99 | 720ms | 65ms | -91% |
| Error rate | 0.2% | 0.1% | -50% |
| Throughput | 210 req/s | 890 req/s | +324% |
**Verdict:** IMPROVEMENT CONFIRMED
**Root cause validated:** DB calls per request: 47 → 1
**No regression:** error rate stable, memory unchangedStep 7: Verdict
| Verdict | Criteria |
| IMPROVEMENT CONFIRMED | Measurable improvement on target metric, no regression elsewhere |
| INCONCLUSIVE | No measurable change — hypothesis was wrong; identify next bottleneck |
| REGRESSION | Change made things worse — revert immediately, re-diagnose |
| GOAL MET | Target from Step 1 achieved — further optimisation not required |
Performance Budget (Pre-Release Gate)
For release-critical features, define performance budgets in docs/performance-budgets.md:
api_latency:
endpoint: POST /api/search
p95_ms: 200
measured_with: k6
load: 100 concurrent users
bundle_size:
entry: main.js
max_gzip_kb: 250
measured_with: webpack-bundle-analyzer
mobile_fps:
screen: SearchScreen
min_fps: 60
tool: Android ProfilerCI fails if any budget is exceeded. Performance is a feature — it regresses like any other feature.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

