skills/post-mortem/SKILL.md
Document a resolved bug or incident as a structured post-mortem. Captures root cause, what was tried, what fixed it, and lessons learned — committed locally for future reference.
npx skillsauth add RonanCodes/ronan-skills post-mortemInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
After resolving a tricky bug or incident, document what happened so you never debug the same thing twice. Creates a structured markdown file committed to the repo.
/post-mortem "stale closure in useEffect causing infinite re-renders"
/post-mortem "CI failing on arm64 — missing native dependency"
/post-mortem
If no argument is given, ask the user to describe the issue that was just resolved.
/debug-escape finds the root cause and the fix is appliedCollect information from the current session:
Check git history for supporting context:
git log --oneline -10 — recent commits related to the fixgit diff — what changed in the fixCreate the file at .post-mortems/<date>-<slug>.md where:
<date> is YYYY-MM-DD<slug> is a kebab-case summary (e.g. stale-closure-useeffect, ci-arm64-native-dep)Use this template:
# <Title>
**Date:** <YYYY-MM-DD>
**Time to resolve:** <approximate>
**Severity:** <low | medium | high | critical>
**Area:** <file path, module, or system area>
**Tags:** `bug/introduced/<slug>` → `bug/fixed/<slug>`
## Symptom
<What was observed — exact error messages, unexpected behavior, how it manifested>
## Root Cause
<What was actually wrong and why — be specific>
## What We Tried
1. <First attempt> — <why it didn't work>
2. <Second attempt> — <why it didn't work>
3. ...
## What Fixed It
<The actual fix — reference the commit if already committed>
```diff
<include the key diff if short enough>
### 3. Tag the Fix
Tag the fix commit so it's easy to find via `git tag -l "bug/*"`:
```bash
git tag bug/fixed/<slug> <fix-commit-hash>
If /debug-escape already tagged the introducing commit as bug/introduced/<slug>, reference both in the post-mortem. If the introducing commit wasn't tagged yet and you know which commit introduced the bug, tag it now:
git tag bug/introduced/<slug> <introducing-commit-hash>
The tag pair tells the full story: git log bug/introduced/<slug>..bug/fixed/<slug> shows everything between cause and cure.
Check if .post-mortems/ is gitignored. It should NOT be — these files are meant to be committed and shared with the team.
Stage and commit the post-mortem:
git add .post-mortems/<date>-<slug>.md
git commit -m "📝 docs: post-mortem — <short description>"
bug/fixed/<slug> — tag the introducing commit too if knowndevelopment
--- name: worktree description: Coordinate multiple agents on one repo via a worktree-lock pool, so two agents never clobber each other's working tree. Acquire the first free slot (main, then beta/gamma… worktrees, created on demand), work there on your own branch, release when you've pushed. Use before modifying any repo that might be in use by another agent (factory, dataforce, etc.), or whenever you're told a repo is being worked on. Backed by `ro worktree`. category: development argument-hin
testing
--- name: ship description: Ship a feature branch the local-CI-first way — run the full local gate, push, open a PR, squash-merge, then deploy, without waiting on GitHub Actions. Use when a branch is ready for main and you want it merged and deployed now. Reads CI policy from `ro ci` (default skips remote CI because GitHub Actions billing keeps hitting limits). Sibling to /ro:gh-ship (waits on GitHub checks) and /ro:cf-ship (the deploy half). Triggers on "ship it", "ship this", "merge and deploy
testing
--- name: setup-logging description: Set up (or audit) the observability stack in a TanStack Start + Cloudflare Workers app so it is "diagnosable by default" — structured logging (logtape) with a request context carrying trace_id + userId + tenant/orgId, a trace_id propagated FE→BE→logs→Sentry→PostHog, Cloudflare Workers observability enabled, and Sentry + PostHog wired. Two modes: `setup` (wire it into an app) and `audit` (check an existing app + report gaps). Use when scaffolding a new app, wh
development
Manage credentials INSIDE the active ~/.claude/.env file — read which token/account to use for a given app (Simplicity vs Dataforce vs Ronan-personal), add or update a secret WITHOUT it passing through the chat (an interactive Terminal window prompts for it), and track secrets that were exposed in a transcript so they get rotated. Sibling to /ro:context (which switches WHICH env file is active). Use when the user wants to add an API key/token/secret, asks "which credential do I use for X", needs the env organized/labelled, or a secret was pasted into the chat and should be rotated.