agentleFS
krixonkrixon/skills/skills/audit-performance/SKILL.md

audit-performance

Skill1 starsChanged 5 months agoMITView on GitHub

Sweep a codebase for performance hazards on hot paths — N+1 data access, per-iteration allocation or IO in loops, unbounded reads, missing caching or indexing, blocking calls in async contexts — and surface each as a finding. Static-first, no profiler or benchmark required. Use when the user wants to audit performance, find slow paths, hunt N+1 queries or unbounded reads, or asks "what's slow?" / "what won't scale?".

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use marketing-pages, close-spec and 10 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.
  • dzhngSkill

    marketing-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 4 projects that use this

  • dzhngSkill

    close-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 4 projects that use this

  • transitive-bullshitSkill

    compare-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 4 projects that use this

  • LucasMatuszewskiSkill

    audit-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 4 projects that use this

  • antonio-orionusSkill

    find-state-machines

    Report every implicit state machine in a project, with its states, transitions and flaws.

    Also in 3 projects that use this

  • rhnfzlSkill

    explore-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 4 projects that use this

  • +6 more from dzhng

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 1

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

    alternatives: stop (review the findings yourself first)

    line 55

“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.

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

Performance Audit

Find where a path plausibly hot carries a performance hazard — work that scales badly with input or load — and surface each as a finding. Run the shared audit method in ../AUDIT-METHOD.md with the lens, sub-dimensions, and dimension below.

The aim is risk-weighted hazards on hot paths, not micro-optimisations on cold code. A redundant allocation in a once-at-startup path is noise; the same allocation per request, per row, or per event is the concern. Findings name the hazard and the hot-path evidence — why this path matters — never a style preference.

Risk lens (step 1)

Map the codebase's hot paths from its entry points and loop structure, then rank by how often the work runs and how it scales:

  • Per-request / per-event — request handlers, message consumers, render loops, anything that runs once per unit of incoming work and multiplies a single hazard across traffic.
  • Loops and recursion — per-iteration work inside a loop, especially one whose bound grows with input or a collection size.
  • Data-volume paths — code that fetches, scans, or transforms collections whose size is caller- or data-driven, where cost grows with the row count.

Rank by exposure — a hazard on a per-request path scaling with input outranks one on a cold or fixed-size path.

Current state: confirm the path is hot and unmitigated (step 2)

For each candidate, confirm two things before it counts: the path is genuinely hot, and nothing already absorbs the cost. A mitigation existing somewhere is not the same as guarding this path — trace whether it applies:

  • A cache, memoisation, or batch/eager-load that already collapses the repeated work.
  • An index or query plan that already makes the access cheap.
  • A bound, limit, or pagination that already caps the result set.
  • A path that runs once or over a fixed small size — cost that never scales is not a hazard.

Sub-dimensions to sweep (step 3)

  • N+1 data access — a query, fetch, or remote call issued per row of a prior result instead of once in a batch.
  • Per-iteration allocation or IO — allocation, IO, or expensive computation inside a loop that could be hoisted, batched, or amortised.
  • Unbounded reads — collection fetches with no pagination or limit, loading data whose size grows with the dataset.
  • Missing caching or indexing — repeated identical computation or a lookup whose access pattern demands an index but has none.
  • Blocking in async contexts — a synchronous or blocking call inside an async path, stalling the event loop or starving the pool.

Drop low-confidence noise — a hazard on cold code, or one a mitigation already covers, is not a finding.

Dimension (step 4)

  • Dimension — performance (the sub-dimension goes in the title/evidence, e.g. "N+1 query loading order line items per order in …", "unbounded fetch of all users in …" — never as a new top-level dimension)
  • Suggested category — enhancement (hardening a hot path against a hazard); a hazard already degrading production latency or exhausting a resource is a bug
  • Where — the hot path's module / type / function
  • Evidence — the hazard, why the path is hot (the hotness justification, not a style claim), that no mitigation covers it, and how the cost scales

Handover

Per ../AUDIT-METHOD.md → Handover.

  • artifact: findings (in ../contracts/finding.md shape)
  • default: capture — dedups against open issues, culls, files survivors as needs-triage
  • alternatives: stop (review the findings yourself first)

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.