MCP HubMCP Hub
SKILL·532D1F

ax-narrate

Necmttn
更新日 27 days ago
4 閲覧
104
12
104
GitHubで表示
メタai

について

ax-narrateスキルは、「このセッションをナレートして」や「変更点を要約して」などのフレーズでトリガーされると、構造化されたセッションナレーションを生成します。最終的なPRには現れない修正内容、放棄された試み、ツールの失敗を含む、開発ストーリー全体を捕捉します。出力はJSONファイルとして`.ax/narrations/`に保存され、ax studioでのレビューに利用されます。

クイックインストール

Claude Code

推奨
メイン
npx skills add Necmttn/ax -a claude-code
プラグインコマンド代替
/plugin add https://github.com/Necmttn/ax
Git クローン代替
git 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 --json and pick the current session's id (the one matching this conversation). Use the short id.
  • If 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.
  • If available, ax sessions show <id> --json gives 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:

  1. What did the user originally ask for? (intent)
  2. What existed before, what exists now? (before/after)
  3. Where did the user redirect or correct you? EVERY one of these becomes a correction anchor. No exceptions.
  4. Which tool failures actually mattered (changed your approach, cost real time, forced a workaround)? Each becomes a tool_failure anchor. Skip trivial retries that changed nothing.
  5. Which attempts were abandoned? They get a stop or at least a turn anchor - 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:
kindrequired fieldsuse for
file_hunkfile, old_text, new_text, label, opt turn_seqa real code change
code_stateartifact, label, lang, code, opt turn_seqthe evolving architecture snapshot
turnturn_seq, labela plain moment in the transcript
user_directionturn_seq, quoteuser steering (not correcting)
correctionturn_seq, quote, outcomeuser correcting course
tool_failureturn_seq, tool, error_excerpt, recoveryconsequential failure
termname, definitiona domain term the story leans on

Hard anchor rules

  • 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.
  • Every user correction/redirect in the session gets a correction anchor with a verbatim (trimmed) quote and a concrete outcome - what actually changed because of it.
  • Every consequential tool failure gets a tool_failure anchor with a real error_excerpt and how you recovered (or "abandoned").
  • Never fabricate turn seqs. Use 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).

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:

  • stops non-empty (3-7), every stop's anchors non-empty.
  • Every gist is one sentence; every correction has an outcome; every tool_failure has a recovery; no file_hunk with 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 リポジトリ

Necmttn/ax
パス: skills/narrate
0
agent-memoryagent-observabilityai-agentsbunclaude-codecodex
FAQ

よくある質問

ax-narrate Skillとは何ですか?

ax-narrate はNecmttn が作成した Claude Skillです。Skillは、Claudeが必要に応じて読み込む指示とリソースをまとめ、追加の指示なしで ax-narrate に関連するタスクを実行できるようにします。

ax-narrate をインストールするには?

このページのインストールコマンドを使用してください。ax-narrate をプラグインとして Claude Code に追加するか、リポジトリを skills ディレクトリにクローンし、Claudeを再起動してSkillを読み込みます。

ax-narrate はどのカテゴリに属しますか?

ax-narrate は メタ カテゴリに属します。

ax-narrate は無料で利用できますか?

はい。ax-narrate は AIMCP に掲載されており、無料でインストールできます。

関連スキル

content-collections
メタ

このスキルは、Content Collections(Markdown/MDXファイルを型安全なデータコレクションに変換するTypeScriptファーストのツール)の本番環境でテストされた設定を提供します。Zodバリデーションによる型安全性を実現し、ブログ、ドキュメントサイト、コンテンツ重視のVite + Reactアプリケーション構築時にご利用ください。Viteプラグインの設定、MDXコンパイルから、デプロイ最適化、スキーマバリデーションまで、すべてを網羅しています。

スキルを見る
polymarket
メタ

このスキルは、開発者がPolymarket予測市場プラットフォームを活用したアプリケーション構築を可能にします。API統合による取引や市場データの取得に加え、WebSocketを介したリアルタイムデータストリーミングにより、ライブ取引や市場活動を監視できます。取引戦略の実装や、ライブ市場更新を処理するツールの作成にご利用ください。

スキルを見る
creating-opencode-plugins
メタ

このスキルは、開発者がコマンド、ファイル、LSP操作など25種類以上のイベントタイプにフックするOpenCodeプラグインを作成することを支援します。JavaScript/TypeScriptモジュール向けに、プラグイン構造、イベントAPI仕様、および実装パターンを提供します。カスタムイベント駆動ロジックでOpenCode AIアシスタントのライフサイクルをインターセプト、監視、または拡張する必要がある場合にご利用ください。

スキルを見る
sglang
メタ

SGLangは、高性能なLLMサービングフレームワークであり、RadixAttentionプレフィックスキャッシュを活用したJSON、正規表現、エージェントワークフロー向けの高速で構造化された生成を特長とします。特にプレフィックスが繰り返されるタスクにおいて、大幅に高速な推論を実現し、複雑な構造化出力やマルチターン対話に最適です。制約付きデコードが必要な場合や、広範なプレフィックス共有を伴うアプリケーションを構築する場合は、vLLMなどの代替案ではなくSGLangを選択してください。

スキルを見る