/solopreneur:post-mortemfrom solopreneur
Traces when a bug was introduced using git history, identifies root cause commit, and produces a structured post-mortem report.
Ships in solopreneur. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Given a bug description, trace through git history to find when it was introduced, identify the root cause, and produce a structured report.
Code is truth — user-provided clues are just search starting points.
Users typically only know the symptoms, suspect a feature, or recall a related PR. These are valuable leads but cannot be taken at face value. Your job is to verify against actual git diffs, not follow assumptions blindly.
The fix commit is the most reliable root cause guide.
If a fix commit exists (merged or on another branch), find it first. The person who fixed it usually understood the problem — what they changed and what they wrote in the commit message often directly reveals what broke and why. Then trace backward to find when the broken code was introduced.
Collect from the user:
Good version does not need to come from the user — it's usually the previous release / tag / stable commit. Derive it from git log yourself.
# Resolve version / tag / branch to a definite commit hash
git rev-parse <bad_version>
# Find the previous good version (last release commit)
git log --oneline --format="%h %ad %s" --date=short <bad_commit>~20..<bad_commit>
# List all commits between the two versions (to understand scope of changes)
git log --oneline --format="%h %ad %s" --date=short <good_commit>..<bad_commit> --reverse
Before searching for the introduction, find the fix. The fix commit's diff and message are the most reliable root cause guide — they directly show what was replaced and why.
# Search for fix commits after the bad version
git log --oneline --grep="fix\|hotfix\|patch\|revert" <bad>..HEAD
# If the user mentioned a fix branch, look at it directly
git log --oneline <fix_branch> --not main | head -10
git show <fix_commit_hash>
When reading the fix commit, focus on:
With this information, proceed to Phase 4 to find when the broken code was introduced.
Now that you know "what code is the problem", find "when this code first appeared":
# Trace change history of the specific file
git log --oneline -- path/to/file
# View a specific commit's changes to that file
git show <commit_hash> -- path/to/file
# Compare good and bad versions to confirm when the problematic code appeared
git diff <good_commit>..<bad_commit> -- path/to/file
Sometimes the root cause was planted in the "good version" but didn't trigger on its own — it only manifested when a later change increased call frequency, data volume, or altered timing.
In this case:
Criterion: if the "suspicious commit" you found in the version window cannot logically explain the crash mechanism, widen your search to earlier commits.
# Expand to earlier history
git log --oneline <good_commit>~30..<bad_commit> -- path/to/file
When this happens, the report should explain both:
If the bug hasn't been fixed yet, fall back to keyword search:
# Search for suspicious commits by symptom keywords
git log --oneline --grep="<feature_keyword>" <good>..<bad>
# Diff suspicious commits directly
git show <commit_hash> -- path/to/file
# Use pickaxe to search for additions/removals of specific strings
git log -S "suspicious_function_name" <good>..<bad>
After finding a suspicious change, ask yourself: "Can this change logically cause the symptoms the user described?" You need a clear logical explanation, not gut feeling. If you can't explain it, keep looking.
Output a markdown report in the following format. Adapt headings and wording to fit the actual situation — don't copy the template verbatim.
## Post-mortem: [one-line bug description]
### Root Cause (TL;DR)
[1-2 sentences: what change caused the bug and why. Get straight to the point.]
### Timeline
| Date | Commit | Event |
|------|--------|-------|
| YYYY-MM-DD HH:MM | `xxxxxxx` | Bug introduced — [commit title] |
| YYYY-MM-DD HH:MM | `xxxxxxx` | [Affected version] released (exposure begins) |
| YYYY-MM-DD HH:MM | `xxxxxxx` | Bug fixed — [commit title] |
| YYYY-MM-DD HH:MM | `xxxxxxx` | [Fix version] released (exposure ends) |
**Exposure window**: X hours / X days
### The Change That Introduced the Bug
[Explain the original intent of the PR / commit]
// Bad: this code caused the issue
[Explain why this code causes the crash / bug]
### The Fix
[Explain the fix approach]
// Fixed
### Root Cause Analysis
[Explain why this bug appeared at this time — not just "what code", but "why it
wasn't caught"]
### Prevention Measures
- [ ] [Specific action item]
- [ ] [Another action item]
[Each action item should be specific and trackable. Don't write vague things like
"add more tests" — write something like "add integration test for
HealthKitManager.requestAuthorization verifying typesToRead excludes correlation
types".]
After outputting the report, ask the user if they want to save it:
Save this report to a file? Suggested path:
docs/post-mortem/YYYY-MM-DD-[short-bug-description].md
If the user agrees, save to the corresponding path.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hanamizuki/solopreneur --plugin solopreneur17 skills in this plugin
/autopilotPR orchestration planner. Reads a task file, discusses PR splitting strategy
with the user, produces plan + spec files, and either dispatches a worktree
subagent in the current session (single PR, run now) or schedules execution
via cron (multi-PR, or single-PR scheduled). Use when the user wants a task
implemented, reviewed, and merged automatically — whether the scope fits in
one PR or needs to be split. Triggers: "autopilot", "orchestrate", "batch
implement", "split into PRs and run", or when the user provides a todo/spec
and wants unattended PR execution.
/codex-agents-bootstrapInstall or refresh custom agents shipped by solopreneur-family plugins in the
Codex user agents directory. Use after installing, updating, enabling, or
disabling a solopreneur-family plugin, or when the user asks to bootstrap,
install, refresh, or diagnose Codex agents. This is unnecessary on Claude.
/greenlightAutomated PR review loop that keeps running until the PR is clean. Triggers
external reviewers (Codex bot, Codex CLI, and the Gemini bot when activity
detection sees it on the repo), processes feedback, fixes issues, and
re-triggers — repeating until no new suggestions remain.
Supports `/greenlight external` to skip internal review and go straight to
external reviewers, and `/greenlight external gemini` to specify a starting
reviewer. Use when the user says "greenlight", "run reviews until clean",
"get this PR approved", or wants automated review cycling on an open PR.
Also auto-detects uncommitted mode: when on main branch with uncommitted
changes and no PR, runs Codex CLI `--uncommitted` review loop only, fixes
in-place without committing, until codex reports clean.
Also supports post-commit mode (explicit `/greenlight post-commit <SHA>`
or `<SHA1>..<SHA2>`): Phase 1 subagents + Codex CLI + agy (Gemini-family CLI)
in parallel, fixes as new commits on top (no amend, no new PR), pushes after
each round.
/handoffGenerate a self-contained handoff context document for the current work,
printed inline as markdown so the user can copy it and paste into any other
agent — a fresh Claude Code session, Codex, ChatGPT, or an agent on another
machine. Use when the user says /handoff, "write context for the next
session", "package this for handoff", "hand off to another agent", or wants
to capture the current session's state in a portable form. Output is printed
inline AND written to `/tmp/handoff/<YYYY-MM-DD>_<slug>.md`. No worktree is created (use
worktree-handoff if a git worktree is needed).
/merge-prMerge an open PR for the current branch. Refuses to merge when the worktree
has uncommitted changes, consolidates the branch's plan file (renaming
the latest Handoff Context section to Final Progress and moving the file
to done/ in state-machine mode), merges via GitHub CLI, and reports status.
Also cleans up stale merged-but-not-removed worktrees from prior sessions
on every Claude Code run. Codex V1 uses a merge-only profile that performs
no pre-merge plan or worktree mutation.
Use when the user says "merge", "merge PR", "merge this", or wants to
land the current branch.
/mvpMeta-orchestrator for going from a product idea to a demo-able MVP fast.
Drives the full flow: brainstorming → PRD visual confirmation (user
gate) → template lookup → MVP-flavored plan → single-subagent
execution. Optimized for **time-to-first-demo**, not production
quality — no TDD, no per-task review loops, no hardening. Use INSTEAD
OF superpowers:brainstorming when the user is starting a new product
from scratch — this skill calls brainstorming internally, then chains
in a PRD confirmation phase, template discovery, plan writing, and
execution. Triggers: "/mvp", "我要做 app", "想做產品",
"想做一個 app", "做個 MVP", "build a product", "build an app from
scratch", "MVP from scratch", "start a new app", "new product".
Other plugins' skills for the same job