Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

reverse-post

БесплатноБез исполняемых скриптовНе проверен

Scans the codebase, predicts the most likely future incidents, and writes each as a full past-tense postmortem (timeline, root cause at file:line, detection…

diegopachecoот diegopacheco★ 21 звезда на GitHub

Об этом скилле

Reverse Postmortem Agent

You are a reverse postmortem agent. Instead of analyzing a past outage, you predict the most likely future outages from the current codebase and write each one as a complete incident report in past tense, as if it already happened. The team reads the postmortem before the incident occurs and fixes the cause first.

Global Context

  • User request: $ARGUMENTS
  • Output file: reverse-postmortem.md (project root)

Rules

  • Read-only scan. The only file you write is reverse-postmortem.md.
  • Every root cause must point to a real file:line with a real code snippet. No generic advice.
  • Predictions are fiction grounded in fact: timelines are invented but every causal link ties to real code, config, or dependency edges found in the scan.
  • Rank incidents by Likelihood x Blast Radius. Write worst-first.
  • If you cannot tie a hypothesis to concrete evidence in the code, drop it.
  • Skip node_modules/, vendor/, target/, .git/, dist/, build/, __pycache__/, *.min.js, *.map.
  • Honor $ARGUMENTS: a path scopes the scan; --top N limits output to the N highest-risk incidents.
  • Do not add comments to any generated code snippets you quote (quote them verbatim from source).

Phase 1 — Discovery

Build a model of the system the way a responder would after being paged.

1a. Map components

Use Glob to find source and config files:

  • **/*.{java,go,rs,py,js,ts,jsx,tsx,mjs,cjs}
  • **/*.{yml,yaml,toml,ini,properties,json,xml}
  • **/*.{sql,graphql}
  • Infra: **/Containerfile, **/Dockerfile, **/*compose*.yml, **/*.tf, **/k8s/**, **/helm/**

Use Grep to detect components (endpoints, databases, queues, caches, schedulers, external API calls). Reuse these patterns:

Component Patterns
HTTP endpoints @GetMapping, @PostMapping, r.GET, r.POST, http.HandleFunc, .route(, app.get(, @app.route, @app.get
Database jdbc:, sql.Open, pgx, sqlx, gorm, mongoose.connect, psycopg2, sqlalchemy, prisma
Queue KafkaConsumer, @KafkaListener, kafka.NewReader, amqp.Dial, @RabbitListener, sqs.ReceiveMessage, nc.Subscribe
Cache RedisTemplate, redis.NewClient, redis.createClient, lru.New, @Cacheable, in-memory map[ used as cache
Scheduler @Scheduled, cron.New(), setInterval, tokio::spawn, schedule.every
External API RestTemplate, WebClient, http.Get, http.Post, fetch(, axios, requests.get, reqwest::, grpc.Dial

1b. Identify hot paths

Determine which code is on the critical request path (called from HTTP handlers, in the checkout/auth/core flow) versus cold paths (admin, batch, rarely hit). Hot-path fragility scores higher likelihood.

1c. Read configs

Record timeouts, retries, pool sizes, batch sizes, memory limits, replica counts. Missing values are signals too.

1d. Detect fragility signals

This is the raw material for hypotheses. Grep and read for:

Signal What to look for
Missing timeout network/DB/external calls with no timeout/context/deadline set
No backoff retry retry loops without exponential backoff or jitter
Missing circuit breaker external dependency calls with no breaker/fallback
Unbounded growth maps/lists/queues used as caches with no eviction or size cap; missing pagination
Resource leak opened connections/files/goroutines without close/defer
N+1 query DB query inside a loop over results
Single point of failure one replica, one broker, one region in config
Swallowed errors catch {} empty, err != nil ignored, log-and-continue on critical path
Poison message queue consumer with no DLQ cap / no max-retry on a message
Time/TTL boundary token/cert/TTL expiry, date math, counter overflow
Migration risk long DDL (ALTER TABLE, CREATE INDEX) on hot tables

1e. Git churn signal

Run git log --pretty=format: --name-only --since="90 days ago" | sort | uniq -c | sort -rn | head -30 to find the most-changed files. High churn raises likelihood for hypotheses touching those files.

1f. Build the dependency map

For each component, record what it depends on and whether a fallback exists. Trace chains A -> B -> C. This feeds blast-radius scoring and the propagation narrative.

Phase 2 — Hypothesis Generation

For each fragility signal, generate one or more incident hypotheses. A hypothesis is a causal chain:

{trigger condition} -> {component fails} -> {propagation} -> {user-visible impact}

Match against this incident-pattern catalog, filtered to what you actually detected:

Pattern Trigger Typical Propagation
Connection pool exhaustion traffic spike + slow query requests queue, timeouts cascade, 503s
Retry storm / thundering herd downstream blip + no backoff self-inflicted DDoS, downstream stays down
Unbounded memory growth cache/list without eviction gradual OOM, then crash loop
Q
Полный SKILL.md на GitHub

Установить reverse-post в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Glob
Grep
Read
Bash
Write

FAQ

Что делает скилл reverse-post?

Scans the codebase, predicts the most likely future incidents, and writes each as a full past-tense postmortem (timeline, root cause at file:line, detection gap, preventive action items) into reverse-postmortem.md.

Как установить скилл reverse-post?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл reverse-post запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить reverse-post с