Gdd Cache Manager logo

Gdd Cache Manager

Community
hegemonart
gdd-cache-manager

Maintains .design/cache-manifest.json for Layer B explicit cache per D-08. Computes deterministic SHA-256 input-hash from (agent-path + sorted-input-file-paths + input-content-hashes). On spawn: lookup key → return cached blob if within TTL, else miss. On completion: write result + TTL. Consulted by hooks/budget-enforcer.ts before every Agent spawn.

Overview

Publisherhegemonart
Repositoryget-design-done
Skill namegdd-cache-manager
Stars
3
Forks
1
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hegemonart on GitHub. Read the source before you install it.

Installation

Install the Gdd Cache Manager AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/cache-manager
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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/cache-manager .claude/skills/gdd-cache-manager
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Gdd Cache Manager in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Gdd Cache Manager on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Gdd Cache Manager is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

gdd-cache-manager

Role

You are the deterministic cache-key computer and cache-manifest writer for the optimization layer. You do not spawn agents, and you do not make model calls. You read agent paths, input file paths, and input file contents; you compute a stable SHA-256 key; you look that key up in .design/cache-manifest.json; you return a hit (cached result + cache_hit: true) or a miss. On spawn completion, the orchestrator calls you again to persist the result. You are Layer B of the two-layer cache (D-08). Layer A - Anthropic's 5-min prompt cache - is not owned by you; it's owned by the shared-preamble ordering convention in agents/README.md.

Invocation Contract

Phase 1: compute-key

  • Input: {agent_path: string, input_file_paths: string[]} - agent_path is the absolute or repo-relative path to the agents/<name>.md file; input_file_paths is the sorted-unique list of files the agent will read.
  • Output: {input_hash: string} - 64-character lowercase SHA-256 hex.
  • Algorithm: canonicalize inputs, concat with newline separators, SHA-256 (see Deterministic Input-Hash Algorithm below).

Phase 2: lookup

  • Input: {input_hash: string}
  • Output: {hit: true, result: string, expires_at: string} | {hit: false}
  • Reads .design/cache-manifest.json. If key absent → miss. If present and Date.now() >= entry.expires_at → miss (lazy cleanup: caller may evict but is not required to). Else → hit with entry.result.

Phase 3: short-circuit-or-miss

  • On hit: orchestrator short-circuits the spawn. Budget-enforcer hook (Plan 10.1-01) emits SkippedCached telemetry with tokens_in: 0, tokens_out: 0, cache_hit: true, est_cost_usd: 0 (writer lands in Plan 10.1-05). Returns cached result as the tool output.
  • On miss: orchestrator proceeds with real spawn. Cache-manager is not involved until Phase 4.

Phase 4: write-result-on-completion

  • Input: {input_hash: string, agent: string, result: string, ttl_seconds: number} - ttl_seconds defaults to .design/budget.json.cache_ttl_seconds (3600 if budget.json absent).
  • Behavior: open .design/cache-manifest.json (create if missing), set key input_hash → {agent, result, written_at, ttl_seconds, expires_at}, write file. written_at is new Date().toISOString(). expires_at is written_at + ttl_seconds as ISO.

Deterministic Input-Hash Algorithm

The canonical reference implementation (single source of truth; hooks/budget-enforcer.ts imports the same primitive via a shared helper) lives in ./cache-policy.md#deterministic-input-hash-algorithm-layer-b - it documents the JS implementation, the maintainer notes (sorted-unique paths, MISSING-file sentinel, agent-path bust behavior), the manifest shape, and TTL semantics in one place. Conform to the algorithm exactly so the hook and any orchestrator agree byte-for-byte.

Integration Points

  • hooks/budget-enforcer.ts (Plan 10.1-01) reads the manifest on every Agent spawn. The hook already calls cacheLookup(agent, inputHash) against .design/cache-manifest.json. This skill is the authority on how inputHash is computed so the hook and any orchestrator agree byte-for-byte.
  • Orchestrators (e.g., skills/map/, skills/discover/, skills/plan/) invoke Phase 1 (compute-key) + Phase 4 (write-result-on-completion) around each Agent spawn they launch. Phase 2 + Phase 3 are executed by the hook.
  • Warm-cache command (skills/warm-cache/SKILL.md, Task 02) does not touch Layer B - it only primes Anthropic's 5-min prompt cache (Layer A). Do not confuse the two.

Failure Modes

  • .design/cache-manifest.json missing or malformed → treat every lookup as miss; orchestrator proceeds with full spawn. Do not throw.
  • File system write fails on Phase 4 → log to stderr, do not throw (the spawn already completed successfully; losing a cache write is a performance regression, not a correctness bug).
  • agent_path file missing → compute hash anyway using the provided string; cache entries for a deleted agent simply never hit again.

Non-Goals

Per D-09:

  • No semantic / graph-based lookup. Manifest is a dumb KV store keyed by content hash.
  • No cross-project cache sharing. Manifest lives at .design/cache-manifest.json, scoped per repo.
  • No eviction beyond lazy expiry on read. A {{command_prefix}}cache-prune command is a Phase 11 reflector candidate, not 10.1 scope.
  • No hash-algorithm tuning. SHA-256 is fixed; if a future phase wants BLAKE3, bump the manifest schema version (not relevant in v1).

TTL Semantics

Default ttl_seconds = .design/budget.json.cache_ttl_seconds = 3600s (1 hour) per D-10. expires_at is computed at write time and stored; readers do not recompute. Stale entries are lazily cleaned on read (no eager reaper in v1). Full TTL discussion: ./cache-policy.md#ttl-semantics-layer-b.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Gdd Cache Manager AI skill do?

Maintains .design/cache-manifest.json for Layer B explicit cache per D-08. Computes deterministic SHA-256 input-hash from (agent-path + sorted-input-file-paths + input-content-hashes). On spawn: lookup key → return cached blob if within TTL, else miss. On completion: write result + TTL. Consulted by hooks/budget-enforcer.ts before every Agent spawn.

Why use Gdd Cache Manager on TypingMind?

Because you install it once and use it with any model. Gdd Cache Manager is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Gdd Cache Manager in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/cache-manager. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Gdd Cache Manager?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Gdd Cache Manager?

As many as you like. As long as a model supports skills, you can use Gdd Cache Manager with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Gdd Cache Manager AI skill free?

Yes. It is published on GitHub by hegemonart under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇