О программе
Навык ax-narrate генерирует структурированное повествование о сессии при активации фразами вроде "расскажи об этой сессии" или "подведи итог изменений". Он фиксирует полную историю разработки, включая исправления, отброшенные попытки и сбои инструментов, которые не отображаются в итоговых пул-реквестах. Результат сохраняется в виде JSON-файла в `.ax/narrations/` для просмотра в ax studio.
Быстрая установка
Claude Code
Рекомендуетсяnpx skills add Necmttn/ax -a claude-code/plugin add https://github.com/Necmttn/axgit clone https://github.com/Necmttn/ax.git ~/.claude/skills/ax-narrateСкопируйте и вставьте эту команду в Claude Code для установки этого навыка
Документация
ax:narrate - write the session's story as a structured narration
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.
Step 1 - identify the session
- Preferred:
ax sessions here --days=1 --jsonand pick the current session's id (the one matching this conversation). Use the short id. - If
axis unavailable or the session isn't ingested yet, derive a slug:<repo>-<YYYYMMDD-HHmm>. Note inmetathat turn seqs are best-effort ordinals in that case. - If available,
ax sessions show <id> --jsongives you the real turn seqs to anchor against. Prefer real seqs over guesses.
Step 2 - reconstruct the story from your own context
Re-read the conversation in your head before writing anything:
- What did the user originally ask for? (intent)
- What existed before, what exists now? (before/after)
- Where did the user redirect or correct you? EVERY one of these
becomes a
correctionanchor. No exceptions. - Which tool failures actually mattered (changed your approach, cost
real time, forced a workaround)? Each becomes a
tool_failureanchor. Skip trivial retries that changed nothing. - Which attempts were abandoned? They get a stop or at least a
turnanchor - abandonment is part of the story.
Step 3 - choose 3-7 stops, in reading-flow order
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):
- Entry point first: the change that, understood alone, unlocks the rest.
- Cause before effect: the correction comes before the code it caused.
- Definitions before consumers: types/schema stops before usage stops.
- Verification last: tests, typecheck, and the failures hit on the way.
- Combine trivial housekeeping into one final stop, or omit it.
Step 4 - write each stop
- title: short and friendly. "Call counts become a char diffstat", not "Changes to files-touched.ts".
- gist: ONE sentence. Not two. A reader who reads nothing else must get the stop from the gist. Conversational, the way you'd say it to a colleague.
- detail: 2-4 sentences of markdown (paragraphs,
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. - transition: a short connective phrase to the next stop; empty
string
""for the last stop. - anchors: MUST be non-empty. An unanchored stop is an unsupported claim. Anchor kinds:
| 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 |
Hard anchor rules
file_hunkcarries 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: nullfor pure insertions,new_text: nullfor pure deletions. Never both null.- Every user correction/redirect in the session gets a
correctionanchor with a verbatim (trimmed)quoteand a concreteoutcome- what actually changed because of it. - Every consequential tool failure gets a
tool_failureanchor with a realerror_excerptand how you recovered (or"abandoned"). - Never fabricate turn seqs. Use
ax sessions showseqs when you have them; otherwise count user turns from the start of the conversation and say so in the detail. code_stateis the architecture spine of the narration: pick ONE stableartifactid (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. Usecode_statefor the evolving design; usefile_hunkfor one-off code jumps (those render as static before/after diffs, not motion).
Step 5 - emit the artifact
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:
stopsnon-empty (3-7), every stop'sanchorsnon-empty.- Every gist is one sentence; every
correctionhas anoutcome; everytool_failurehas arecovery; nofile_hunkwith both sides null or empty. - Strings are plain JSON strings (escape newlines in hunks as
\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.
GitHub репозиторий
Часто задаваемые вопросы
Что такое Skill ax-narrate?
ax-narrate — это Claude Skill от Necmttn. Skills объединяют инструкции и ресурсы, которые Claude загружает по мере необходимости, чтобы выполнять задачи, связанные с ax-narrate, без дополнительных запросов.
Как установить ax-narrate?
Используйте команды установки на этой странице: добавьте ax-narrate в Claude Code как плагин или клонируйте репозиторий в каталог skills, затем перезапустите Claude, чтобы загрузить Skill.
К какой категории относится ax-narrate?
ax-narrate относится к категории Мета.
Можно ли использовать ax-narrate бесплатно?
Да. ax-narrate размещён на AIMCP и доступен для бесплатной установки.
Похожие навыки
Этот навык предоставляет проверенную в продакшене настройку для Content Collections — TypeScript-ориентированного инструмента, который преобразует файлы Markdown/MDX в типобезопасные коллекции данных с валидацией Zod. Используйте его при создании блогов, сайтов документации или контентных приложений на Vite + React для обеспечения типобезопасности и автоматической проверки содержимого. Он охватывает всё: от настройки плагина Vite и компиляции MDX до оптимизации развертывания и валидации схем.
Этот навык позволяет разработчикам создавать приложения на платформе прогнозных рынков Polymarket, включая интеграцию с API для торговли и получения рыночных данных. Он также обеспечивает потоковую передачу данных в реальном времени через WebSocket для отслеживания текущих сделок и рыночной активности. Используйте его для реализации торговых стратегий или создания инструментов, обрабатывающих обновления рынка в реальном времени.
Этот навык помогает разработчикам создавать плагины OpenCode, которые подключаются к более чем 25 типам событий, таким как команды, файлы и операции LSP. Он предоставляет структуру плагина, спецификации API событий и шаблоны реализации для модулей на JavaScript/TypeScript. Используйте его, когда вам нужно перехватывать, отслеживать или расширять жизненный цикл ассистента OpenCode AI с помощью пользовательской событийно-ориентированной логики.
SGLang — это высокопроизводительный фреймворк для обслуживания больших языковых моделей (LLM), специализирующийся на быстрой структурированной генерации JSON, regex и рабочих процессов агентов с использованием кэширования префиксов RadixAttention. Он обеспечивает значительно более высокую скорость вывода, особенно для задач с повторяющимися префиксами, что делает его идеальным для сложных структурированных результатов и многократных диалогов. Выбирайте SGLang вместо альтернатив, таких как vLLM, когда вам требуется ограниченное декодирование или вы создаете приложения с интенсивным совместным использованием префиксов.
