agentleFS
MrCipherSmithMrCipherSmith/goodai-base/skills/perf-check/SKILL.md

perf-check

Skill0 starsChanged 5 months agoMITView on GitHub

Use when measuring bundle size, detecting performance regressions, auditing slow queries, or investigating why something is slow.

3 other projects use 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. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check largest dependencies: npx -y cost-of-modules

    line 40
  2. Distinctive:

    Don't make changes — only analyze and report

    line 80

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

Analyze and report on project performance metrics.

Arguments

  • /perf-check — full analysis
  • /perf-check --bundle — bundle size only
  • /perf-check --lighthouse <url> — Lighthouse audit
  • /perf-check --deps — dependency weight analysis
  • /perf-check --code — code-level pattern check

Workflow

Phase 1: Detect Scope

  • Frontend: bundle size, lighthouse, dependency weight
  • Backend: startup time, memory, dependency weight
  • Fullstack: both

Phase 2: Bundle Analysis

  • Build and measure output: du -sh dist/ build/ .next/
  • Check largest dependencies: npx -y cost-of-modules
  • Identify tree-shaking opportunities

Phase 3: Lighthouse (if URL available)

npx -y lighthouse <url> --output json --chrome-flags="--headless --no-sandbox"

Phase 4: Dependency Analysis

Flag heavy dependencies:

  • moment → dayjs or date-fns
  • lodash (full) → lodash-es or individual imports
  • aws-sdk v2 → @aws-sdk/client-* v3

Phase 5: Code Anti-patterns

  • N+1 queries (loop with await)
  • JSON.parse(JSON.stringify()) for clone
  • Missing useMemo/useCallback on expensive operations
  • Sync file ops in request handlers
  • Missing database indexes

Phase 6: Report

# Performance Report

## Bundle
- Total: 1.2MB (gzipped: 380KB)

## Issues Found
🔴 moment.js adds 230KB — replace with dayjs (2KB)
🟡 Full lodash import — use lodash-es

## Recommendations (by impact)
1. Replace moment → dayjs (saves ~228KB)
2. Code-split vendor chunk

Rules

  • Don't make changes — only analyze and report
  • Sort recommendations by estimated impact
  • Include specific numbers (KB saved, ms improved)
  • Suggest alternatives for every heavy dependency flagged

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.