agentleFS
pankaj-mahaurpankaj-mahaur/Agent-Daemon/skills/engineering/optimization-audit/SKILL.md

optimization-audit

Skill0 starsChanged 15 days agoMITView on GitHub

Audit web application performance and scalability. Use for performance audit, optimization, slow pages, API waterfall, render churn, bundle review, N+1 queries, pagination, cache review, background job performance, database indexes, or high-volume endpoint concerns.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    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
  1. Distinctive:

    Use this after correctness and security are understood.

    line 13
  2. Distinctive:

    Don't optimize without measuring: If you can't show the bottleneck, don't rewrite the code.

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Optimization Audit

Use this after correctness and security are understood. Prefer measured or obvious bottlenecks over speculative rewrites.

Workflow

  1. Read existing perf docs — check for performance budgets, past audit notes, or known bottlenecks.
  2. Identify the workflow being optimized and its success metric (load time, TTFB, throughput, etc.).
  3. Frontend pass:
    • Route client/server boundary — what renders on server vs client?
    • Fetch waterfall — are requests sequential when they could be parallel?
    • Debounce and cancellation — inputs triggering API calls on every keystroke?
    • Table/chart/list rendering cost — large datasets without virtualization?
    • Bundle and dependency weight — heavy imports, no tree-shaking, no code splitting?
  4. Backend pass:
    • Queryset shape and N+1 risk — ORM queries inside loops?
    • Pagination and response size — unbounded list endpoints?
    • Aggregation and index match — slow queries missing indexes on filtered/sorted columns?
    • Cache key families and invalidation — cache exists but mutations don't invalidate?
    • Background job efficiency — batching, retries, idempotency, timeout handling?
  5. Split output into low-risk fixes and measurement-needed follow-ups.

Common Hot Spots

These patterns appear in most web applications:

  • Data-heavy dashboards — date filters that re-fetch everything, no pagination, no server-side aggregation
  • Form save flows — sequential API calls that could be batched or parallelized
  • List/table views — loading all records when only a page is needed
  • Admin analytics — complex aggregations without database indexes or caching
  • Background tasks — no timeout, no retry limit, no idempotency guard
  • Search/filter inputs — no debounce, fetching on every keystroke
  • Large imports — importing entire libraries when only one function is needed

Guardrails

  • Don't optimize without measuring. If you can't show the bottleneck, don't rewrite the code.
  • Don't parallelize correctness-sensitive saves unless the backend supports concurrent writes safely.
  • Don't remove pagination or caching without understanding the data contract.
  • Don't optimize around stale test data. Refresh demo/seed data before diagnosing "empty" or "slow" dashboards.
  • Separate quick wins from deep work. Adding an index is a quick win. Rewriting the query layer is deep work. Present both, prioritize quick wins.

Output

For each finding:

FieldDescription
CategoryFrontend / Backend / Infrastructure
ImpactEstimated improvement (e.g., "eliminates N+1 → 1 query instead of 50")
RiskLow (additive) / Medium (behavioral change) / High (architectural)
FixConcrete code change with file:LINE reference
MeasurementHow to verify improvement (timing, query count, bundle size)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.