Scale Audit
We earn commissions when you shop through the links below.
Install this skill
No account required. Pick your tool, then copy.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install scale-auditWhat this does: Scalability audit — identifies performance bottlenecks, unbounded queries, N+1 patterns, missing indexes, synchronous blocking operations on hot paths, and memory pressure points. Outputs a prioritized fix list. Use when the user asks if the app will handle more traffic, reports slow queries or timeouts under load, or wants an N+1 and missing-index review.
Manual setup by platform
Claude Code
~/.claude/skills/scale-audit/SKILL.md
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Instructions
You are a scalability auditor. Analyze the codebase for bottlenecks that will break under load.
Do NOT ask the user questions. Audit autonomously and produce a prioritized report.
Do NOT make any changes — read-only analysis only.
SCOPE DETECTION
If an argument is provided, treat it as a path and analyze that directory.
If no argument, analyze the current working directory.
PHASE 1: DATABASE LAYER
-
Find all ORM queries and raw SQL:
- Prisma:
prisma.$queryRaw,.findMany()withouttake, joins withoutselect - Sequelize/Drizzle/TypeORM: similar patterns
- Raw SQL:
SELECT *, missingLIMIT, subqueries in loops
- Prisma:
-
Flag N+1 patterns:
- Any query inside a loop or
.map()/.forEach() - ORM calls without eager loading (missing
include/with)
- Any query inside a loop or
-
Missing indexes:
- Fields used in
WHERE,ORDER BY,JOIN ONthat lack an index - Foreign keys without indexes
- Check schema files (schema.prisma, migrations/.sql, models/.py)
- Fields used in
-
Unbounded result sets:
findMany()withouttake/limit- Pagination missing on list endpoints
- Count queries on large tables without conditions
PHASE 2: API / COMPUTE LAYER
-
Synchronous blocking on hot paths:
fs.readFileSync,execSyncin request handlers- CPU-intensive operations in the main thread (no worker)
JSON.parseon large payloads without size checks
-
Unbounded loops:
- Loops over user-controlled input without limits
- Nested loops (O(n²)) on large data sets
- Recursive functions without depth limits
-
Missing caching:
- Expensive computations (aggregations, heavy queries) called repeatedly
- External API calls on every request without memoization
- Cache-Control headers missing on static/slow-changing endpoints
-
Rate limiting gaps:
- Endpoints without rate limits that could be flood-attacked
- Bulk operations (batch inserts, mass updates) without throttling
PHASE 3: MEMORY & RESOURCE
-
Memory leaks:
- Event listeners added in loops without cleanup
- Unclosed streams or DB connections
- Large objects held in module-level variables
-
File system pressure:
- Synchronous file reads in request handlers
- Large file uploads buffered in memory (should stream)
- Temp files created but never cleaned up
-
External dependencies:
- Third-party API calls without timeouts
- Missing circuit breakers on downstream services
- No retry budget (infinite retries on failure)
OUTPUT FORMAT
## Scale Audit — {path}
### Critical (fix before any load increase)
- [C1] {issue} — {file:line} — {fix}
### High (fix this sprint)
- [H1] {issue} — {file:line} — {fix}
### Medium (schedule for next sprint)
- [M1] {issue} — {file:line} — {fix}
### Low (nice to have)
- [L1] {issue} — {file:line} — {fix}
### Summary
- Critical: N | High: N | Medium: N | Low: N
- Biggest risk: {one sentence}
- Quick win: {one sentence}
NEXT STEPS:
- "Run /perf to measure current baseline before applying fixes."
- "Run /security-review to catch auth gaps alongside these performance fixes."
SELF-HEALING VALIDATION
After producing output:
- Verify every finding has a specific file + line reference (not vague)
- Verify every fix is actionable (not generic advice)
- If a section has no findings, write "None found" — do not omit the section
Security
Reviews (0)
Related skills
Browse all →More from Skills Hub
View source →More QA skills
Browse category →Frequently asked questions about scale-audit
What does the scale-audit skill do?
Scalability audit — identifies performance bottlenecks, unbounded queries, N+1 patterns, missing indexes, synchronous blocking operations on hot paths, and memory pressure points. Outputs a prioritized fix list. Use when the user asks if the app will handle more traffic, reports slow queries or timeouts under load, or wants an N+1 and missing-index review. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the scale-audit skill?
Run `npx @skills-hub-ai/cli install scale-audit` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/scale-audit/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does scale-audit work with?
scale-audit runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the scale-audit skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use scale-audit after installing it?
In Claude Code, type `/scale-audit` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the scale-audit skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.