{"id":"d30a0d89-935f-4a42-b4a5-f276331d9e21","shortId":"RNnSVT","kind":"skill","title":"compact-boundary-session-distillation","tagline":"Distill the compact boundary delta into the session memory summary and the freshest user cues needed for skill capture prompts.","description":"# SKILL: Compact Boundary Session Distillation\n**Domain:** context-management  \n**Trigger:** When skillify captures a repeating process, use the latest session memory and the user messages after the most recent compact boundary so the prompt only contains the current instructions.\n**Source Pattern:** Distilled from reviewed context, compaction, and memory-governance patterns.\n\n## Core Method\n- Call `getSessionMemoryContent()` to fill the `<session_memory>` block; the helper already returns `null` when no file exists so the prompt displays `No session memory available.` instead of throwing.\n- Slice the transcript with `getMessagesAfterCompactBoundary(context.messages)` from `runtime/utils/messages.ts`, which locates the last compact boundary and optionally projects out snipped history via `projectSnippedView` when `HISTORY_SNIP` is on.\n- Feed that clip into `extractUserMessages`, which keeps only `type === 'user'` entries, flattens mixed content blocks into strings, trims blank text, and yields the freshest user steering cues.\n- Replace `{{sessionMemory}}`, `{{userMessages}}`, and the optional `{{userDescriptionBlock}}` inside `SKILLIFY_PROMPT` so the kernel prompt knows which context to expose to the skill authoring assistant.\n\n## Key Rules\n- Do not let user text from before the compact boundary slip into the distilled user stanza; the `getMessagesAfterCompactBoundary` call enforces that slice.\n- Always wrap the memory summary in `<session_memory>` and the user messages in `<user_messages>` so downstream tooling can parse them reproducibly.\n- Respect the description the user optionally supplied, because it seeds the suggested skill name, goals, and trigger phrases in the AskUserQuestion rounds that follow.\n\n## Example Application\nWhen the user redirects the conversation toward automation mid-session, this pattern yields a short prompt that highlights the current process and memory highlights without dragging the whole transcript along.\n\n## Anti-Patterns (What NOT to do)\n- Do not include assistant or system messages—even if they appear in the slice—since only the user's intent should feed into the new skill definition.\n- Do not drop the session memory block; even if it resolves to `null`, the placeholder text keeps the prompt structure stable for downstream parsers.","tags":["compact","boundary","session","distillation","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering"],"capabilities":["skill","source-ychampion","skill-compact-boundary-session-distillation","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/compact-boundary-session-distillation","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,305 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:47.248Z","embedding":null,"createdAt":"2026-04-18T22:20:07.090Z","updatedAt":"2026-04-22T06:56:47.248Z","lastSeenAt":"2026-04-22T06:56:47.248Z","tsv":"'along':281 'alreadi':87 'alway':207 'anti':283 'anti-pattern':282 'appear':299 'applic':250 'askuserquest':245 'assist':182,292 'author':181 'autom':258 'avail':101 'blank':150 'block':84,146,322 'boundari':3,9,28,56,118,194 'call':79,203 'captur':24,38 'clip':134 'compact':2,8,27,55,71,117,193 'compact-boundary-session-distil':1 'contain':61 'content':145 'context':33,70,175 'context-manag':32 'context.messages':110 'convers':256 'core':77 'cue':20,158 'current':63,271 'definit':315 'delta':10 'descript':227 'display':97 'distil':5,6,30,67,198 'domain':31 'downstream':219,338 'drag':277 'drop':318 'enforc':204 'entri':142 'even':296,323 'exampl':249 'exist':93 'expos':177 'extractusermessag':136 'feed':132,310 'file':92 'fill':82 'flatten':143 'follow':248 'freshest':18,155 'getmessagesaftercompactboundari':109,202 'getsessionmemorycont':80 'goal':239 'govern':75 'helper':86 'highlight':269,275 'histori':124,128 'includ':291 'insid':166 'instead':102 'instruct':64 'intent':308 'keep':138,332 'kernel':171 'key':183 'know':173 'last':116 'latest':44 'let':187 'locat':114 'manag':34 'memori':14,46,74,100,210,274,321 'memory-govern':73 'messag':50,216,295 'method':78 'mid':260 'mid-sess':259 'mix':144 'name':238 'need':21 'new':313 'null':89,328 'option':120,164,230 'pars':222 'parser':339 'pattern':66,76,263,284 'phrase':242 'placehold':330 'process':41,272 'project':121 'projectsnippedview':126 'prompt':25,59,96,168,172,267,334 'recent':54 'redirect':254 'repeat':40 'replac':159 'reproduc':224 'resolv':326 'respect':225 'return':88 'review':69 'round':246 'rule':184 'runtime/utils/messages.ts':112 'seed':234 'session':4,13,29,45,99,261,320 'sessionmemori':160 'short':266 'sinc':303 'skill':23,26,180,237,314 'skill-compact-boundary-session-distillation' 'skillifi':37,167 'slice':105,206,302 'slip':195 'snip':123,129 'sourc':65 'source-ychampion' 'stabl':336 'stanza':200 'steer':157 'string':148 'structur':335 'suggest':236 'summari':15,211 'suppli':231 'system':294 'text':151,189,331 'throw':104 'tool':220 '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' 'toward':257 'transcript':107,280 'trigger':35,241 'trim':149 'type':140 'use':42 'user':19,49,141,156,188,199,215,229,253,306 'userdescriptionblock':165 'usermessag':161 'via':125 'whole':279 'without':276 'wrap':208 'yield':153,264","prices":[{"id":"c570c663-d3e0-4d74-9e74-e3b936b90090","listingId":"d30a0d89-935f-4a42-b4a5-f276331d9e21","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:07.090Z"}],"sources":[{"listingId":"d30a0d89-935f-4a42-b4a5-f276331d9e21","source":"github","sourceId":"ychampion/cskill-agents/compact-boundary-session-distillation","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/compact-boundary-session-distillation","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:07.090Z","lastSeenAt":"2026-04-22T06:56:47.248Z"}],"details":{"listingId":"d30a0d89-935f-4a42-b4a5-f276331d9e21","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"compact-boundary-session-distillation","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":"a9851a4ec2537697ff0d114b17df4df96ce3eac8","skill_md_path":"skills/compact-boundary-session-distillation/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/compact-boundary-session-distillation"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"compact-boundary-session-distillation","description":"Distill the compact boundary delta into the session memory summary and the freshest user cues needed for skill capture prompts."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/compact-boundary-session-distillation"},"updatedAt":"2026-04-22T06:56:47.248Z"}}