用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill collab-compact命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | collab-compact |
| description | Save context and trigger compaction for clean resume |
| allowed-tools | mcp__plugin_mermaid-collab_mermaid__*, Read |
| user-invocable | true |
Save current collab session context and trigger compaction for a clean context resume.
ls -d .collab/*/ 2>/dev/null | xargs -I{} basename {}
If no sessions: "No active collab session. Use /collab first." STOP. If multiple sessions: Ask user which session.
Read current state via MCP:
Tool: mcp__plugin_mermaid-collab_mermaid__get_session_state
Args: { "project": "<absolute-path-to-cwd>", "session": "<session-name>" }
Returns: { "phase": "...", "currentItem": ..., ... }
Determine activeSkill from phase:
Save snapshot via MCP:
Tool: mcp__plugin_mermaid-collab_mermaid__save_snapshot
Args: {
"project": "<absolute-path-to-cwd>",
"session": "<session-name>",
"activeSkill": "<determined-skill>",
"currentStep": "<phase-from-state>",
"inProgressItem": <currentItem-from-state>,
"pendingQuestion": null,
"recentContext": []
}
Note: version and timestamp are automatically added by the MCP tool.
Update collab state via MCP:
Tool: mcp__plugin_mermaid-collab_mermaid__update_session_state
Args: { "project": "<absolute-path-to-cwd>", "session": "<session-name>", "hasSnapshot": true }
Context snapshot saved to .collab/<session>/context-snapshot.json
Triggering compaction now...
Invoke the /compact command.
After compaction, automatically resume the session:
Compaction complete. Resuming session...
Invoke skill: collab
This will restore context from the snapshot and continue where you left off.
When context usage is high before triggering compaction, render an Alert to notify the user:
Tool call:
Tool: mcp__plugin_mermaid-collab_mermaid__render_ui
Args: {
"project": "<absolute-path-to-cwd>",
"session": "<session-name>",
"ui": {
"type": "Alert",
"props": {
"type": "warning",
"title": "Context Full",
"message": "Run /compact in terminal, then /collab to resume."
}
},
"blocking": false
}
This provides a non-blocking visual notification without interrupting the skill execution.