一键导入
compaction-skill
Manage memory compaction by summarizing conversation history when approaching token limits
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage memory compaction by summarizing conversation history when approaching token limits
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | compaction-skill |
| description | Manage memory compaction by summarizing conversation history when approaching token limits |
| allowed-tools | memory-save memory-get |
| metadata | {"author":"machina","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.
Drive the user's real Chrome over raw CDP by writing Python against browser-harness helpers - screenshot, coordinate clicks, JS evaluation, form fill, tabs. For tasks needing full freedom or the user's own logins.
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
Deploy sites and apps to Vercel, inspect deployments, stream logs, and manage projects/env/domains via the Vercel CLI. Deploy a directory and get back the live deployment URL; everything else the CLI supports is available through the custom command passthrough.
Use this skill to generate well-branded interfaces and assets for MachinaOS (zeenie.ai), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, assets, and UI kit components for prototyping.
Run AI-generated Python in a hard sandbox (Pydantic Monty) with enforced time + memory limits and opt-in capabilities. Use for untrusted code; supports a Python subset.
Interactive browser automation - navigate, click, type, fill forms, take screenshots, get accessibility snapshots. Supports system Chrome/Edge via auto-detection.