Logo: Warm Cache

Warm Cache

Communautéit
hegemonart
warm-cache

Wiermt den 5-minüttege Prompt-Cache vun Anthropic fir all Agenten vir, déi reference/shared-preamble.md importéieren. Schéckt pro Agent ee sënnlose Haiku-Ping, fir datt den identesche Prefix mam Preamble un éischter Plaz am Anthropic-Cache läit, ier en Design-Sprint ufänkt. Layer A vum D-08 Zwee-Layer-Cache. Féiert dëst eemol um Ufank vun engem {{command_prefix}}*-Sprint aus, fir beim éischte widderhollene Spawn ongeféier 90 % vun den Inputkäschten ze spueren.

Add to TypingMind

Iwwersiicht

Editeurhegemonart
Repositoryget-design-done
Skill-Nummwarm-cache
Stären
3
Forks
1
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    hegemonart huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Warm Cache an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/warm-cache
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Warm Cache an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Warm Cache automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Warm Cache net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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.

Heefeg gestallte Froen

Wat mécht de KI-Skill Warm Cache?

Wiermt den 5-minüttege Prompt-Cache vun Anthropic fir all Agenten vir, déi reference/shared-preamble.md importéieren. Schéckt pro Agent ee sënnlose Haiku-Ping, fir datt den identesche Prefix mam Preamble un éischter Plaz am Anthropic-Cache läit, ier en Design-Sprint ufänkt. Layer A vum D-08 Zwee-Layer-Cache. Féiert dëst eemol um Ufank vun engem {{command_prefix}}*-Sprint aus, fir beim éischte widderhollene Spawn ongeféier 90 % vun den Inputkäschten ze spueren.

Firwat Warm Cache op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Warm Cache besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Warm Cache an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/warm-cache an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Warm Cache benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Warm Cache benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Warm Cache domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Warm Cache gratis?

Jo. hegemonart huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇