From hatch3r
Verifies service code against 8 scalability gates before commit/release: stateless-handler ratio, back-pressure patterns, idempotency-key adoption, queue-based offloading, pool sizing, bulkheads, and load-test pass at target scale.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hatch3r:hatch3r-scalability-verifyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill defines what "done" means for any feature shipping service code on horizontally-scaled tiers. Run before declaring a feature complete. The 8 gates below mix automated checks (machine-checkable on every PR) with one release-cadence gate (load test at target scale). Skipping any gate = the feature is not done. Functional tests passing alone do not satisfy this bar — a stateful handler ...
This skill defines what "done" means for any feature shipping service code on horizontally-scaled tiers. Run before declaring a feature complete. The 8 gates below mix automated checks (machine-checkable on every PR) with one release-cadence gate (load test at target scale). Skipping any gate = the feature is not done. Functional tests passing alone do not satisfy this bar — a stateful handler on a horizontally-scaled tier breaks on the Nth request; a POST endpoint without Idempotency-Key duplicates side effects under retry storm.
Inputs the skill expects:
src/ (handlers, routes, services, workers).pgbouncer.ini, knexfile.js, prisma.schema, application.yml with HikariCP, database.yml).k6/, locust/, or Gatling sims when claiming horizontal scaling.Outputs the skill produces: an 8-line verdict block written to the PR conversation, plus a JSON artifact at .audit-workspace/scalability-verify-<sha>.json for downstream consumption by hatch3r-release.
Before any work, scan the invocation for unresolved questions in scope, intent, acceptance criteria, target environment, or irreversibility. If any are found, ask the user via the platform-native question tool per agents/shared/user-question-protocol.md. Default path, not exception. Triggers for THIS skill: service / handler scope, target scale (current p99 vs 10x vs named load-test peak), gate selection (back-pressure vs idempotency vs pool-sizing vs full), concurrency envelope (steady-state RPS, peak RPS, burst multiplier), and topology (single-zone vs multi-region). Pool-size increases, queue-topology changes, and sticky-session removals are irreversible at production traffic — these MUST go through the protocol before action.
Fan-out scales with task size; token cost never justifies serializing independent work (rules/hatch3r-fan-out-discipline.md P8 B2; agents/shared/efficiency-patterns.md). Emit sub_agents_spawned: { count, rationale } in your output.
This skill is the verification HARNESS — it declares HOW each scalability gate is checked. The DISPATCHER that decides WHEN to run it is the CQ specialist agent:
agents/hatch3r-scalability.md — invokes this skill as the closing scalability gate (CQ6) on PRs touching service code or scaling config. The agent contributes the review trigger and Phase-4 dispatch; this skill contributes the 8-gate procedure.No duplication: the agent decides WHEN, this skill defines HOW.
req.session, module-scope let/var mutables, in-process LRU caches keyed by userId.p-limit/async-sem, queue-depth limit via reverse-proxy LimitReqZone, token-bucket via Envoy local_ratelimit).Retry-After when threshold exceeded; never silently buffer beyond max_inflight.pool_size = ceil(expected_concurrent_requests × avg_query_time_ms / target_p99_ms) documented in config alongside the inputs.max_connections × 0.7 for admin sessions + replicas.transaction mode where pool-per-connection cost is the constraint.idempotency_key_conflict.maxConcurrentExecutions per dependency.pool.waiting), pool wait time (pool.acquire_duration_p99), and pool saturation (active / max) emit metrics per Google SRE USE method (Utilization, Saturation, Errors).pool.waiting > 0 for >30s OR active/max > 0.8 for >2min.skills/hatch3r-observability-verify Gate 4 (RED+USE metrics).All 8 gates pass = the feature is "done" enough to ship to production. Anything less = not done.
The orchestrator running this skill emits a single-line verdict per gate (GATE_N: PASS|FAIL <evidence-path>) and aggregates them. One FAIL on a required gate blocks the merge regardless of functional-test status.
Failure escalation per agents/hatch3r-scalability.md severity calibration: Gate 1 fail (stateful handler on horizontally-scaled tier without sticky-session strategy) → CRITICAL; Gate 4 fail (POST without Idempotency-Key on irreversible side effects) → CRITICAL; Gate 5 fail (>1s synchronous work on user-facing route) → High; Gates 3/6/7 → Medium; Gate 8 incomplete (no load test) → headroom-unstated Info but ship-block High when target unmet.
rules/hatch3r-api-design.md — idempotency requirement.rules/hatch3r-resilience-patterns.md — bulkheads section.rules/hatch3r-observability-metrics.md — USE method + burn-rate alerts.skills/hatch3r-observability-verify — telemetry harness reuse for Gate 7.agents/shared/quality-charter.md §Reliability quality + §API quality.docs.stripe.com/api/idempotent_requestsstripe.com/blog/idempotencybrandur.org/idempotency-keyswww.brendangregg.com/usemethod.htmlaws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/k6.io/docs/medium.com/codeelevation/why-stateless-services-quietly-break-in-real-systems-and-how-to-fix-them-24fc20951046npx claudepluginhub hatch3r/hatch3r --plugin hatch3rVerifies a service is production-ready via 9 reliability gates: SLO definition, kill switch, timeouts, retries, probes, runbook, staged rollout, ambiguity detection, and fan-out discipline. Runs before declaring a feature complete.
Guides scalability engineering: horizontal/vertical scaling decisions, Kubernetes auto-scaling, DB read replicas, PgBouncer connection pooling, rate limiting, backpressure, capacity planning. For bottlenecks and growth.
Provides scaling patterns including horizontal/vertical scaling, async processing, data partitioning, connection pooling, rate limiting, and backpressure for services exceeding capacity. Includes references and capacity estimation script.