{"id":"f654981d-5f21-4f38-a883-bb4eca87a88e","shortId":"8pwpZf","kind":"skill","title":"prevent-continuation-stop-hook-messaging","tagline":"Collect stop-hook progress/errors, emit a structured prevented-continuation attachment, and summarize the block for users and logs.","description":"# SKILL: Prevent Continuation Stop Hook Messaging\n**Domain:** tool-orchestration  \n**Trigger:** Use when stop hooks prevent continuation so you can surface a consistent attachment plus a summary notification that downstream UI/logging consumes.\n**Source Pattern:** Distilled from reviewed tool-loop and result-shaping patterns.\n\n## Core Method\nCapture every hook progress update while the stop-hook generator runs, track how many hooks fired, preserve per-hook command and prompt details, then attach later timing/error data to the matching hook entries. When a hook asks to prevent continuation, emit a machine-readable `hook_stopped_continuation` attachment with the hook name, tool use ID, and stop reason, then synthesize the concise `StopHookSummary` message that surfaces counts, errors, and whether the turn was blocked. This keeps UI banners, transcript log notifications, and verbose hooks in sync, with a single reusable pattern that works whenever any hook stops the turn.\n\n## Key Rules\n- Gather `hookInfos` from `progress` attachments (command, prompt, duration) and `hookErrors` from non-blocking or blocking attachments so you can summarize each hook’s outcome.\n- Emit the `hook_stopped_continuation` attachment exactly when `preventContinuation` becomes true, supplying `toolUseID`, hook name, and the stop reason so log processors and tool-tracking pipelines get a structured signal.\n- After the generator completes, call `createStopHookSummaryMessage` with counts, accumulated info, the prevented flag, and whether actual output already streamed; this keeps UI, transcript, and notification consumers aligned on the stop reason.\n- Send the notification that references `stop-hook-error` only when there are errors so verbose transcript/ctrl+o viewers know the details exist.\n- Keep the machine-readable attachment and summary message in lockstep so telemetry and UI never disagree about whether continuation was blocked and why.\n\n## Example Application\nWhen the `Stop` hook intercepts a red team command that would delete infrastructure, emit the `hook_stopped_continuation` attachment with `hookEvent: 'Stop'`, then send the summary message so the REPL banner shows “Stop hook prevented continuation: <reason>” while telemetry records how many hooks fired and what errors occurred.\n\n## Anti-Patterns (What NOT to do)\n- Do not rely on inconsistent manual logs; the single attachment + summary pair is the structured contract.\n- Do not record hook errors without feeding them into the summary message or notification; UI and logs must share the same explanation.","tags":["prevent","continuation","stop","hook","messaging","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-prevent-continuation-stop-hook-messaging","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-messaging","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 (2,578 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.227Z","embedding":null,"createdAt":"2026-04-18T22:20:58.691Z","updatedAt":"2026-04-22T00:56:54.227Z","lastSeenAt":"2026-04-22T00:56:54.227Z","tsv":"'accumul':242 'actual':249 'align':260 'alreadi':251 'anti':362 'anti-pattern':361 'applic':313 'ask':112 'attach':18,50,100,124,182,194,208,293,332,377 'banner':154,344 'becom':212 'block':22,150,191,193,309 'call':238 'captur':74 'collect':7 'command':95,183,322 'complet':237 'concis':138 'consist':49 'consum':58,259 'continu':3,17,29,43,115,123,207,307,331,349 'contract':383 'core':72 'count':143,241 'createstophooksummarymessag':239 'data':103 'delet':325 'detail':98,286 'disagre':304 'distil':61 'domain':33 'downstream':56 'durat':185 'emit':12,116,203,327 'entri':108 'error':144,273,278,359,388 'everi':75 'exact':209 'exampl':312 'exist':287 'explan':405 'feed':390 'fire':90,356 'flag':246 'gather':178 'generat':84,236 'get':230 'hook':5,10,31,41,76,83,89,94,107,111,121,127,160,172,200,205,216,272,317,329,347,355,387 'hookerror':187 'hookev':334 'hookinfo':179 'id':131 'inconsist':372 'info':243 'infrastructur':326 'intercept':318 'keep':152,254,288 'key':176 'know':284 'later':101 'lockstep':298 'log':26,156,223,374,400 'loop':66 'machin':119,291 'machine-read':118,290 'mani':88,354 'manual':373 'match':106 'messag':6,32,140,296,340,395 'method':73 'must':401 'name':128,217 'never':303 'non':190 'non-block':189 'notif':54,157,258,267,397 'o':282 'occur':360 'orchestr':36 'outcom':202 'output':250 'pair':379 'pattern':60,71,167,363 'per':93 'per-hook':92 'pipelin':229 'plus':51 'preserv':91 'prevent':2,16,28,42,114,245,348 'prevent-continuation-stop-hook-messag':1 'preventcontinu':211 'prevented-continu':15 'processor':224 'progress':77,181 'progress/errors':11 'prompt':97,184 'readabl':120,292 'reason':134,221,264 'record':352,386 'red':320 'refer':269 'reli':370 'repl':343 'result':69 'result-shap':68 'reusabl':166 'review':63 'rule':177 'run':85 'send':265,337 'shape':70 'share':402 'show':345 'signal':233 'singl':165,376 'skill':27 'skill-prevent-continuation-stop-hook-messaging' 'sourc':59 'source-ychampion' 'stop':4,9,30,40,82,122,133,173,206,220,263,271,316,330,335,346 'stop-hook':8,81 'stop-hook-error':270 'stophooksummari':139 'stream':252 'structur':14,232,382 'summar':20,198 'summari':53,295,339,378,394 'suppli':214 'surfac':47,142 'sync':162 'synthes':136 'team':321 'telemetri':300,351 'timing/error':102 'tool':35,65,129,227 'tool-loop':64 'tool-orchestr':34 'tool-track':226 'tooluseid':215 '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':86,228 'transcript':155,256 'transcript/ctrl':281 'trigger':37 'true':213 'turn':148,175 'ui':153,255,302,398 'ui/logging':57 'updat':78 'use':38,130 'user':24 'verbos':159,280 'viewer':283 'whenev':170 'whether':146,248,306 'without':389 'work':169 'would':324","prices":[{"id":"46866667-b74a-42ed-9844-6f25a7732038","listingId":"f654981d-5f21-4f38-a883-bb4eca87a88e","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:58.691Z"}],"sources":[{"listingId":"f654981d-5f21-4f38-a883-bb4eca87a88e","source":"github","sourceId":"ychampion/cskill-agents/prevent-continuation-stop-hook-messaging","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/prevent-continuation-stop-hook-messaging","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:58.691Z","lastSeenAt":"2026-04-22T00:56:54.227Z"}],"details":{"listingId":"f654981d-5f21-4f38-a883-bb4eca87a88e","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"prevent-continuation-stop-hook-messaging","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":"c094a1a5d2e523dfb38b2601edd56d351246cd22","skill_md_path":"skills/prevent-continuation-stop-hook-messaging/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/prevent-continuation-stop-hook-messaging"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"prevent-continuation-stop-hook-messaging","description":"Collect stop-hook progress/errors, emit a structured prevented-continuation attachment, and summarize the block for users and logs."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/prevent-continuation-stop-hook-messaging"},"updatedAt":"2026-04-22T00:56:54.227Z"}}