Warm Cacheのロゴ

Warm Cache

コミュニティ
hegemonart
warm-cache

reference/shared-preamble.mdをインポートするすべてのエージェントについて、Anthropicの5分間のプロンプトキャッシュを事前に温めます。各エージェントに何もしないHaiku pingを1回送信し、デザインスプリント開始前に、同一のプレアンブル先行プレフィックスをAnthropicのキャッシュに保存します。D-08の2層キャッシュのレイヤーAです。{{command_prefix}}*スプリントの開始時に1回実行すると、最初の繰り返し起動時の入力コストを約90%削減できます。

Add to TypingMind

概要

公開者hegemonart
リポジトリget-design-done
スキル名warm-cache
スター
3
フォーク
1
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    hegemonartがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Warm Cache」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/warm-cache
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hegemonart/get-design-done.git /tmp/get-design-done
mkdir -p .claude/skills
cp -r /tmp/get-design-done/scripts/skill-templates/warm-cache .claude/skills/warm-cache
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでWarm Cacheを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にWarm Cacheを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Warm Cacheは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

warm-cache

Role

You are the Layer A cache primer. You enumerate the agent roster by scanning agents/*.md for files that import reference/shared-preamble.md at the top of their body, then issue a single no-op Haiku ping per agent whose sole purpose is to plant the agent's preamble-first prefix into Anthropic's 5-minute prompt cache. You do not do real work. You do not write files. You do not touch .design/cache-manifest.json (that's Layer B, owned by gdd-cache-manager).

Invocation Contract

  • Command form: {{command_prefix}}warm-cache - warms all agents that import the shared preamble.
  • With filter: {{command_prefix}}warm-cache --agents design-verifier,design-planner,design-integration-checker - warms only the named agents (comma-separated, no spaces, matches agent file basename without .md).
  • Output: a single markdown summary to stdout -
    ## Warm-cache complete
    - Agents warmed: 14
    - Skipped (no shared preamble import): 3
    - Duration: 4.2s
    - Next 5 min: repeated spawns of these agents pay cached_input_per_1m rate
  • Exit code: 0 on success, 1 if the shared preamble file is missing (warn and continue in that case - do not fail the sprint).

Step-by-step Flow

Step 1: locate shared preamble

Check reference/shared-preamble.md exists. If missing, print warm-cache: reference/shared-preamble.md not found — Layer A cache priming requires Plan 10.1-04 to land first. Skipping. and exit 0.

Step 2: enumerate candidate agents

  • Glob agents/*.md excluding agents/README.md.
  • For each agent file, grep for the literal string @reference/shared-preamble.md in the first 40 lines of the body (where the import directive lives per D-17).
  • Keep only files that match.
  • If --agents flag supplied, intersect the enumerated list with the flag-supplied comma-list. Report filtered-out agents in the output summary.

Step 3: issue one no-op Haiku ping per agent

For each kept agent, spawn the agent at tier haiku with an input payload designed to be the smallest possible valid invocation:

No-op warm: acknowledge and return "ok". Do not read files. Do not write files. Do not emit anything beyond the two characters "ok".

Spawns run serially - parallelism buys nothing here because Anthropic's prompt cache keys on prompt prefix, not on concurrent calls. Swallow spawn errors per agent (log and continue) - a single broken agent must not abort the sprint.

Step 4: emit summary

Print the markdown summary described in the Invocation Contract.

Concrete Command Example

Full + filtered command-output examples live in ./../cache-manager/cache-policy.md#concrete-warm-cache-command-examples-layer-a so this skill stays close to its step-by-step flow rather than its sample output.

Integration Points

  • Pre-sprint: {{command_prefix}}warm-cache is the recommended first line of a {{command_prefix}}discover, {{command_prefix}}plan, or {{command_prefix}}verify sprint. Users type it before the real command, or an orchestrator-level wrapper runs it automatically if agent-metrics.json (Plan 10.1-05) indicates the last sprint was > 5 min ago.
  • reference/shared-preamble.md (authored in Plan 10.1-04) is the essential file for this command - agents import it first per D-17, which makes the first N tokens of every agent's rendered system prompt identical, which is what Anthropic's prompt cache keys on.
  • No interaction with hooks/budget-enforcer.ts - the hook is a PreToolUse gate; warm-cache runs as an ordinary Agent tool call itself and is subject to the hook (each no-op Haiku ping is budgeted and logged like any other spawn). This is intentional: warm-cache's own telemetry rows in .design/telemetry/costs.jsonl are the evidence that cache priming happened.

Cost Model

Full per-ping math, total-cost arithmetic for a 14-agent warm, and payback calculation versus a downstream Opus spawn live in ./../cache-manager/cache-policy.md#cost-model-layer-a. Top-line: a full warm is ~$0.001 and pays back ~500× on the first repeated planner spawn.

Failure Modes

  • Shared preamble missing → print warning, exit 0. Sprint continues without Layer A priming.
  • Individual agent spawn fails → log, continue to next agent.
  • Budget cap hit during warm-cache (hypothetical - the total cost is trivial) → hook blocks per D-02, warm-cache surfaces the error in the summary and exits 0. User can raise cap or proceed without priming.

Non-Goals

  • Does not touch Layer B (.design/cache-manifest.json). That is the cache-manager skill's territory.
  • Does not attempt to bypass or accelerate Anthropic's cache beyond issuing real API calls at minimal cost. There is no API to "pre-populate" the cache other than by issuing identical prompts.
  • Does not persist between Anthropic's 5-min TTL. After 5 minutes of inactivity, a re-warm is needed.

よくある質問

AIスキル「Warm Cache」では何ができますか?

reference/shared-preamble.mdをインポートするすべてのエージェントについて、Anthropicの5分間のプロンプトキャッシュを事前に温めます。各エージェントに何もしないHaiku pingを1回送信し、デザインスプリント開始前に、同一のプレアンブル先行プレフィックスをAnthropicのキャッシュに保存します。D-08の2層キャッシュのレイヤーAです。{{command_prefix}}*スプリントの開始時に1回実行すると、最初の繰り返し起動時の入力コストを約90%削減できます。

TypingMindでWarm Cacheを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Warm Cacheはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにWarm Cacheをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/warm-cacheを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Warm Cacheを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Warm Cacheで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもWarm Cacheを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Warm Cache」は無料ですか?

はい。hegemonartがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る
OpenMontageIncのロゴ

Lyria

OpenMontageInc
組織人気

Gemini Interactions APIを通じてGoogle Lyriaで音楽を生成し、検証します。OpenMontageの`google_music`を呼び出す前、Lyria 3.5やClip向けのプロンプト作成、画像からの音楽生成やカスタム歌詞の使用…

10.6K
79.2K
2ファイル
表示
OpenMontageIncのロゴ

Pika H3 Flex

OpenMontageInc
組織人気

Pika API(`pika_video`)を使い、Pika H3 Flexで同期音声付きの3~15秒の動画を生成します。テキストからの動画生成、最初と最後のフレームを指定した生成、参照データを使った生成…

10.6K
79.2K
指示
表示
affaan-mのロゴ

Module Regression

affaan-m
コミュニティ人気

大規模なリポジトリでモジュール横断のリグレッションを管理するため、各モジュールの下流の利用元と実行可能な受け入れ確認コマンドを記録したREGRESSION.md台帳を使います。変更後は、変更したモジュールと影響を受けるすべての下流コマンドを実行し、プロジェクトのリリースポリシーに従って、観測された終了コードをリグレッションの根拠として…

41.4K
277.3K
2ファイル
表示
affaan-mのロゴ

Benchmark Methodology

affaan-m
コミュニティ人気

competitive-platform-analysisで競合を段階別に分類した後に使います。ポジショニング、語調、ビジュアルの完成度、オファーの構成、根拠など、9つの重み付けされた観点で各競合を採点します。

40.4K
270.2K
1ファイル
表示

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇