← ClaudeAtlas

myelin-compactlisted

Prepare a dense /compact hint from the current session's live state (git, todos, plan.md, config) and re-orient after /compact. Works in any repo.
yehsuf/myelin · ★ 0 · AI & Automation · score 73
Install: claude install-skill yehsuf/myelin
# compact — generic /compact pipeline Generates a ready-to-paste `/compact` hint from live session state. No project-specific hardcoding — works in any repo. ## When to use - Context is getting long and `/compact` is imminent → invoke with `prepare` - Immediately after `/compact` completes → invoke with `resume` ## Instructions for the agent Let `$MODE` = first token of `$ARGUMENTS`, default `prepare`. Must be `prepare` or `resume`. ### Mode: prepare 1. Export current todos to a file so the script can read them: ```sql SELECT id, title, COALESCE(description,'') AS description, status, updated_at FROM todos WHERE status IN ('in_progress','pending','blocked') ORDER BY CASE status WHEN 'blocked' THEN 0 WHEN 'in_progress' THEN 1 ELSE 2 END, updated_at DESC ``` Write the JSON result to `~/.copilot/session-state/$COPILOT_AGENT_SESSION_ID/files/todos.json` as: ```json {"version":1,"generatedAt":"<ISO>","source":"copilot-sql-tool","todos":[...]} ``` 2. Run: ```bash command node ~/.copilot/skills/myelin-compact/compact-prepare.mjs prepare ``` 3. Print the full script output verbatim. The `<<<SESSION_STATE_BRIEF>>>` block is a factual summary (todos, git, checkpoints, plan.md, rules) — it is NOT the compact hint itself. 4. **YOU (the agent) now compose the actual compact hint.** Do NOT ask the script to guess it. Use: - The `<<<SESSION_STATE_BRIEF>>>` block as source of truth for facts. - Your memory of THIS session for nar