agentleFS
dtsongdtsong/agentic-council/skills/tuner-performance-audit/SKILL.md

performance-audit

Skill0 starsChanged 6 months agoApache-2.0View on GitHub

Use when profiling application performance or diagnosing slow page loads. Covers full-stack bottleneck identification including Core Web Vitals, bundle analysis, database queries, and network waterfall. Do not use for cache architecture design (use caching-strategy) or capacity planning (use load-modeling).

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-audit.

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.
  • CloudflareSkill

    security-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 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 6

    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:

    No user-provided values are used in commands or file paths.

    line 40
  2. Distinctive:

    Run Lighthouse (or equivalent) on key pages.

    line 55
  3. Distinctive:

    Check for missing indexes on filtered/sorted columns

    line 78
  4. Distinctive:

    Check for unnecessary data fetching (selecting columns not used)

    line 81
  5. Distinctive:

    If caching gaps are identified as a major bottleneck, hand off to tuner/caching-strategy for cache hierarchy design and TTL policy …

    line 112
  6. Distinctive:

    If scaling or capacity concerns emerge from traffic analysis, hand off to tuner/load-modeling for capacity planning and scaling trigger …

    line 113

“Common” is measured: kept by at least 6 in 10 of the 6 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

Purpose

Identify performance bottlenecks across the full stack — rendering, network, bundle, database, and infrastructure. Produces a profiled baseline, a prioritized bottleneck inventory, and an optimization roadmap with estimated impact for each recommendation.

Scope Constraints

  • Reads: Lighthouse reports, Core Web Vitals field data, bundle analyzer output, slow query logs, network waterfall traces, application source code.
  • Cannot: Design caching hierarchies or TTL policies (use caching-strategy). Cannot model future traffic growth or define scaling triggers (use load-modeling). Cannot provision or deploy infrastructure changes.

Inputs

  • Application URL or local dev environment access
  • Current performance complaints or targets (e.g., "page loads slowly", "LCP > 4s")
  • Tech stack details (framework, database, hosting, CDN)
  • Traffic profile (approximate users, peak times, geographic distribution)

Input Sanitization

No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.

Procedure

Progress Checklist

  • Step 1: Profile current performance baseline
  • Step 2: Identify render bottlenecks
  • Step 3: Analyze bundle size and code splitting
  • Step 4: Audit database queries
  • Step 5: Evaluate network waterfall
  • Step 6: Assess Core Web Vitals scores
  • Step 7: Recommend prioritized optimizations

Step 1: Profile Current Performance Baseline

Run Lighthouse (or equivalent) on key pages. Record Core Web Vitals: LCP, CLS, INP, TTFB. Capture p50, p95, and p99 values where available. Document the baseline as the reference point for all improvements.

Step 2: Identify Render Bottlenecks

Analyze the critical rendering path:

  • Largest Contentful Paint — what element is the LCP candidate? Is it blocked by fonts, images, or JS?
  • Cumulative Layout Shift — which elements shift? Are dimensions reserved?
  • Interaction to Next Paint — which event handlers are slow? Is there long-task blocking?
  • Time to First Byte — is the server response slow, or is it DNS/TLS overhead?

Step 3: Analyze Bundle Size and Code Splitting

Inspect the JavaScript and CSS bundles:

  • Total bundle size (compressed and uncompressed)
  • Largest modules/chunks and their purpose
  • Unused code ratio (tree shaking effectiveness)
  • Code splitting boundaries — are routes lazy-loaded?
  • Third-party script impact (analytics, chat widgets, ads)

Step 4: Audit Database Queries

Review server-side data access patterns:

  • Identify N+1 query patterns
  • Check for missing indexes on filtered/sorted columns
  • Review slow query logs or EXPLAIN plans for high-frequency queries
  • Evaluate connection pooling configuration
  • Check for unnecessary data fetching (selecting columns not used)

Step 5: Evaluate Network Waterfall

Analyze the network request pattern:

  • Total request count and payload size per page load
  • Request sequencing — are there blocking chains?
  • Compression (gzip/brotli) on text assets
  • Image optimization (format, sizing, lazy loading)
  • HTTP/2 or HTTP/3 multiplexing usage

Step 6: Assess Core Web Vitals Scores

Compile field data (CrUX) and lab data (Lighthouse) into a scorecard:

  • Green/amber/red status for each vital
  • Comparison against industry benchmarks
  • Mobile vs desktop performance gap
  • Geographic performance variance if applicable

Step 7: Recommend Prioritized Optimizations

Rank each finding by impact (estimated improvement) and effort (implementation cost):

  • High impact / low effort — do immediately
  • High impact / high effort — plan and schedule
  • Low impact / low effort — batch together
  • Low impact / high effort — skip or defer

Compaction resilience: If context was lost during a long session, re-read the Inputs section to reconstruct what system is being analyzed, check the Progress Checklist for completed steps, then resume from the earliest incomplete step.

Handoff

  • If caching gaps are identified as a major bottleneck, hand off to tuner/caching-strategy for cache hierarchy design and TTL policy definition.
  • If scaling or capacity concerns emerge from traffic analysis, hand off to tuner/load-modeling for capacity planning and scaling trigger definitions.

Output Format

# Performance Audit: [Application/Page Name]

## Baseline Scorecard

| Metric | Current | Target | Status |
|--------|---------|--------|--------|
| LCP    | ...     | ...    | ...    |
| CLS    | ...     | ...    | ...    |
| INP    | ...     | ...    | ...    |
| TTFB   | ...     | ...    | ...    |
| Bundle Size (gzip) | ... | ... | ... |
| Request Count | ... | ... | ... |

## Bottleneck Inventory

### Critical (High Impact)
1. **[Bottleneck name]** — [Description, current metric, estimated improvement]

### Moderate (Medium Impact)
1. **[Bottleneck name]** — [Description, current metric, estimated improvement]

### Minor (Low Impact)
1. **[Bottleneck name]** — [Description, current metric, estimated improvement]

## Optimization Roadmap

| Priority | Optimization | Expected Impact | Effort | Metric Affected |
|----------|-------------|-----------------|--------|-----------------|
| P0       | ...         | ...             | ...    | ...             |
| P1       | ...         | ...             | ...    | ...             |
| P2       | ...         | ...             | ...    | ...             |

## Database Query Findings

| Query/Pattern | Issue | Current Cost | Recommendation |
|--------------|-------|-------------|----------------|
| ...          | ...   | ...         | ...            |

## Bundle Analysis

| Chunk | Size (gzip) | Purpose | Optimization |
|-------|-------------|---------|-------------|
| ...   | ...         | ...     | ...         |

Quality Checks

  • Baseline measurements are recorded with specific numbers, not vague descriptions
  • Every bottleneck has a measured current value and an estimated improvement
  • Optimizations are prioritized by impact-to-effort ratio
  • Core Web Vitals are assessed for both mobile and desktop
  • Database queries are reviewed with EXPLAIN plans or equivalent evidence
  • Bundle analysis includes both first-party and third-party code
  • Network waterfall identifies blocking request chains
  • Recommendations include specific implementation steps, not just "optimize X"

Evolution Notes

<!-- Observations appended after each use -->

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.