agentleFS
0-uddeshya-00-uddeshya-0/agent-skills/skills/cache-hint/skill.md

cache-hint

Skill3 starsChanged 6 months agoMITView on GitHub

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every task is unique — no repetition pattern exists

    line 12
  2. Distinctive:

    Only flag content actually worth caching — not every sentence

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

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

{
  "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:

{
  "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

<!-- date | situation | what went wrong | better behavior -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.