Claude-skill-registry collab-cleanup
Close out a collab session - archive or delete design artifacts
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/collab-cleanup" ~/.claude/skills/majiayu000-claude-skill-registry-collab-cleanup && rm -rf "$T"
manifest:
skills/data/collab-cleanup/SKILL.mdsource content
Collab Cleanup
Browser-Based Questions
When a collab session is active, use
render_ui for all user interactions.
Component selection:
| Question Type | Component |
|---|---|
| Yes/No | Card with action buttons |
| Choose 1 of 2-5 | RadioGroup |
| Choose 1 of 6+ | MultipleChoice |
| Free text | TextInput or TextArea |
Example - Yes/No:
Tool: mcp__plugin_mermaid-collab_mermaid__render_ui Args: { "project": "<cwd>", "session": "<session>", "ui": { "type": "Card", "props": { "title": "<question context>" }, "children": [{ "type": "Markdown", "props": { "content": "<question>" } }], "actions": [ { "id": "yes", "label": "Yes", "primary": true }, { "id": "no", "label": "No" } ] }, "blocking": true }
Terminal prompts only when: No collab session exists (pre-session selection).
Overview
Close a collab session after development is complete. Offers choices to archive design artifacts, delete them, or keep the session open for reference.
Announce at start: "I'm using the collab-cleanup skill to close this session."
Workflow
Step 1: Identify Current Session
- Call
to get all sessions across projects:mcp__plugin_mermaid-collab_mermaid__list_sessionsTool: mcp__plugin_mermaid-collab_mermaid__list_sessions Args: {} - Filter results to current project (match
field against absolute cwd path)project - If sessions found for current project:
- For each session, fetch phase via
:mcp__plugin_mermaid-collab_mermaid__get_session_stateTool: mcp__plugin_mermaid-collab_mermaid__get_session_state Args: { "project": "<cwd>", "session": "<session-name>" } - Display list with phases:
Sessions in this project: 1. glowing-sunny-mesa (phase: rough-draft) 2. bright-calm-river (phase: implementation) - Ask: "Which session to clean up?" (or if only one, confirm it)
- For each session, fetch phase via
- If no sessions for current project:
- Display: "No collab sessions found in this project."
- Exit
Step 2: Show Session Summary
Display session details:
Session: [name] Template: [feature/bugfix/refactor/spike] Phase: [current phase] Artifacts: - Documents: [list .md files] - Diagrams: [list .mmd files]
Step 3: Ask User Choice
What would you like to do with the design artifacts? 1. Archive - Copy to docs/designs/[session-name]/ 2. Delete - Remove without saving 3. Keep - Leave session in place, exit without cleanup 4. Archive & Continue - Archive with timestamp, reset session for new work
Step 4: Execute Choice
If Archive:
- Create
directorydocs/designs/[session-name]/ - Copy all documents including per-item documents:
.collab/[session]/documents/design.md.collab/[session]/documents/interface-item-*.md.collab/[session]/documents/pseudocode-item-*.md.collab/[session]/documents/skeleton-item-*.md
- Copy
to.collab/[session]/diagrams/*docs/designs/[session-name]/ - Delete
folder.collab/[session]/ - Report what was archived (including count of per-item documents)
If Delete:
- Confirm: "Delete session [name]? This cannot be undone."
1. Yes, delete 2. No, go back - If 1 (Yes): Delete
folder.collab/[session]/ - If 2 (No): Return to Step 3
If Keep:
- Exit without changes
- Remind user: "Session kept open. Run
when ready to close."/collab-cleanup
If Archive & Continue:
- Generate timestamp:
[session-name]-[YYYY-MM-DD-HHmmss] - Create archive directory:
docs/designs/[session-name]-[timestamp]/ - Copy
to archive directory.collab/[session]/documents/* - Copy
to archive directory.collab/[session]/diagrams/* - Clear Work Items section in
:.collab/[session]/documents/design.md- Keep "## Session Context" and its content intact
- Replace "## Work Items" section with empty placeholder
- Reset collab state via MCP:
Note:Tool: mcp__plugin_mermaid-collab_mermaid__update_session_state Args: { "project": "<absolute-path-to-cwd>", "session": "<session-name>", "phase": "brainstorming", "currentItem": null }
is automatically updated by the MCP tool.lastActivity - Report: "Session
archived to[name]
. Session reset for new work."docs/designs/[name]-[timestamp]/ - Loop back to
skill to start work on new itemsgather-session-goals
Step 5: Confirm
Display completion message:
- Archive: "Session
archived to[name]
"docs/designs/[name]/ - Delete: "Session
deleted."[name] - Keep: "Session
kept open."[name] - Archive & Continue: "Session
archived to[name]
. Ready for new work items."docs/designs/[name]-[timestamp]/
Integration
Called by:
skill at completionfinishing-a-development-branch- User directly via
command/collab-cleanup
Collab workflow position:
collab → brainstorming → rough-draft → executing-plans → finishing-a-development-branch → collab-cleanup ↑ (you are here)
Common Mistakes
Archiving without checking contents
- Problem: Archived files might be incomplete or contain sensitive info
- Fix: Always show session summary before archiving
Deleting active session
- Problem: User accidentally deletes session they're still working on
- Fix: Confirm deletion, check if phase is not "implementation"
Red Flags
Never:
- Delete without confirmation
- Archive to a location that already exists (overwrite)
- Clean up if there are pending verification issues
Always:
- Show session summary before action
- Confirm destructive actions
- Report what was done