Scale audit

From tinh2/skills-hub-registry · View interactive version

Scale audit is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. 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.

How to use this skill

Skill file

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

============================================================

  1. Find all ORM queries and raw SQL:
  1. Flag N+1 patterns:
  1. Missing indexes:
  1. Unbounded result sets:

============================================================

PHASE 2: API / COMPUTE LAYER

============================================================

  1. Synchronous blocking on hot paths:
  1. Unbounded loops:
  1. Missing caching:
  1. Rate limiting gaps:

============================================================

PHASE 3: MEMORY & RESOURCE

============================================================

  1. Memory leaks:
  1. File system pressure:
  1. External dependencies:

============================================================

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:

  1. Verify every finding has a specific file + line reference (not vague)
  2. Verify every fix is actionable (not generic advice)
  3. If a section has no findings, write "None found" — do not omit the section
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.