ccsinfo - Claude Code Session Info
Access and analyze Claude Code session data from a remote ccsinfo server running on the user's machine.
Server Repository: https://github.com/myk-org/ccsinfo
Requirements
1. Server Setup (on the machine with Claude Code data)
The ccsinfo server must be running on the machine that has Claude Code session data.
Install and run the server:
CODEBLOCK0
The server reads Claude Code session data from ~/.claude/projects/ and exposes it via REST API.
For full server documentation, see: https://github.com/myk-org/ccsinfo
2. Client Setup (where this skill runs)
The ccsinfo CLI tool must be installed. Check if installed:
CODEBLOCK1
If not installed, run the installation script:
CODEBLOCK2
3. Configuration
Set the CCSINFO_SERVER_URL environment variable to point to your server:
CODEBLOCK3
Add this to your shell profile (.bashrc, .zshrc, etc.) to persist across sessions.
Quick Start
All commands automatically connect to the remote server via $CCSINFO_SERVER_URL.
List recent sessions
CODEBLOCK4
Show session details (supports partial ID matching)
CODEBLOCK5
View conversation messages
CODEBLOCK6
Search sessions by content
CODEBLOCK7
View global statistics
CODEBLOCK8
Common Workflows
Inspect a specific session
- 1. List sessions to find the ID:
CODEBLOCK9
- 2. Show session details:
CODEBLOCK10
- 3. View messages:
CODEBLOCK11
- 4. Check tool calls:
CODEBLOCK12
Find sessions by content
CODEBLOCK13
Track tasks
CODEBLOCK14
View statistics and trends
CODEBLOCK15
Work with projects
CODEBLOCK16
Output Formats
Most commands support --json for machine-readable output:
CODEBLOCK17
This is useful for parsing results programmatically or filtering with jq.
Session ID Matching
Session IDs support partial matching - use the first few characters:
CODEBLOCK18
Reference
For complete command reference, see cli-commands.md.
Troubleshooting
Check server connectivity
CODEBLOCK19
Verify installation
CODEBLOCK20
Reinstall if needed
CODEBLOCK21
技能名称: ccsinfo
详细描述:
ccsinfo - Claude Code 会话信息
从用户机器上运行的远程 ccsinfo 服务器访问和分析 Claude Code 会话数据。
服务器仓库: https://github.com/myk-org/ccsinfo
要求
1. 服务器设置(在包含 Claude Code 数据的机器上)
ccsinfo 服务器必须在包含 Claude Code 会话数据的机器上运行。
安装并运行服务器:
bash
安装 ccsinfo
uv tool install git+https://github.com/myk-org/ccsinfo.git
启动服务器(可在局域网内访问)
ccsinfo serve --host 0.0.0.0 --port 9999
服务器从 ~/.claude/projects/ 读取 Claude Code 会话数据,并通过 REST API 暴露数据。
完整服务器文档请参见:https://github.com/myk-org/ccsinfo
2. 客户端设置(运行此技能的位置)
必须安装 ccsinfo CLI 工具。检查是否已安装:
bash
which ccsinfo
如果未安装,请运行安装脚本:
bash
bash scripts/install.sh
3. 配置
设置 CCSINFOSERVERURL 环境变量指向您的服务器:
bash
export CCSINFOSERVERURL=http://192.168.1.100:9999
将此配置添加到您的 shell 配置文件(.bashrc、.zshrc 等)中以跨会话持久化。
快速入门
所有命令通过 $CCSINFOSERVERURL 自动连接到远程服务器。
列出最近的会话
bash
ccsinfo sessions list
显示会话详情(支持部分 ID 匹配)
bash
ccsinfo sessions show
查看对话消息
bash
ccsinfo sessions messages
按内容搜索会话
bash
ccsinfo search sessions 搜索词
查看全局统计信息
bash
ccsinfo stats global
常见工作流程
检查特定会话
- 1. 列出会话以查找 ID:
bash
ccsinfo sessions list
- 2. 显示会话详情:
bash
ccsinfo sessions show
- 3. 查看消息:
bash
ccsinfo sessions messages
- 4. 检查工具调用:
bash
ccsinfo sessions tools
按内容查找会话
bash
在所有会话中搜索
ccsinfo search sessions 重构
搜索消息内容
ccsinfo search messages 修复错误
搜索提示历史
ccsinfo search history 实现功能
跟踪任务
bash
显示所有待处理任务
ccsinfo tasks pending
列出会话的任务
ccsinfo tasks list -s
显示特定任务详情
ccsinfo tasks show -s
查看统计信息和趋势
bash
总体使用统计
ccsinfo stats global
每日活动明细
ccsinfo stats daily
分析随时间变化的趋势
ccsinfo stats trends
处理项目
bash
列出所有项目
ccsinfo projects list
显示项目详情
ccsinfo projects show
项目统计信息
ccsinfo projects stats
输出格式
大多数命令支持 --json 参数以输出机器可读的格式:
bash
ccsinfo sessions list --json
ccsinfo stats global --json
这对于以编程方式解析结果或使用 jq 进行过滤非常有用。
会话 ID 匹配
会话 ID 支持部分匹配——使用前几个字符:
bash
ccsinfo sessions show a1b2c3 # 匹配 a1b2c3d4-e5f6-7890-abcd-ef1234567890
参考
完整命令参考,请参见 cli-commands.md。
故障排除
检查服务器连接
bash
验证服务器 URL 是否已设置
echo $CCSINFOSERVERURL
测试连接(列出会话)
ccsinfo sessions list
验证安装
bash
检查 ccsinfo 是否已安装
which ccsinfo
检查版本
ccsinfo --version
需要时重新安装
bash
bash scripts/install.sh