jpskill.com
📦 その他 コミュニティ

bmad-distillator

ユーザーが「文書の蒸留」や「蒸留物の作成」を求めた際に、元の情報を損なわずにLLM向けに最適化された圧縮を行うことで、文書を効率的に活用できるようにするSkill。

📜 元の英語説明(参考)

Lossless LLM-optimized compression of source documents. Use when the user requests to 'distill documents' or 'create a distillate'.

🇯🇵 日本人クリエイター向け解説

一言でいうと

ユーザーが「文書の蒸留」や「蒸留物の作成」を求めた際に、元の情報を損なわずにLLM向けに最適化された圧縮を行うことで、文書を効率的に活用できるようにするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o bmad-distillator.zip https://jpskill.com/download/23689.zip && unzip -o bmad-distillator.zip && rm bmad-distillator.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23689.zip -OutFile "$d\bmad-distillator.zip"; Expand-Archive "$d\bmad-distillator.zip" -DestinationPath $d -Force; ri "$d\bmad-distillator.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して bmad-distillator.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → bmad-distillator フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
3

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] bmad-distillator

Distillator: ドキュメント蒸留エンジン

概要

このスキルは、あらゆるソースドキュメントのセットから、超圧縮された、トークン効率の良いドキュメント(蒸留物)を生成します。蒸留物は、人間が必要とし、LLMには不要なすべてのオーバーヘッドを取り除きながら、ソースからのすべての事実、決定、制約、および関係を保持します。情報抽出と圧縮のスペシャリストとして機能します。出力は、ダウンストリームのLLMワークフローが情報損失なしに唯一のコンテキスト入力として消費できる、単一の密度の高いドキュメント(または意味的に分割されたセット)です。

これは圧縮タスクであり、要約タスクではありません。要約は情報が失われます。蒸留物は、LLMの消費に最適化されたロスレス圧縮です。

アクティベーション時

  1. 入力の検証。 呼び出し元は以下を提供する必要があります。

    • source_documents (必須) — 蒸留する1つ以上のファイルパス、フォルダーパス、またはグロブパターン
    • downstream_consumer (オプション) — この蒸留物を消費するワークフロー/エージェント(例:「PRD作成」、「アーキテクチャ設計」)。提供された場合、シグナルとノイズを判断するために使用します。省略された場合、すべてを保持します。
    • token_budget (オプション) — おおよその目標サイズ。提供され、蒸留物がそれを超える場合、意味的分割をトリガーします。
    • output_path (オプション) — 保存先。省略された場合、プライマリソースドキュメントの隣に-distillate.mdサフィックスを付けて保存します。
    • --validate (フラグ) — 蒸留物生成後にラウンドトリップ再構築テストを実行します。
  2. ルーティング — ステージ1に進みます。

ステージ

# ステージ 目的
1 分析 分析スクリプトを実行し、ルーティングと分割を決定します
2 圧縮 圧縮エージェントを起動して蒸留物を生成します
3 検証と出力 完全性チェック、フォーマットチェック、出力の保存
4 ラウンドトリップ検証 (--validate のみ) 再構築し、オリジナルと比較して差分を確認します

ステージ1: 分析

scripts/analyze_sources.py --help を実行し、次にソースパスを指定して実行します。そのルーティング推奨とグループ化出力を使用してステージ2を駆動します。ソースドキュメントを自分で読まないでください。

ステージ2: 圧縮

シングルモード (ルーティング = "single", ファイル数 ≤3, 推定トークン数 ≤15K):

agents/distillate-compressor.md を使用して、すべてのソースファイルパスを指定して1つのサブエージェントを起動します。

ファンアウトモード (ルーティング = "fan-out"):

  1. 分析出力からグループごとに1つの圧縮サブエージェントを起動します。各コンプレッサーは、そのグループのファイルパスのみを受け取り、中間蒸留物を生成します。

  2. すべてのコンプレッサーが戻った後、agents/distillate-compressor.md を使用して1つの最終的なマージコンプレッサーサブエージェントを起動します。中間蒸留物のコンテンツを入力として渡します(元のファイルではありません)。その役割は、グループ間の重複排除、テーマ別再グループ化、および最終圧縮です。

  3. 中間蒸留物のコンテンツをクリーンアップします(メモリ内にのみ存在し、ディスクには保存されません)。

グレースフルデグラデーション: サブエージェントの起動が利用できない場合、ソースドキュメントを読み込み、agents/distillate-compressor.md の同じ指示を使用して圧縮作業を直接実行します。ファンアウトの場合、グループを順次処理してからマージします。

コンプレッサーは、蒸留物コンテンツ、ソース見出し、名前付きエンティティ、およびトークン推定を含む構造化されたJSON結果を返します。

ステージ3: 検証と出力

コンプレッサー(またはマージコンプレッサー)が戻った後:

  1. 完全性チェック。 コンプレッサーによって返された見出しと名前付きエンティティのリストを使用して、それぞれが蒸留物コンテンツに表示されていることを確認します。ギャップが見つかった場合、完全な再圧縮ではなく、ターゲットを絞った修正パスのためにコンプレッサーに送り返します。最大2回の修正パスに制限します。

  2. フォーマットチェック。 出力が蒸留物フォーマットルールに従っていることを確認します。

    • 散文段落なし(箇条書きのみ)
    • 装飾的なフォーマットなし
    • 情報の繰り返しなし
    • 各箇条書きは自己完結型
    • テーマは##見出しで明確に区別されている
  3. 出力フォーマットの決定。 ステージ1からの分割予測と実際の蒸留物サイズを使用して:

    単一蒸留物 (約5,000トークン以下、または token_budget を超えない場合):

    フロントマター付きの単一ファイルとして保存します。

    ---
    type: bmad-distillate
    sources:
      - "{ソースファイル1への相対パス}"
      - "{ソースファイル2への相対パス}"
    downstream_consumer: "{コンシューマーまたは 'general'}"
    created: "{日付}"
    token_estimate: {おおよそのトークン数}
    parts: 1
    ---

    分割蒸留物 (約5,000トークンを超える、または token_budget が要求する場合):

    {base-name}-distillate/ フォルダーを作成し、以下を含めます。

    {base-name}-distillate/
    ├── _index.md           # オリエンテーション、横断的な項目、セクションマニフェスト
    ├── 01-{topic-slug}.md  # 自己完結型セクション
    ├── 02-{topic-slug}.md
    └── 03-{topic-slug}.md

    _index.md には以下が含まれます。

    • ソース(蒸留物フォルダーからオリジナルへの相対パス)を含むフロントマター
    • 3〜5個の箇条書きによるオリエンテーション(何が蒸留されたか、何から)
    • セクションマニフェスト:各セクションのファイル名 + 1行の説明
    • 複数のセクションにまたがる横断的な項目

    各セクションファイルは自己完結型であり、独立してロード可能です。1行のコンテキストヘッダーを含めます:「このセクションは[トピック]を扱います。M部中N部。」

    フロントマターのソースパスは、蒸留物の場所に対する相対パスである必要があります。

  4. 蒸留物の測定。 最終的な蒸留物ファイルに対して scripts/analyze_sources.py を実行し、出力の正確なトークン数を取得します。この分析からの total_estimated_tokensdistillate_total_tokens として使用します。

  5. 結果の報告。 常に構造化されたJSON出力を返します。

    {
      "status": "complete",
      "distillate": "{パスまたはフォルダーパス}",
      "section_distillates": ["{パス1}", "{パス2}"] または null,
      "source_total_tokens": N,
      "distillate_total_tokens": N,
      "compression_ratio": "X:1",
      "source_documents": ["{パス1}", "{パス2}"],
      "completeness_check": "pass" または "pass_with_additions"
    }

    ここで、source_total_tokens はステージ1の分析からのものであり、distillate_total_tokens はステップ4からのものです。compression_ratio

(原文がここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Distillator: A Document Distillation Engine

Overview

This skill produces hyper-compressed, token-efficient documents (distillates) from any set of source documents. A distillate preserves every fact, decision, constraint, and relationship from the sources while stripping all overhead that humans need and LLMs don't. Act as an information extraction and compression specialist. The output is a single dense document (or semantically-split set) that a downstream LLM workflow can consume as sole context input without information loss.

This is a compression task, not a summarization task. Summaries are lossy. Distillates are lossless compression optimized for LLM consumption.

On Activation

  1. Validate inputs. The caller must provide:

    • source_documents (required) — One or more file paths, folder paths, or glob patterns to distill
    • downstream_consumer (optional) — What workflow/agent consumes this distillate (e.g., "PRD creation", "architecture design"). When provided, use it to judge signal vs noise. When omitted, preserve everything.
    • token_budget (optional) — Approximate target size. When provided and the distillate would exceed it, trigger semantic splitting.
    • output_path (optional) — Where to save. When omitted, save adjacent to the primary source document with -distillate.md suffix.
    • --validate (flag) — Run round-trip reconstruction test after producing the distillate.
  2. Route — proceed to Stage 1.

Stages

# Stage Purpose
1 Analyze Run analysis script, determine routing and splitting
2 Compress Spawn compressor agent(s) to produce the distillate
3 Verify & Output Completeness check, format check, save output
4 Round-Trip Validate (--validate only) Reconstruct and diff against originals

Stage 1: Analyze

Run scripts/analyze_sources.py --help then run it with the source paths. Use its routing recommendation and grouping output to drive Stage 2. Do NOT read the source documents yourself.

Stage 2: Compress

Single mode (routing = "single", ≤3 files, ≤15K estimated tokens):

Spawn one subagent using agents/distillate-compressor.md with all source file paths.

Fan-out mode (routing = "fan-out"):

  1. Spawn one compressor subagent per group from the analysis output. Each compressor receives only its group's file paths and produces an intermediate distillate.

  2. After all compressors return, spawn one final merge compressor subagent using agents/distillate-compressor.md. Pass it the intermediate distillate contents as its input (not the original files). Its job is cross-group deduplication, thematic regrouping, and final compression.

  3. Clean up intermediate distillate content (it exists only in memory, not saved to disk).

Graceful degradation: If subagent spawning is unavailable, read the source documents and perform the compression work directly using the same instructions from agents/distillate-compressor.md. For fan-out, process groups sequentially then merge.

The compressor returns a structured JSON result containing the distillate content, source headings, named entities, and token estimate.

Stage 3: Verify & Output

After the compressor (or merge compressor) returns:

  1. Completeness check. Using the headings and named entities list returned by the compressor, verify each appears in the distillate content. If gaps are found, send them back to the compressor for a targeted fix pass — not a full recompression. Limit to 2 fix passes maximum.

  2. Format check. Verify the output follows distillate format rules:

    • No prose paragraphs (only bullets)
    • No decorative formatting
    • No repeated information
    • Each bullet is self-contained
    • Themes are clearly delineated with ## headings
  3. Determine output format. Using the split prediction from Stage 1 and actual distillate size:

    Single distillate (≤~5,000 tokens or token_budget not exceeded):

    Save as a single file with frontmatter:

    ---
    type: bmad-distillate
    sources:
      - "{relative path to source file 1}"
      - "{relative path to source file 2}"
    downstream_consumer: "{consumer or 'general'}"
    created: "{date}"
    token_estimate: {approximate token count}
    parts: 1
    ---

    Split distillate (>~5,000 tokens, or token_budget requires it):

    Create a folder {base-name}-distillate/ containing:

    {base-name}-distillate/
    ├── _index.md           # Orientation, cross-cutting items, section manifest
    ├── 01-{topic-slug}.md  # Self-contained section
    ├── 02-{topic-slug}.md
    └── 03-{topic-slug}.md

    The _index.md contains:

    • Frontmatter with sources (relative paths from the distillate folder to the originals)
    • 3-5 bullet orientation (what was distilled, from what)
    • Section manifest: each section's filename + 1-line description
    • Cross-cutting items that span multiple sections

    Each section file is self-contained — loadable independently. Include a 1-line context header: "This section covers [topic]. Part N of M."

    Source paths in frontmatter must be relative to the distillate's location.

  4. Measure distillate. Run scripts/analyze_sources.py on the final distillate file(s) to get accurate token counts for the output. Use the total_estimated_tokens from this analysis as distillate_total_tokens.

  5. Report results. Always return structured JSON output:

    {
      "status": "complete",
      "distillate": "{path or folder path}",
      "section_distillates": ["{path1}", "{path2}"] or null,
      "source_total_tokens": N,
      "distillate_total_tokens": N,
      "compression_ratio": "X:1",
      "source_documents": ["{path1}", "{path2}"],
      "completeness_check": "pass" or "pass_with_additions"
    }

    Where source_total_tokens is from the Stage 1 analysis and distillate_total_tokens is from step 4. The compression_ratio is source_total_tokens / distillate_total_tokens formatted as "X:1" (e.g., "3.2:1").

  6. If --validate flag was set, proceed to Stage 4. Otherwise, done.

Stage 4: Round-Trip Validation (--validate only)

This stage proves the distillate is lossless by reconstructing source documents from the distillate alone. Use for critical documents where information loss is unacceptable, or as a quality gate for high-stakes downstream workflows. Not for routine use — it adds significant token cost.

  1. Spawn the reconstructor agent using agents/round-trip-reconstructor.md. Pass it ONLY the distillate file path (or _index.md path for split distillates) — it must NOT have access to the original source documents.

    For split distillates, spawn one reconstructor per section in parallel. Each receives its section file plus the _index.md for cross-cutting context.

    Graceful degradation: If subagent spawning is unavailable, this stage cannot be performed by the main agent (it has already seen the originals). Report that round-trip validation requires subagent support and skip.

  2. Receive reconstructions. The reconstructor returns reconstruction file paths saved adjacent to the distillate.

  3. Perform semantic diff. Read both the original source documents and the reconstructions. For each section of the original, assess:

    • Is the core information present in the reconstruction?
    • Are specific details preserved (numbers, names, decisions)?
    • Are relationships and rationale intact?
    • Did the reconstruction add anything not in the original? (indicates hallucination filling gaps)
  4. Produce validation report saved adjacent to the distillate as -validation-report.md:

    ---
    type: distillate-validation
    distillate: "{distillate path}"
    sources: ["{source paths}"]
    created: "{date}"
    ---
    
    ## Validation Summary
    - Status: PASS | PASS_WITH_WARNINGS | FAIL
    - Information preserved: {percentage estimate}
    - Gaps found: {count}
    - Hallucinations detected: {count}
    
    ## Gaps (information in originals but missing from reconstruction)
    - {gap description} — Source: {which original}, Section: {where}
    
    ## Hallucinations (information in reconstruction not traceable to originals)
    - {hallucination description} — appears to fill gap in: {section}
    
    ## Possible Gap Markers (flagged by reconstructor)
    - {marker description}
  5. If gaps are found, offer to run a targeted fix pass on the distillate — adding the missing information without full recompression. Limit to 2 fix passes maximum.

  6. Clean up — delete the temporary reconstruction files after the report is generated.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。