# Cache Hint

> A Claude skill from 0-uddeshya-0/agent-skills.

- **Type:** Skill
- **Install:** `agentstack add skill-0-uddeshya-0-agent-skills-cache-hint`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [0-uddeshya-0](https://agentstack.voostack.com/s/0-uddeshya-0)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [0-uddeshya-0](https://github.com/0-uddeshya-0)
- **Source:** https://github.com/0-uddeshya-0/agent-skills/tree/main/skills/cache-hint

## Install

```sh
agentstack add skill-0-uddeshya-0-agent-skills-cache-hint
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# skill: cache-hint

## purpose
Analyze agent output and label each part as stable (safe to cache) or dynamic (must be recomputed). Gives your application layer the signal it needs to decide what to store vs re-fetch — without the skill itself implementing any caching.

## when_to_use
- Building an agent loop where similar queries repeat and you want to cache LLM output in a DB or semantic cache
- Agent output mixes stable facts (plan features, config) with live data (user values, timestamps) and you need to separate them
- Auditing which parts of a response are safe to serve from cache to multiple users

## when_not_to_use
- Every task is unique — no repetition pattern exists
- Output is entirely user-specific or time-sensitive
- Single-turn interaction with no loop

## input
```
output: string       # Agent output to analyze
task_type: string    # What kind of task produced this
```

## output
```json
{
  "cacheable_parts": [
    { "content": "string", "reason": "string", "ttl": "permanent|24h|1h|session" }
  ],
  "dynamic_parts": [
    { "content": "string", "reason": "string" }
  ],
  "cache_key_fields": ["string"],
  "overall_cacheable": true | false
}
```

## instructions

```
Classify each meaningful piece of content as cacheable or dynamic.

Cacheable: same output for same input regardless of when or who asks.
Examples: query structure, code snippets, stable concept explanations, templates, error message mappings.

Dynamic: tied to a specific moment, user, or live data.
Examples: timestamps, user-specific values, prices, live API status, session IDs.

TTL guidance:
- permanent: facts that almost never change (language syntax, geography)
- 24h: pricing, plan features, documentation
- 1h: API responses for semi-live data
- session: valid only for this session's context

cache_key_fields: which input fields, if identical, guarantee the same cacheable output.

Return JSON only.
```

## constraints
- Max output tokens: 300
- ttl must be one of: permanent, 24h, 1h, session
- Only flag content actually worth caching — not every sentence

## example

**Input:**
```
output: "Your account (user_id: 8821) is on the Pro plan ($49/month). Pro plan includes unlimited API calls, priority support, and beta features. Next billing: March 15, 2025."
task_type: "account_info_lookup"
```

**Output:**
```json
{
  "cacheable_parts": [
    {
      "content": "Pro plan: unlimited API calls, priority support, beta features",
      "reason": "Plan features are same for all Pro users",
      "ttl": "24h"
    },
    {
      "content": "Pro plan price: $49/month",
      "reason": "Pricing changes infrequently",
      "ttl": "24h"
    }
  ],
  "dynamic_parts": [
    { "content": "user_id: 8821, next billing: March 15 2025", "reason": "User-specific and time-specific" }
  ],
  "cache_key_fields": ["plan_name"],
  "overall_cacheable": false
}
```

## feedback_log

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [0-uddeshya-0](https://github.com/0-uddeshya-0)
- **Source:** [0-uddeshya-0/agent-skills](https://github.com/0-uddeshya-0/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-0-uddeshya-0-agent-skills-cache-hint
- Seller: https://agentstack.voostack.com/s/0-uddeshya-0
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
