{"id":"0363c609-94b0-4fb0-8839-592fcb9ccb3d","shortId":"hbuC3S","kind":"skill","title":"prevent-continuation-stop-hook-contract","tagline":"Return a narrow stop-hook result that can halt the query loop without throwing, while still surfacing blocking errors separately.","description":"# SKILL: Prevent Continuation Stop-Hook Contract\n**Domain:** tool-orchestration  \n**Trigger:** Apply when post-response hooks may decide that the query loop must stop, but the caller still needs a structured non-exception contract.\n**Source Pattern:** Distilled from reviewed tool-loop and result-shaping patterns.\n\n## Core Method\nRepresent stop-hook outcomes with a compact return contract instead of control-flow exceptions. Separate hard blocking errors from the boolean that says continuation should stop, and let the loop interpret that result after hooks, teammate callbacks, and summary messages have all been emitted. This keeps hook orchestration observable and composable while still allowing hooks to end the turn decisively.\n\n## Key Rules\n- Return a small structured result such as `{ blockingErrors, preventContinuation }` rather than throwing for normal stop decisions.\n- Preserve the distinction between “there were blocking error messages” and “hooks intentionally stopped continuation.”\n- Let hook attachments and summary messages be emitted before returning the stop decision so the stop remains visible in transcripts.\n- Reuse the same contract across related hook families so teammate and task-completed hooks can short-circuit the loop in the same shape.\n\n## Example Application\nIf a stop hook determines that a teammate should pause after reaching idle state, emit the relevant hook summary and return `preventContinuation: true`. The query loop can then stop cleanly without mistaking that decision for a crash.\n\n## Anti-Patterns (What NOT to do)\n- Do not throw exceptions for ordinary hook-driven stop decisions; callers lose the chance to emit hook summaries and structured attachments.\n- Do not collapse blocking errors and stop signals into one field; the loop needs to know whether to surface errors or just stop.","tags":["prevent","continuation","stop","hook","contract","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-prevent-continuation-stop-hook-contract","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/prevent-continuation-stop-hook-contract","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,841 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-22T00:56:54.144Z","embedding":null,"createdAt":"2026-04-18T22:20:57.939Z","updatedAt":"2026-04-22T00:56:54.144Z","lastSeenAt":"2026-04-22T00:56:54.144Z","tsv":"'across':198 'allow':135 'anti':259 'anti-pattern':258 'appli':40 'applic':220 'attach':176,286 'block':25,98,166,290 'blockingerror':151 'boolean':102 'callback':118 'caller':56,276 'chanc':279 'circuit':212 'clean':250 'collaps':289 'compact':87 'complet':207 'compos':132 'continu':3,30,105,173 'contract':6,34,64,89,197 'control':93 'control-flow':92 'core':78 'crash':257 'decid':47 'decis':141,159,186,254,275 'determin':225 'distil':67 'distinct':162 'domain':35 'driven':273 'emit':125,181,235,281 'end':138 'error':26,99,167,291,306 'exampl':219 'except':63,95,268 'famili':201 'field':297 'flow':94 'halt':16 'hard':97 'hook':5,12,33,45,83,116,128,136,170,175,200,208,224,238,272,282 'hook-driven':271 'idl':233 'instead':90 'intent':171 'interpret':112 'keep':127 'key':142 'know':302 'let':109,174 'loop':19,51,72,111,214,246,299 'lose':277 'may':46 'messag':121,168,179 'method':79 'mistak':252 'must':52 'narrow':9 'need':58,300 'non':62 'non-except':61 'normal':157 'observ':130 'one':296 'orchestr':38,129 'ordinari':270 'outcom':84 'pattern':66,77,260 'paus':230 'post':43 'post-respons':42 'preserv':160 'prevent':2,29 'prevent-continuation-stop-hook-contract':1 'preventcontinu':152,242 'queri':18,50,245 'rather':153 'reach':232 'relat':199 'relev':237 'remain':190 'repres':80 'respons':44 'result':13,75,114,148 'result-shap':74 'return':7,88,144,183,241 'reus':194 'review':69 'rule':143 'say':104 'separ':27,96 'shape':76,218 'short':211 'short-circuit':210 'signal':294 'skill':28 'skill-prevent-continuation-stop-hook-contract' 'small':146 'sourc':65 'source-ychampion' 'state':234 'still':23,57,134 'stop':4,11,32,53,82,107,158,172,185,189,223,249,274,293,309 'stop-hook':10,31,81 'structur':60,147,285 'summari':120,178,239,283 'surfac':24,305 'task':206 'task-complet':205 'teammat':117,203,228 'throw':21,155,267 'tool':37,71 'tool-loop':70 'tool-orchestr':36 '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' 'transcript':193 'trigger':39 'true':243 'turn':140 'visibl':191 'whether':303 'without':20,251","prices":[{"id":"3a9f887b-0c97-4092-87d9-370a9ee20328","listingId":"0363c609-94b0-4fb0-8839-592fcb9ccb3d","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:20:57.939Z"}],"sources":[{"listingId":"0363c609-94b0-4fb0-8839-592fcb9ccb3d","source":"github","sourceId":"ychampion/cskill-agents/prevent-continuation-stop-hook-contract","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/prevent-continuation-stop-hook-contract","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:57.939Z","lastSeenAt":"2026-04-22T00:56:54.144Z"}],"details":{"listingId":"0363c609-94b0-4fb0-8839-592fcb9ccb3d","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"prevent-continuation-stop-hook-contract","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":"4bd1117033a016b9201b8506fe3f8a1e4ae55343","skill_md_path":"skills/prevent-continuation-stop-hook-contract/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/prevent-continuation-stop-hook-contract"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"prevent-continuation-stop-hook-contract","description":"Return a narrow stop-hook result that can halt the query loop without throwing, while still surfacing blocking errors separately."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/prevent-continuation-stop-hook-contract"},"updatedAt":"2026-04-22T00:56:54.144Z"}}