会话管理器
session
by BytesAgain
Manage session state and lifecycle using JSONL storage. Use when tracking user sessions, expiring stale data, or auditing session activity.
安装
claude skill add --url github.com/openclaw/skills/tree/main/skills/bytesagain/session文档
Session — Session State Management Tool
Manage session state, lifecycle, and metadata using a local JSONL-backed store. Create, read, update, and delete sessions with support for expiration, refresh, bulk cleanup, and export.
Prerequisites
- Python 3.8+
bashshell- No external dependencies required
Data Storage
All session data is stored in ~/.session/data.jsonl. Each line is a JSON object representing a session record. The tool auto-creates the directory and file on first use.
Commands
| Command | Description | Usage |
|---|---|---|
| create | Create a new session with optional metadata | create [--user USER] [--ttl SECONDS] [--meta KEY=VAL ...] |
| get | Retrieve a session by ID | get SESSION_ID |
| set | Set or update a key-value pair in a session | set SESSION_ID KEY VALUE |
| delete | Delete a session by ID | delete SESSION_ID |
| list | List all sessions, optionally filter by status | list [--status active|expired] [--user USER] [--limit N] |
| expire | Mark a session as expired | expire SESSION_ID |
| refresh | Refresh a session's TTL / last-access timestamp | refresh SESSION_ID [--ttl SECONDS] |
| stats | Show summary statistics for all sessions | stats |
| export | Export sessions to JSON or CSV | export [--format json|csv] [--output FILE] |
| cleanup | Remove all expired sessions from the store | cleanup [--before TIMESTAMP] [--dry-run] |
| config | Show or update tool configuration | config [KEY] [VALUE] |
| help | Show usage information | help |
| version | Show version number | version |
Examples
# Create a session for user "alice" with 1-hour TTL
bash scripts/script.sh create --user alice --ttl 3600
# Get session details
bash scripts/script.sh get abc123
# Update session data
bash scripts/script.sh set abc123 theme dark
# List active sessions
bash scripts/script.sh list --status active
# Export all sessions to JSON
bash scripts/script.sh export --format json --output sessions.json
# Clean up expired sessions (dry-run first)
bash scripts/script.sh cleanup --dry-run
# Show statistics
bash scripts/script.sh stats
Output Format
All commands output structured JSON to stdout. Errors are written to stderr with a non-zero exit code.
Error Handling
- Missing session ID → exit 1 with descriptive error
- Invalid command → shows help text
- Corrupt JSONL line → skipped with warning to stderr
Notes
- Session IDs are generated as 12-character hex strings by default.
- TTL defaults to 3600 seconds (1 hour) if not specified.
- The
cleanupcommand permanently removes expired sessions from the JSONL file. - The
refreshcommand updateslast_accessand optionally resets the TTL. - All timestamps are stored as ISO 8601 UTC strings.
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
相关 Skills
技能工坊
by anthropics
覆盖 Skill 从创建到迭代优化全流程:起草能力、补测试提示、跑评测与基准方差分析,并持续改写内容和描述,提升效果与触发准确率。
✎ 技能工坊把技能从创建、迭代到评测串成闭环,方差分析加描述优化,特别适合把触发准确率打磨得更稳。
PPT处理
by anthropics
处理 .pptx 全流程:创建演示文稿、提取和解析幻灯片内容、批量修改现有文件,支持模板套用、合并拆分、备注评论与版式调整。
✎ 涉及PPTX的创建、解析、修改到合并拆分都能一站搞定,连备注、模板和评论也能处理,做演示文稿特别省心。
PDF处理
by anthropics
遇到 PDF 读写、文本表格提取、合并拆分、旋转加水印、表单填写或加解密时直接用它,也能提取图片、生成新 PDF,并把扫描件通过 OCR 变成可搜索文档。
✎ PDF杂活别再来回切工具了,文本表格提取、合并拆分到OCR识别一次搞定,连扫描件也能变可搜索。
相关 MCP 服务
文件系统
编辑精选by Anthropic
Filesystem 是 MCP 官方参考服务器,让 LLM 安全读写本地文件系统。
✎ 这个服务器解决了让 Claude 直接操作本地文件的痛点,比如自动整理文档或生成代码文件。适合需要自动化文件处理的开发者,但注意它只是参考实现,生产环境需自行加固安全。
by wonderwhy-er
Desktop Commander 是让 AI 直接执行终端命令、管理文件和进程的 MCP 服务器。
✎ 这工具解决了 AI 无法直接操作本地环境的痛点,适合需要自动化脚本调试或文件批量处理的开发者。它能让你用自然语言指挥终端,但权限控制需谨慎,毕竟让 AI 执行 rm -rf 可不是闹着玩的。
EdgarTools
编辑精选by dgunning
EdgarTools 是无需 API 密钥即可解析 SEC EDGAR 财报的开源 Python 库。
✎ 这个工具解决了金融数据获取的痛点——直接让 AI 读取结构化财报,比如让 Claude 分析苹果的 10-K 文件。适合量化分析师或金融开发者快速构建数据管道。但注意,它依赖 SEC 网站稳定性,高峰期可能延迟。
相关资讯
GitHub Copilot 远程控制功能现已全面可用,开发者可在 VS Code、CLI 中启动会话后,通过 github.com 或 GitHub Mobile 实时监控 Agent 进度、发送额外指令、审批权限请求,并完成从计划到合并 PR 的完整工作流,支持多设备无缝切换。