{"id":"c3fdb7aa-6184-4cf0-86f9-ee69f48c8bfa","shortId":"XXz4Gx","kind":"skill","title":"cache-prefix-stability-for-subagents","tagline":"Preserve cache-critical request fields when a child agent must share the parent's prompt prefix for cache hits.","description":"# SKILL: Cache Prefix Stability For Subagents\n**Domain:** agentic-loop\n**Trigger:** Apply when a subagent should share the parent's cached prompt prefix instead of recomputing a divergent request shape.\n**Source Pattern:** Distilled from reviewed subagent orchestration, isolation, and lifecycle implementations.\n\n## Core Method\nTreat prompt-cache compatibility as an explicit contract when building child agent options. Preserve the cache-critical fields that define the API request prefix, including the merged tool pool, thinking configuration, query source, and content-replacement state, instead of letting child defaults drift away from the parent request. This keeps forked or exact-tool subagents eligible for the same cached prefix while still allowing non-cache-sensitive options to vary.\n\n## Key Rules\n- Only inherit cache-critical request fields when the child is intentionally sharing the parent's prefix, such as the use exact tools path.\n- Keep the resolved tool list, thinking configuration, and content-replacement state aligned with the parent request so cache keys do not diverge accidentally.\n- Preserve the recursive-fork guard inputs like query source when they are part of the cached request prefix contract.\n- Do not inherit unrelated defaults blindly; share only the fields that stabilize the prefix and let other child-specific behavior vary intentionally.\n\n## Example Application\nIf a forked review agent must reuse the parent’s prompt cache, build its options from the parent’s tool list and thinking config instead of resetting them to child defaults; the child can then reuse cached request prefixes while still emitting its own downstream messages.\n\n## Anti-Patterns (What NOT to do)\n- Do not disable thinking or rebuild the tool pool for a cache-sharing child unless you also accept losing cache alignment.\n- Do not rely on accidental structural similarity between parent and child requests; explicitly carry forward the fields that define the cache prefix.","tags":["cache","prefix","stability","for","subagents","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-cache-prefix-stability-for-subagents","topic-agent-skills","topic-ai-agents","topic-cli","topic-coding-agents","topic-context-engineering","topic-developer-tools","topic-mcp","topic-multi-agent","topic-terminal-ui"],"categories":["cskill-agents"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/ychampion/cskill-agents/cache-prefix-stability-for-subagents","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add ychampion/cskill-agents","source_repo":"https://github.com/ychampion/cskill-agents","install_from":"skills.sh"}},"qualityScore":"0.467","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 34 github stars · SKILL.md body (1,989 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T06:56:46.212Z","embedding":null,"createdAt":"2026-04-18T22:19:56.852Z","updatedAt":"2026-04-22T06:56:46.212Z","lastSeenAt":"2026-04-22T06:56:46.212Z","tsv":"'accept':311 'accident':194,319 'agent':16,35,82,244 'agentic-loop':34 'align':183,314 'allow':137 'also':310 'anti':287 'anti-pattern':286 'api':93 'appli':38 'applic':239 'away':116 'behavior':235 'blind':220 'build':80,252 'cach':2,9,25,28,47,73,87,133,140,150,189,211,251,276,305,313,335 'cache-crit':8,86,149 'cache-prefix-stability-for-subag':1 'cache-shar':304 'carri':328 'child':15,81,113,156,233,269,272,307,325 'child-specif':232 'compat':74 'config':263 'configur':102,177 'content':107,180 'content-replac':106,179 'contract':78,214 'core':68 'critic':10,88,151 'default':114,219,270 'defin':91,333 'disabl':295 'distil':59 'diverg':54,193 'domain':33 'downstream':284 'drift':115 'elig':129 'emit':281 'exact':126,168 'exact-tool':125 'exampl':238 'explicit':77,327 'field':12,89,153,224,331 'fork':123,199,242 'forward':329 'guard':200 'hit':26 'implement':67 'includ':96 'inherit':148,217 'input':201 'instead':50,110,264 'intent':158,237 'isol':64 'keep':122,171 'key':145,190 'let':112,230 'lifecycl':66 'like':202 'list':175,260 'loop':36 'lose':312 'merg':98 'messag':285 'method':69 'must':17,245 'non':139 'non-cache-sensit':138 'option':83,142,254 'orchestr':63 'parent':20,45,119,161,186,248,257,323 'part':208 'path':170 'pattern':58,288 'pool':100,301 'prefix':3,23,29,49,95,134,163,213,228,278,336 'preserv':7,84,195 'prompt':22,48,72,250 'prompt-cach':71 'queri':103,203 'rebuild':298 'recomput':52 'recurs':198 'recursive-fork':197 'reli':317 'replac':108,181 'request':11,55,94,120,152,187,212,277,326 'reset':266 'resolv':173 'reus':246,275 'review':61,243 'rule':146 'sensit':141 'shape':56 'share':18,43,159,221,306 'similar':321 'skill':27 'skill-cache-prefix-stability-for-subagents' 'sourc':57,104,204 'source-ychampion' 'specif':234 'stabil':4,30,226 'state':109,182 'still':136,280 'structur':320 'subag':6,32,41,62,128 'think':101,176,262,296 'tool':99,127,169,174,259,300 'topic-agent-skills' 'topic-ai-agents' 'topic-cli' 'topic-coding-agents' 'topic-context-engineering' 'topic-developer-tools' 'topic-mcp' 'topic-multi-agent' 'topic-terminal-ui' 'treat':70 'trigger':37 'unless':308 'unrel':218 'use':167 'vari':144,236","prices":[{"id":"32426366-3ffd-4cd4-944a-006106bb61e8","listingId":"c3fdb7aa-6184-4cf0-86f9-ee69f48c8bfa","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"ychampion","category":"cskill-agents","install_from":"skills.sh"},"createdAt":"2026-04-18T22:19:56.852Z"}],"sources":[{"listingId":"c3fdb7aa-6184-4cf0-86f9-ee69f48c8bfa","source":"github","sourceId":"ychampion/cskill-agents/cache-prefix-stability-for-subagents","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/cache-prefix-stability-for-subagents","isPrimary":false,"firstSeenAt":"2026-04-18T22:19:56.852Z","lastSeenAt":"2026-04-22T06:56:46.212Z"}],"details":{"listingId":"c3fdb7aa-6184-4cf0-86f9-ee69f48c8bfa","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"cache-prefix-stability-for-subagents","github":{"repo":"ychampion/cskill-agents","stars":34,"topics":["agent-skills","ai-agents","cli","coding-agents","context-engineering","developer-tools","mcp","multi-agent","terminal-ui"],"license":"mit","html_url":"https://github.com/ychampion/cskill-agents","pushed_at":"2026-04-04T14:13:23Z","description":"Agent skills for coding CLIs, multi-agent runtimes, context engines, MCP extensions, and terminal tooling. Instead of using claude code's source code, give your agent skills to create your own!","skill_md_sha":"755a9dce384c59c6c1a1d8af818a8f527f764ace","skill_md_path":"skills/cache-prefix-stability-for-subagents/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/cache-prefix-stability-for-subagents"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"cache-prefix-stability-for-subagents","description":"Preserve cache-critical request fields when a child agent must share the parent's prompt prefix for cache hits."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/cache-prefix-stability-for-subagents"},"updatedAt":"2026-04-22T06:56:46.212Z"}}