agentleFS
chatquillchatquill/claude-code-websites/.claude/skills/load-test/SKILL.md

load-test

Skill1 starsChanged 23 days agoMITView on GitHub

Generates and runs k6 load tests for key endpoints and journeys against local or staging environments only, with thresholds from project.yaml and the PRD's expected traffic. Use before launch, before a marketing push, or when checking whether an endpoint or database will hold up.

2 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. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

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

    If the PRD has no traffic numbers, ask the user for an estimate and record it.

    line 30
  2. Very specific:

    Ask before writing the report (template perf-report, section "Load").

    line 55

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

Load Test

Finds the breaking point before users do. Scripts live in tests/load/; the report goes to production/audits/perf-load-YYYY-MM-DD.md. Never targets production, third-party APIs (payment, email, AI, auth providers) or any host the user does not own; those are mocked or excluded.

Inputs

  • PRD non-functional requirements (expected users, peak requests/second, p95 targets)
  • docs/architecture/api/openapi.yaml or the route inventory
  • The target: local production build or staging URL (ask; refuse production)

Phases

Phase 1: Model the traffic

With performance-engineer, agree: scenarios (e.g. 70% browse, 20% search, 10% checkout-to-provider), target load (expected peak × 2–3), ramp profile, and thresholds: http_req_failed < 1%, http_req_duration p(95) < <target> ms. If the PRD has no traffic numbers, ask the user for an estimate and record it.

Phase 2: Script

Draft tests/load/<scenario>.js for k6: options.scenarios with ramping-vus or ramping-arrival-rate, thresholds, realistic think time, test users created by a setup function or seeded data, auth via a login step or a test token from env (__ENV), and checks on status and body. Third-party calls must be stubbed in the target environment. Show and ask before writing.

Phase 3: Run

Confirm the target URL once more, then run k6 run tests/load/<scenario>.js (or docker run --rm -i grafana/k6 run - < …). Watch for errors early and stop if the target is not the agreed one.

Phase 4: Analyse

Report throughput, p50/p95/p99 latency, error rate, thresholds passed/failed, and where it broke (CPU, DB connections, pool exhaustion, slow query, rate limiter, memory). Spawn postgres-specialist/data-engineer for DB bottlenecks. Recommend fixes with expected impact.

Phase 5: Write

Ask before writing the report (template perf-report, section "Load").

Output

tests/load/*.js, production/audits/perf-load-YYYY-MM-DD.md (template: .claude/docs/templates/perf-report.md).

Next step

/create-stories for the fixes, then re-run the same scenario to compare.

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.