{"id":"723b28ce-0a35-4bf5-8ac2-b73bc268072e","shortId":"SshGBr","kind":"skill","title":"autocompact-circuit-breaker","tagline":"Break the autocompact retry loop after several consecutive failures to avoid hammering shared APIs.","description":"# SKILL: Autocompact Circuit Breaker\n**Domain:** context-management  \n**Trigger:** Apply when autocompact failures repeat and the service must stop retrying to avoid API storms.\n**Source Pattern:** Distilled from reviewed session memory, compaction, and context-budgeting implementations.\n\n## Core Method\nTrack consecutive autocompact failures via the caller-provided auto compact tracking state. After each failure, increment the counter, log a warning once the configured limit is reached, and return the updated count instead of throwing. The loop uses this counter to skip further auto-compact attempts as long as the limit is exceeded, effectively acting as a circuit breaker that keeps doomed sessions from flooding the service.\n\n## Key Rules\n- Add one to the failure counter on every exception (unless it’s a user abort).\n- When the counter reaches the policy limit, log the breaker trip so telemetry reveals the gap.\n- Return was compacted false plus consecutive failures so callers can persist the new state.\n- Use the counter to skip auto-compact early on future turns rather than re-running the failed path.\n- Reset the counter on a successful compaction so normal behavior resumes.\n\n## Example Application\nAfter three consecutive failures hitting the context limit, auto compact if needed stops retrying, logs `circuit breaker tripped`, and the tracker causes the next turn to skip compaction until a successful run resets the counter.\n\n## Anti-Patterns (What NOT to do)\n- Don’t let the controller keep retrying with the same broken context; the breaker exists to keep it quiet.\n- Don’t swallow failure logs — future debugging relies on the warning emitted when the limit trips.","tags":["autocompact","circuit","breaker","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering","developer-tools"],"capabilities":["skill","source-ychampion","skill-autocompact-circuit-breaker","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/autocompact-circuit-breaker","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,690 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:45.189Z","embedding":null,"createdAt":"2026-04-18T22:19:47.477Z","updatedAt":"2026-04-22T06:56:45.189Z","lastSeenAt":"2026-04-22T06:56:45.189Z","tsv":"'abort':143 'act':114 'add':129 'anti':243 'anti-pattern':242 'api':18,41 'appli':28 'applic':206 'attempt':105 'auto':67,103,180,215 'auto-compact':102,179 'autocompact':2,7,20,30,60 'autocompact-circuit-break':1 'avoid':15,40 'behavior':203 'break':5 'breaker':4,22,118,153,223,262 'broken':259 'budget':54 'caller':65,168 'caller-provid':64 'caus':228 'circuit':3,21,117,222 'compact':50,68,104,162,181,200,216,234 'configur':82 'consecut':12,59,165,209 'context':25,53,213,260 'context-budget':52 'context-manag':24 'control':253 'core':56 'count':90 'counter':76,98,134,146,176,196,241 'debug':274 'distil':45 'domain':23 'doom':121 'earli':182 'effect':113 'emit':279 'everi':136 'exampl':205 'exceed':112 'except':137 'exist':263 'fail':192 'failur':13,31,61,73,133,166,210,271 'fals':163 'flood':124 'futur':184,273 'gap':159 'hammer':16 'hit':211 'implement':55 'increment':74 'instead':91 'keep':120,254,265 'key':127 'let':251 'limit':83,110,150,214,282 'log':77,151,221,272 'long':107 'loop':9,95 'manag':26 'memori':49 'method':57 'must':36 'need':218 'new':172 'next':230 'normal':202 'one':130 'path':193 'pattern':44,244 'persist':170 'plus':164 'polici':149 'provid':66 'quiet':267 'rather':186 're':189 're-run':188 'reach':85,147 'reli':275 'repeat':32 'reset':194,239 'resum':204 'retri':8,38,220,255 'return':87,160 'reveal':157 'review':47 'rule':128 'run':190,238 'servic':35,126 'session':48,122 'sever':11 'share':17 'skill':19 'skill-autocompact-circuit-breaker' 'skip':100,178,233 'sourc':43 'source-ychampion' 'state':70,173 'stop':37,219 'storm':42 'success':199,237 'swallow':270 'telemetri':156 'three':208 'throw':93 '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' 'track':58,69 'tracker':227 'trigger':27 'trip':154,224,283 'turn':185,231 'unless':138 'updat':89 'use':96,174 'user':142 'via':62 'warn':79,278","prices":[{"id":"55595deb-9211-44ea-aeb6-2baf6ef8251b","listingId":"723b28ce-0a35-4bf5-8ac2-b73bc268072e","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:47.477Z"}],"sources":[{"listingId":"723b28ce-0a35-4bf5-8ac2-b73bc268072e","source":"github","sourceId":"ychampion/cskill-agents/autocompact-circuit-breaker","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/autocompact-circuit-breaker","isPrimary":false,"firstSeenAt":"2026-04-18T22:19:47.477Z","lastSeenAt":"2026-04-22T06:56:45.189Z"}],"details":{"listingId":"723b28ce-0a35-4bf5-8ac2-b73bc268072e","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"autocompact-circuit-breaker","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":"df540ca2867010be79861ab81b1e75a04c930201","skill_md_path":"skills/autocompact-circuit-breaker/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/autocompact-circuit-breaker"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"autocompact-circuit-breaker","description":"Break the autocompact retry loop after several consecutive failures to avoid hammering shared APIs."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/autocompact-circuit-breaker"},"updatedAt":"2026-04-22T06:56:45.189Z"}}