From ccsm
Initialize or rebuild the CCSM session index. Scans all Claude Code sessions, builds a SQLite search index, and optionally generates AI summaries. Use when first installing CCSM, after "初始化 CCSM", "rebuild index", "重建索引", "setup ccsm", or when CCSM tools return empty results suggesting the index needs building.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ccsm:ccsm-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
First-time initialization or index rebuild for the Claude Code Session Manager.
First-time initialization or index rebuild for the Claude Code Session Manager.
~/.ccsm/index.db exists)ccsm-search or ccsm-overview return empty/stale resultsScan all Claude Code sessions and build the persistent index:
python3 -c "
import sys; sys.path.insert(0, '/home/v-tangxin/GUI/projects/ccsm')
from ccsm.core.index_db import incremental_refresh
count = incremental_refresh()
print(f'Indexed {count} sessions')
"
Report: "已扫描并索引 {count} 个会话到 ~/.ccsm/index.db"
Confirm the MCP server can access the indexed data:
mcp__ccsm__list_sessions()
Report: "MCP 工具已就绪,{len(results)} 个会话可查询"
Show the user what was found:
Setup complete:
- 索引: {n} 个会话
- Active: {active_count}
- Done: {done_count}
- 项目: {project_count} 个
- MCP 工具: 8 个可用 (list/search/enter/resume/detail/summarize/update/batch)
- Skills: /ccsm-search, /ccsm-resume, /ccsm-overview
Ask: "是否为未摘要的 active 会话生成 AI 摘要?(需要 API,约处理 {n} 个会话)"
If yes:
mcp__ccsm__batch_summarize(limit=10, status="active")
Report results: "{summarized} 个会话已生成摘要,{errors} 个失败"
~/.ccsm/index.db (~1.3MB for 3000 sessions)~/.ccsm/summaries/npx claudepluginhub copeeetang/ccsmCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.