From team-skills-platform
上下文优化技能,通过 trigger-based 懒加载和 context composition awareness 自动重组长会话上下文。
npx claudepluginhub colin4k1024/tspThis skill uses the workspace's default tool permissions.
上下文优化技能,通过 trigger-based 懒加载和 context composition awareness 自动重组长会话上下文。
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
上下文优化技能,通过 trigger-based 懒加载和 context composition awareness 自动重组长会话上下文。
只在特定 trigger 发生时加载上下文:
| Trigger | 条件 | 行为 |
|---|---|---|
context_70% | 上下文使用 > 70% | 触发压缩建议 |
context_85% | 上下文使用 > 85% | 强制压缩 |
logical_break | 检测到逻辑断点 | 建议整理 |
specialist_done | specialist 完成 | 归档输出 |
理解上下文不同部分的价值:
高价值(总是保留):
中等价值(根据大小决定):
低价值(安全丢弃):
提取所有决策,保存到 ~/.claude/memory/error_experience/decisions/
提取 pending items 和 next hints,保存到 session summary
保留系统提示和最近 20 轮对话,压缩中间部分
将长工具输出替换为摘要:[File X read, Y lines]
| Skill | 关系 |
|---|---|
| Memory Persistence | Strategic Compact 使用其存储来保存决策和摘要 |
| Error Experience Library | 从压缩的上下文中提取错误模式 |
| Continuous Learning | Instincts 从归档的上下文中生成 |
用户:连续工作 2 小时后
系统:检测到上下文使用率 75%
系统:触发 suggest_compact hook
系统:提供 4 阶段压缩计划
用户:确认执行
系统:执行压缩,保留关键决策和待办
用户:运行 /code-review
Specialist:输出详细代码审查报告
系统:检测到 specialist_done trigger
系统:提取关键结论,丢弃详细追踪
系统:保存结论到 memory store
| 使用率 | 紧迫度 | 建议操作 |
|---|---|---|
| < 70% | low | 无需操作 |
| 70-85% | medium | 建议压缩,可选择性执行 |
| 85-95% | high | 强烈建议压缩 |
| > 95% | critical | 必须立即压缩 |
/compact - 手动触发压缩/compact status - 显示当前上下文使用率/compact plan - 显示压缩计划而不执行