session
Skill48 starsChanged 10 months agoMITView on GitHub
Session lifecycle management. Parent skill for session-related skills: learning (pattern extraction) and compact (context compression).
8 other projects use a version of this.
Adopted by
Most recently taken up by
- kimkon1011/orgiast-claude-rulestheir own version, first seen Sep 25, 2026
- getCurrentThread/claude-session-kittheir own version, first seen Sep 18, 2026
- lesdo/ClaudeCode-ContextPlugintheir own version, first seen Jul 1, 2026
- Surfrrosa/claude-skillstheir own version, first seen Jun 25, 2026
- maxwell2732/claudecode-research-harness-workflowtheir own version, first seen May 29, 2026
- Tiendil/donnatheir own version, first seen May 16, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- anthropics/claude-for-legal★ 9.6ksame name
- maxwell2732/claudecode-research-harness-workflow★ 40same name
- Tiendil/donna★ 28same name
- lesdo/ClaudeCode-ContextPlugin★ 1same name
- Surfrrosa/claude-skills★ 1same name
- getCurrentThread/claude-session-kit★ 0same name
- J-Krush/skills★ 0same name
- kimkon1011/orgiast-claude-rules★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- llms.txtllms.txt
- apiSkill
- architectureSkill
- backendSkill
- compactSkill
- databaseSkill
- debugSkill
- devopsSkill
- explorationSkill
- frontendSkill
- gitSkill
- learningSkill
- modelSkill
- nativeSkill
- qualitySkill
- search-firstSkill
- second-opinionSkill
- securitySkill
- testingSkill
The file
Files
会话生命周期管理
本技能提供 Claude Code 会话的生命周期管理策略,整合持续学习和上下文压缩。
会话生命周期
会话开始 ──→ 工作阶段 ──→ 检查点 ──→ 会话结束
│ │ │ │
│ │ │ └─→ 提取模式 (/learning)
│ │ └─→ 上下文压缩 (/cc-best:compact-context)
│ └─→ 持续工作
└─→ 加载上次上下文策略选择
| 场景 | 推荐策略 | 子技能 |
| 上下文接近限制 | 策略性压缩 | /cc-best:compact-context |
| 完成重要任务节点 | 主动压缩 | /cc-best:compact-context |
| 会话结束时 | 提取可复用模式 | /learning |
| 解决了复杂问题 | 记录解决方案 | /learning |
| 发现项目特定知识 | 记录到知识库 | /learning |
子技能
1. learning(持续学习)
适用场景:
- 会话结束时提取模式
- 记录调试技巧
- 保存项目特定知识
- 积累可复用解决方案
使用方式:/learning 或参阅 skills/learning/SKILL.md
2. compact(上下文压缩)
适用场景:
- 上下文接近限制时
- 完成阶段性任务后
- 切换工作主题前
- 需要释放上下文空间
使用方式:/cc-best:compact-context 或参阅 skills/compact/SKILL.md
最佳实践
何时压缩
- 主动压缩 - 完成一个功能模块后
- 被动压缩 - 系统提示上下文接近限制
- 切换压缩 - 准备切换到不同任务前
何时记录
- 立即记录 - 解决问题后立即记录
- 定期回顾 - 会话结束前检查值得记录的内容
- 增量更新 - 发现新知识时更新已有记录
会话别名 | Session Aliases
为会话设置语义化标签,便于快速查找和恢复。
别名管理
在会话元数据中记录语义化标签:
{
"name": "feature-login-page",
"sessionPath": "memory-bank/progress.md",
"tags": ["feature", "frontend"],
"created": "2026-02-24 14:30:00",
"summary": "实现登录页面 - PM/Lead/Dev 已完成"
}存储位置: ~/.claude/session-aliases.json(全局,跨项目共享)
标签分类系统:
| 前缀 | 含义 | 示例 |
feature-* | 功能开发 | feature-login-page |
bugfix-* | 缺陷修复 | bugfix-auth-timeout |
refactor-* | 重构改进 | refactor-api-layer |
explore-* | 技术探索 | explore-new-framework |
跨会话恢复
当使用 /cc-best:catchup 恢复时:
- 读取上次会话的 alias 信息
- 加载对应的 progress.md 状态
- 显示上次会话的关键决策摘要
别名操作
- 保存: 会话结束时自动提示或通过
/cc-best:checkpoint手动触发 - 查找: 通过
/cc-best:catchup --alias <name>快速恢复指定会话 - 清理: 超过 30 天未使用的别名自动标记为过期
会话健康指标
| 指标 | 健康状态 | 行动 |
| 上下文使用 | < 70% | 继续工作 |
| 上下文使用 | 70-90% | 考虑压缩 |
| 上下文使用 | > 90% | 立即压缩 |
| 有价值的发现 | 有 | 记录到知识库 |
记住:良好的会话管理让每次对话都能高效利用上下文,同时积累可复用的知识。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

