/core-skills:post-merge-retrospectivefrom core-skills
After a PR is merged, analyzes the session conversation to surface errors, inefficiencies, and friction points, then recommends new skills and writes a machine-readable JSON artifact to disk for tracking improvements over time.
Ships in core-skills. 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.
Read when SKILL.md points to them.
Analyzes the completed session conversation after a PR merge to surface friction signals, errors, and inefficiencies, then recommends new skills and emits a structured JSON artifact.
gh pr merge or equivalent completesBash(gh pr merge) — see hook configuration below/post-merge-retrospective at the end of any significant sessionYou are using the Haiku variant for cost efficiency. Work through the steps below using the session conversation already in context.
Identify the PR reference from $ARGUMENTS, or auto-detect:
git log --merges -1 --pretty="%s"
# or
git branch --show-current
Note the approximate session turn count and total tool calls from context.
Scan every assistant turn and tool call in context. Classify each signal:
| Signal type | Definition |
|---|---|
error | Tool call or command returned non-zero exit or error message |
correction | User explicitly corrected Claude's output or direction |
loop | Claude re-read or re-executed the same operation without clear progress |
assumption_failure | Claude made an assumption that proved wrong, requiring backtrack |
missing_context | Claude asked for information the user supplied that could have been pre-loaded |
inefficiency | Approach that worked but took significantly more steps than necessary |
capability_gap | Task where no skill/tool existed, forcing ad-hoc reasoning from scratch |
For each signal record:
type — from table aboveturn_index — approximate assistant turn numberdescription — one concrete sentenceimpact — low | medium | highrepeatable — true if this would recur in a similar sessionFor each repeatable: true signal with impact: medium|high, assess whether a skill would address it. Apply the decision gate:
Recommend a skill only if: (a) Claude needed domain-specific context not in its training data, OR (b) the task required 3+ coordinated steps assembled from scratch, OR (c) a guard/hook would prevent an error class from recurring.
Classify each into one of eight categories:
library-api-reference | product-verification | data-fetching | business-automation | scaffolding | code-quality | ci-cd | runbook
Emit each recommendation with:
name — kebab-case skill namecategory — from list aboverationale — one sentence linking it to the observed frictiontrigger_description — what user request should activate the skillpriority — high | medium | lowestimated_reuse — once | occasional | frequentPOST to the Worker (requires $AI_CONFIG_TOKEN and $AI_CONFIG_WORKER):
HTTP_STATUS=$(curl -s -o /tmp/retro-response.json -w "%{http_code}" \
-X POST "${AI_CONFIG_WORKER}/v1/retrospectives" \
-H "Authorization: Bearer ${AI_CONFIG_TOKEN}" \
-H "Content-Type: application/json" \
-d '<artifact-json>')
id from /tmp/retro-response.json; artifact URL is ${AI_CONFIG_WORKER}/v1/retrospectives/<id>~/.ai-config-os/retrospectives/<YYYY-MM-DD>-<pr_ref>.jsonfs.write: print JSON to stdout and note "stdout fallback"To query for skill signals across all recent retrospectives:
curl -s "${AI_CONFIG_WORKER}/v1/retrospectives/aggregate" \
-H "Authorization: Bearer ${AI_CONFIG_TOKEN}"
Print a concise summary:
Signals: <N> total, <N> high-impact
Recommendations: <N> skills proposed
Artifact: <Worker-URL>/v1/retrospectives/<id> [or local path / stdout on fallback]
To trigger automatically after every gh pr merge, add via /update-config:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash(gh pr merge)",
"hooks": [
{
"type": "command",
"command": "echo 'Run /post-merge-retrospective to capture session insights'"
}
]
}
]
}
}
For a fully automated trigger, replace the echo with a script that writes a marker file and invokes the skill on next session start.
See schema/artifact.schema.json for the full contract. Top-level structure:
{
"schema_version": "1.0",
"generated_at": "<ISO 8601>",
"pr_ref": "<string>",
"session_stats": {
"turn_count": 0,
"tool_calls": 0,
"duration_hint": "<string>"
},
"friction_signals": [
{
"type": "error|correction|loop|assumption_failure|missing_context|inefficiency|capability_gap",
"turn_index": 0,
"description": "<string>",
"impact": "low|medium|high",
"repeatable": true
}
],
"skill_recommendations": [
{
"name": "<kebab-case>",
"category": "<category>",
"rationale": "<string>",
"trigger_description": "<string>",
"priority": "high|medium|low",
"estimated_reuse": "once|occasional|frequent"
}
],
"summary": {
"total_signals": 0,
"high_impact_signals": 0,
"recommendation_count": 0
}
}
Input: /post-merge-retrospective
Output: Artifact at ~/.ai-config-os/retrospectives/2026-03-23-pr42.json — 4 signals (2 high-impact), 2 skill recommendations
Input: /post-merge-retrospective 17
Output: Artifact with 1 signal (missing_context, high), 1 recommendation: db-schema-loader (category: library-api-reference, priority: high, estimated_reuse: frequent)
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub internet-dot/ai-config-os --plugin core-skills35 skills in this plugin
/autoresearchAutonomously optimise any skill by running it repeatedly, scoring outputs against
binary evals, mutating the prompt, and keeping improvements. Based on Karpathy's
autoresearch methodology.
Use when: "optimise this skill", "improve this skill", "run autoresearch on",
"make this skill better", "self-improve skill", "benchmark skill", "eval my skill",
"run evals on". Outputs: an improved SKILL.md copy, a results log, and a changelog
of every mutation tried.
/changelogWhen to useGenerate structured changelog entries from git history, grouping commits by conventional prefix and flagging breaking changes./