ychampion/cskill-agents/compact-boundary-session-distillation
Claude Code and agent skill by ychampion/cskill-agents
- community
Checking that the SKILL.md file is still in the repository.
Distill the compact boundary delta into the session memory summary and the freshest user cues needed for skill capture prompts.
Install
npx vskill@latest install ychampion/cskill-agents/compact-boundary-session-distillationSKILL.md
SKILL: Compact Boundary Session Distillation
Domain: context-management 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. Source Pattern: Distilled from reviewed context, compaction, and memory-governance patterns.
Core Method
- Call
getSessionMemoryContent()to fill the<session_memory>block; the helper already returnsnullwhen no file exists so the prompt displaysNo session memory available.instead of throwing. - Slice the transcript with
getMessagesAfterCompactBoundary(context.messages)fromruntime/utils/messages.ts, which locates the last compact boundary and optionally projects out snipped history viaprojectSnippedViewwhenHISTORY_SNIPis on. - Feed that clip into
extractUserMessages, which keeps onlytype === 'user'entries, flattens mixed content blocks into strings, trims blank text, and yields the freshest user steering cues. - Replace
{{sessionMemory}},{{userMessages}}, and the optional{{userDescriptionBlock}}insideSKILLIFY_PROMPTso the kernel prompt knows which context to expose to the skill authoring assistant.
Key Rules
- Do not let user text from before the compact boundary slip into the distilled user stanza; the
getMessagesAfterCompactBoundarycall enforces that slice. - Always wrap the memory summary in
<session_memory>and the user messages in<user_messages>so downstream tooling can parse them reproducibly. - Respect the description the user optionally supplied, because it seeds the suggested skill name, goals, and trigger phrases in the AskUserQuestion rounds that follow.
Example Application
When 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.
Anti-Patterns (What NOT to do)
- 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.
- Do not drop the session memory block; even if it resolves to
null, the placeholder text keeps the prompt structure stable for downstream parsers.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/compact-boundary-session-distillation/SKILL.md
Popularity
- Repository stars
- 36
- Repository forks
- 7
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ychampion/cskill-agents/compact-boundary-session-distillation)