catalyst-cache — Claude Code skill: TTL cache for agents
A skill that teaches the agent to use Catalyst Cache: store temporary values in segments, read them back, and respect the TTL. Handy for session data.
npx skills add catalystbyzoho/agent-skills --skill catalyst-cache -a claude-codeWhat catalyst-cache does
The skill covers how Catalyst Cache works — an in-memory key-value store with a TTL. Every value is a string, so you call JSON.stringify before put and JSON.parse after get. TTL is counted in hours, 48 at most.
Two steps. The agent first gets the Segment ID through MCP (CatalystbyZoho_List_Cache_Segments) when that is available, otherwise from the console or .catalystrc. Then it loads references/cache-basics.md, which holds the SDK operations, the TTL limit and the gotchas.
Both gotchas are silent. Calling segment.update() without an expiry argument resets the key's TTL to the 48-hour maximum, so a 1-hour key turns into a 48-hour one. And segment.delete() does not remove the key: it sets cache_value to null while the key stays, and the next getValue() returns null with HTTP 200 instead of throwing. Any error handling you wrote around deletion will never fire.
What it helps with
- keep session data alive between agent calls
- read a cached value by key
- set a key's lifetime in hours without passing the limit
- debug why a deleted key still answers
- pick between Cache and Data Store for temporary data
Example prompts for the agent
- Put the user session into the cache with segment.put and set a 2-hour TTL
- Why did segment.delete leave the key? Check references/cache-basics.md
- Fetch the Segment ID with CatalystbyZoho_List_Cache_Segments and read the key value
How to install catalyst-cache
1Skills CLI (Vercel)
npx skills add catalystbyzoho/agent-skills --skill catalyst-cache -a claude-code2Manually: put the files in place
~/.claude/skills/catalyst-cache/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/catalyst-cache/
1Skills CLI (Vercel)
npx skills add catalystbyzoho/agent-skills --skill catalyst-cache -a codex2Manually: put the files in place
.agents/skills/catalyst-cache/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add catalystbyzoho/agent-skills --skill catalyst-cache -a cursor2Manually: put the files in place
.cursor/skills/catalyst-cache/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install catalystbyzoho/agent-skills catalyst-cache2Manually: put the files in place
.github/skills/catalyst-cache/SKILL.md1Skills CLI (Vercel)
npx skills add catalystbyzoho/agent-skills --skill catalyst-cache -a gemini-cli2Platform CLI
gemini skills install https://github.com/catalystbyzoho/agent-skills --path skills/catalyst-cacheManually: put the files in place
.devin/skills/catalyst-cache/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add catalystbyzoho/agent-skills --skill catalyst-cache -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about catalyst-cache
How do I install catalyst-cache in Claude?
Run npx skills add catalystbyzoho/agent-skills --skill catalyst-cache -a claude-code. The skill lands in ~/.claude/skills/catalyst-cache/SKILL.md.
What does catalyst-cache do?
It teaches the agent to work with Catalyst Cache: fetch the Segment ID, call segment.get and segment.put, set TTL, and avoid the segment.delete() and segment.update() traps.
What are the limits of Catalyst Cache?
Values are strings only, and TTL is measured in hours with a 48-hour ceiling. Calling segment.update() without an expiry argument resets a key's TTL to that 48-hour maximum.
Source text
SKILL.md · Apache-2.0
--- name: catalyst-cache description: "Catalyst Cache — in-memory key-value store with TTL for ephemeral session and temporary data. Trigger on 'Cache', 'cache segment', 'cache key', 'TTL', 'segment.put', 'segment.get', or 'temporary data Catalyst'." metadata: version: "2.0.1" --- ## How It Works 1. **Get Segment ID** — Use MCP (`CatalystbyZoho_List_Cache_Segments`) if available; otherwise retrieve it from the console or `.catalystrc`. 2. **Load `references/cache-basics.md`** — for SDK operations, TTL limits (48 hr max), and the `segment.delete()` / `segment.update()` gotchas. 3. **String values only** — All cache values are strings. Always `JSON.stringify` before `put` and `JSON.parse` after `get`. 4. **TTL behavior** — TTL is in HOURS (max 48), not seconds. `segment.update()` called WITHOUT an expiry argument silently resets the key's TTL to the 48-hour maximum (a 1-hour key becomes a 48-hour key). `segment.delete()` does not remove the key — it sets `cache_value` to `null` and the key persists; a later `getValue()` returns `null` with HTTP 200 and never throws. ## Triggers Use this skill for: "Cache", "cache segment", "cache key", "cache value", "TTL", "in-memory store", `segment.get`, `segment.put`, `segment.delete`, "session data", "temporary data Catalyst", "cache vs Data Store", or "48-hour cache". ## References | Reference | Load when the query is about… | |-----------|-------------------------------| | `references/cache-basics.md` | SDK operations (get, put, delete, update), Segment ID, 48hr TTL max, string-only values, segment.delete() null gotcha, segment.update() TTL gotcha |
© catalystbyzoho · Apache-2.0 · catalystbyzoho/agent-skills