会话管理器
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 可不是闹着玩的。
by stickerdaniel
LinkedIn Profile and Job Scraper 是让 Claude 直接抓取 LinkedIn 个人资料、公司信息和职位详情的工具。
✎ 这个服务器解决了招聘和商业调研中手动复制粘贴 LinkedIn 数据的痛点,适合猎头或市场分析师快速获取候选人背景和公司动态。不过,LinkedIn 反爬机制频繁更新,数据稳定性需要持续维护,使用时建议搭配人工验证。
相关资讯
AWS、微软、Google 和 Anthropic 的智能体运行时均转向会话感知执行,用会话级隔离取代请求级负载均衡。这一变化源于智能体的长运行、有状态、执行不可信代码的特性。四家厂商在架构上趋同,但实现载体各异:AWS 用 Firecracker 微VM,Azure 用 VM 隔离沙箱,Google 采用混合架构,Anthropic 则将执行环境解耦为可替换层。
Simon Willison 升级了他的 OpenAI WebRTC 音频会话工具,支持最新的 GPT-Realtime-2 模型和文档上下文功能。用户可以在浏览器中粘贴文本,让语音对话围绕指定内容进行。
GitHub Copilot 远程控制功能现已全面可用,开发者可在 VS Code、CLI 中启动会话后,通过 github.com 或 GitHub Mobile 实时监控 Agent 进度、发送额外指令、审批权限请求,并完成从计划到合并 PR 的完整工作流,支持多设备无缝切换。