/ax:ax-narratefrom ax
Writes a structured narration of the current Claude Code session, capturing changes, corrections, abandoned attempts, and tool failures that never reach a PR. Outputs to .ax/narrations/<session-id>.json.
Ships in ax. 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.
You were there. This skill turns YOUR OWN memory of the session into a reviewable artifact: 3-7 stops in reading-flow order, each anchored to real evidence - code hunks, turn numbers, user quotes, failures. The point is to capture what a PR diff never shows: the corrections, the dead ends, the recoveries.
The artifact validates against SessionNarration in
apps/studio/src/routes/narration-types.ts and renders in ax studio.
ax sessions here --days=1 --json and pick the current
session's id (the one matching this conversation). Use the short id.ax is unavailable or the session isn't ingested yet, derive a
slug: <repo>-<YYYYMMDD-HHmm>. Note in meta that turn seqs are
best-effort ordinals in that case.ax sessions show <id> --json gives you the real turn
seqs to anchor against. Prefer real seqs over guesses.Re-read the conversation in your head before writing anything:
correction anchor. No exceptions.tool_failure
anchor. Skip trivial retries that changed nothing.turn anchor - abandonment is part of the story.A stop is a LOGICAL unit of change, not a file. If three files changed for one reason, that is ONE stop with several anchors. Order rules (stolen from the code-tour playbook because they work):
inline code,
bold). Say WHY the change looks the way it does; "we did X
instead of Y because Z" is exactly what the reader wants."" for the last stop.| kind | required fields | use for |
|---|---|---|
file_hunk | file, old_text, new_text, label, opt turn_seq | a real code change |
code_state | artifact, label, lang, code, opt turn_seq | the evolving architecture snapshot |
turn | turn_seq, label | a plain moment in the transcript |
user_direction | turn_seq, quote | user steering (not correcting) |
correction | turn_seq, quote, outcome | user correcting course |
tool_failure | turn_seq, tool, error_excerpt, recovery | consequential failure |
term | name, definition | a domain term the story leans on |
file_hunk carries VERBATIM old/new fragments from the actual edits
you made - copy the real text, never paraphrase code. Keep hunks
short (5-15 lines per side); pick the most telling fragment, not the
whole edit. old_text: null for pure insertions, new_text: null
for pure deletions. Never both null.correction
anchor with a verbatim (trimmed) quote and a concrete outcome -
what actually changed because of it.tool_failure anchor with a
real error_excerpt and how you recovered (or "abandoned").ax sessions show seqs when you have
them; otherwise count user turns from the start of the conversation
and say so in the detail.code_state is the architecture spine of the narration: pick ONE
stable artifact id (e.g. "review-architecture") and restate the
FULL snapshot at each stop where the design moved - pseudo-code of
types/interfaces, how they compose, and the call stack (plan-style:
Caller -> Callee // note). Consecutive snapshots of the same
artifact animate token-by-token in studio, so KEEP shared lines
byte-identical between stops and let only the real delta differ - a
new method, a renamed shape, an added edge case. Use code_state
for the evolving design; use file_hunk for one-off code jumps
(those render as static before/after diffs, not motion).Write .ax/narrations/<session-id>.json (create the directory if
needed) with exactly this top-level shape:
{
"schema_version": 1,
"kind": "narration",
"meta": {
"session_id": "<id>",
"generated_at": "<ISO-8601 now>",
"generator": "skill",
"model": "<your model id>"
},
"title": "...",
"intent": "...",
"before": "...",
"after": "...",
"stops": [ { "title": "...", "gist": "...", "detail": "...", "transition": "...", "anchors": [ ... ] } ]
}
Before finishing, self-check against the validator's rules:
stops non-empty (3-7), every stop's anchors non-empty.correction has an outcome;
every tool_failure has a recovery; no file_hunk with both
sides null or empty.\n).Then tell the user where the file landed and give a 2-line summary of the story you wrote. Do not paste the whole JSON into chat.
What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/ax-extract-workflowReconstruct the workflow behind a past artifact - "what made X work" / "extract workflow from <date|sha>" / "how did we ship Y". Uses ax to find the relevant sessions and narrate the ordered skill arcs that produced the result. Triggers on "what made X work", "how did we build Y", "extract workflow from <date>", "extract workflow from <sha>", "what was the workflow around <topic>", "show me how I shipped <feature>", "reconstruct the recipe for <artifact>". Do NOT fire on generic "show recent activity" - this skill is for reconstructing the workflow behind a specific artifact./ax-repoStar the ax repo, file an issue / bug report, or fork-and-open-a-PR against github.com/Necmttn/ax on the user's behalf, by shelling out to the `gh` CLI. Triggers when the user says "star ax", "star the repo", "I want to support ax", "report this as an ax bug", "file an ax issue", "open an issue on ax", "this looks like an ax bug", "I want to contribute to ax", "fix this in ax", "open a PR against ax", or after an unhandled ax error when the user wants to report it. Acts only on an explicit user request - proactive star prompting is handled deterministically by the CLI (`ax star`), not this skill. Confirms before any account-mutating action (never stars without an explicit yes); falls back to a plain GitHub URL when `gh` is missing or unauthenticated. Do NOT auto-trigger on unrelated GitHub work or other repos.Generated from the plugin's indexed repository (necmttn/ax) — no native marketplace selected
npx claudepluginhub p/necmttn-axOther plugins' skills for the same job