用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/zeenie-ai/OpenCompany --skill compaction-skill命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | compaction-skill |
| description | Manage memory compaction by summarizing conversation history when approaching token limits |
| allowed-tools | memory-save memory-get |
| metadata | {"author":"opencompany","version":"1.0","category":"memory","icon":"📦","color":"#8B5CF6"} |
You have the ability to compact conversation memory when it grows too large. Compaction transforms verbose conversation history into a structured summary that preserves essential context while reducing token usage.
Compact memory when:
When compacting, create a summary with these 5 sections:
What the user is trying to accomplish. Include:
What's been completed and what's in progress:
Key findings, decisions, or problems encountered:
What needs to happen next:
Critical details that must be retained:
Output the compacted summary in this format:
# Conversation Summary (Compacted)
*Generated: [ISO timestamp]*
## Task Overview
[1-3 sentences describing the goal]
## Current State
- [Completed item 1]
- [Completed item 2]
- [In progress: description]
## Important Discoveries
- [Discovery 1 with context]
- [Decision made: rationale]
- [Problem solved: approach]
## Next Steps
1. [Next action]
2. [Following action]
## Context to Preserve
- [Critical detail 1]
- [Critical detail 2]
Before (verbose history):
Human: Can you help me debug this Python function?
AI: Of course! Please share the function.
Human: Here's the function: def calculate(x): return x * 2
AI: I see the function. What issue are you experiencing?
Human: It returns None sometimes
AI: That's interesting. Can you show me an example input?
Human: calculate("5") returns None
AI: Ah, I see the issue! When you pass a string...
[continues for 50+ messages]
After (compacted):
# Conversation Summary (Compacted)
*Generated: 2025-02-13T10:30:00Z*
## Task Overview
Debug Python function `calculate(x)` that returns None for some inputs.
## Current State
- Identified root cause: string inputs cause implicit None return
- Implemented fix with type checking and conversion
- Tests passing for int, float, and string inputs
## Important Discoveries
- Original function had no type validation
- String multiplication in Python doesn't raise error but behaves unexpectedly
- User prefers explicit error messages over silent failures
## Next Steps
1. Add input validation for edge cases (None, empty string)
2. Write unit tests for the fixed function
## Context to Preserve
- Function location: `utils/math_helpers.py:45`
- User wants to maintain backward compatibility
- Prefer raising ValueError over returning None
When compaction is triggered:
This allows conversation to continue naturally while maintaining reduced token usage.
基于 SOC 职业分类