agentsclimarketplace

Audit resilience

Skill kensaurus/cursor-kenji/skills/audit-resilience

🦖Curated Cursor AI agent skills, slash commands, MCP configs, subagents & rules for full-stack dev — React 19, Next.js 15, Supabase, Tailwind v4, TypeScript

Install
npx -y skills add kensaurus/cursor-kenji --skill audit-resilience

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Read-only audit for the non-functional "20%" AI agents systematically skip: timeouts, retries with backoff+jitter, circuit breakers, idempotency keys, rate limiting, graceful degradation/fallbacks, cancellation, audit logging on sensitive actions, and PII handling in logs. Inventories every external call, mutation, webhook, and payment path and marks each concern Implemented/Partial/Missing with file:line, severity, and the exact skill to fix it. Use when "is this production-ready", "resilience audit", "will this survive real traffic", "audit retries/timeouts/idempotency", "reliability review", "the 80% problem", or "audit-resilience". Produces a prioritized report only — remediation is delegated to backend-error-handling / backend-observability / backend-patterns / plan-* skills.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.2 KB, as published. Nobody here has run it

audit-resilience — The "80% Problem" Non-Functional Audit

Agents nail the happy path (CRUD, passing tests) and silently skip what decides whether code survives real traffic: a webhook with no idempotency key double-charges; a fetch with no timeout hangs the request; a retry storm with no backoff takes down the dependency; PII lands in plaintext logs. This audit finds those gaps before production does.

Read-only. This skill inventories resilience gaps and hands each to the right fix skill. It does not change code.


Phase 0 — Detect the surfaces

# Outbound calls + clients
rg -n "fetch\(|axios|got\(|httpx|requests\.|HttpClient|ky\(" -g "*.{ts,tsx,js,py,go}" -l
# Mutations / writes / external effects
rg -n "prisma\.|\.insert\(|\.update\(|\.delete\(|supabase\.|INSERT|UPDATE|DELETE" -g "*.{ts,py,sql}" -l
# Webhooks / payments / queues
rg -n "webhook|stripe|paypal|queue|kafka|sqs|bull|cron|schedule" -g "*.{ts,tsx,js,py}" -l
# Logging (for PII / audit-log review)
rg -n "console\.(log|error)|logger\.|logging\.|print\(" -g "*.{ts,tsx,js,py}" -c

Record: HTTP clients, external services, mutation/webhook/payment paths, queue/cron jobs, and the logging approach. If there are no external calls or mutations (pure static site / library), note reduced applicability.


Phase 1 — Research current patterns

Follow /research: current-year resilience patterns for the detected stack (retry/backoff libraries, circuit-breaker options, idempotency-key conventions, the platform's rate-limit primitives). Anchor to installed versions.


Phase 2 — Resilience matrix (per external call / mutation / endpoint)

For each surface, mark Implemented / Partial / Missing with file:line:

ConcernWhat to checkWhy it matters
TimeoutEvery outbound call has an explicit timeoutNo timeout = hung requests exhaust the pool
Retry + backoffTransient failures retried with exponential backoff + jitter, cappedNaive retries cause retry storms
Circuit breakerRepeated downstream failure trips a breaker / stops hammeringPrevents cascading failure
IdempotencyWrites/webhooks/payments use an idempotency key or dedupePrevents double-charge / double-write on retry
Rate limitingPublic/expensive endpoints are rate-limited per clientPrevents abuse and cost blowups
CancellationLong/aborted requests are cancellable (AbortSignal/context)Frees resources on navigation/timeout
Graceful degradationFallback/empty/cached path when a dependency is downApp stays usable, not white-screen
Error propagationFailures surface as structured errors, not swallowedSilent catch hides outages
rg -n "timeout|AbortController|AbortSignal|signal:" -g "*.{ts,tsx,js}" -c   # timeouts/cancellation
rg -n "retry|backoff|p-retry|exponential|jitter" -g "*.{ts,tsx,js,py}" -c    # retry policy
rg -n "idempotenc|dedupe|Idempotency-Key" -g "*.{ts,tsx,js,py}" -c           # idempotency
rg -n "rate.?limit|rateLimit|throttle|Ratelimit" -g "*.{ts,tsx,js,py}" -c    # rate limiting
rg -n "catch\s*\([^)]*\)\s*\{\s*\}" -g "*.{ts,tsx,js}"                        # empty catch (swallowed errors)

Phase 3 — Observability & sensitive-data handling

ConcernWhat to check
Audit loggingSensitive/mutating actions (auth, payment, role change, delete) are logged with actor + timestamp
PII in logsNo emails/tokens/card data/passwords logged in plaintext; redaction in place
Structured errorsErrors carry codes/context (not bare strings); correlation/trace id present
Health/timeouts surfacedFailures are observable (Sentry/logs), not only user-visible
rg -n "password|token|secret|email|ssn|card|cvv" -g "*.{ts,tsx,js,py}" | rg -n "log|console|print"

Phase 4 — Prioritized report (read-only)

## Resilience Audit — [repo] — [date]
**Surfaces:** [N outbound calls · M mutations · K webhooks/payments · queues/cron]

### Critical (data loss / double-charge / outage risk)
| Gap | Surface | file:line | Fix via |
|---|---|---|---|
| No idempotency key on payment webhook | /api/webhooks/stripe | ... | backend-patterns |

### High / Medium
| Concern | Implemented | Partial | Missing | Fix via |
|---|---|---|---|---|
| Timeouts | [n] | [n] | [n] | backend-error-handling |
| Retry+backoff | ... | ... | ... | backend-patterns |
| PII in logs | ... | ... | ... | backend-observability |

### Recommended order
1. [Critical idempotency/timeout gaps] → backend-patterns / backend-error-handling
2. [Rate limiting + LLM cost] → plan-llm-cost-guardrails
3. [Observability + PII redaction] → backend-observability

Forbidden: claiming production-readiness from passing tests alone; treating an empty catch as handled; skipping the payment/webhook idempotency check.


Related

  • backend-error-handling — implement timeouts, retries, structured errors, fallbacks
  • backend-patterns — circuit breakers, idempotency, queue/retry architecture
  • backend-observability — audit logging, PII redaction, tracing, alerting
  • plan-llm-cost-guardrails — rate limiting + quota abuse for LLM/expensive endpoints
  • plan-input-validation — the trust-boundary validation side of hardening
  • plan-data-integrity — destructive-op and data-loss protections
  • complete-everything — close the audited gaps to done with verification

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.