compact
Condense long session context while preserving current task state, decisions, files, and next actions
- License 许可
- MIT
- 最近更新
- 2026-07-20
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- compact
- description
- Condense long session context while preserving current task state, decisions, files, and next actions
03 SKILL.md 正文
Compact Skill
Use this skill when:
- The conversation is long, repetitive, or approaching the model context window.
- The user says compact, compress context, summarize session, reduce tokens, or continue without losing state.
- The assistant needs to hand off the session to another AI or future turn.
Operating Principle
Compact is not a casual summary. It is a state-preservation operation. The output must keep the agent able to continue the work without rereading the whole transcript.
Required Output
Produce a concise handoff with these sections:
- Current Goal — the exact user objective being pursued.
- Decisions Locked — decisions already made, with rationale.
- Files/Systems Touched — paths, modules, APIs, UI surfaces, tests, and why they matter.
- Current State — what is already implemented, verified, or still failing.
- Fresh Tail — the most recent user intent and immediate next step.
- Context Ledger — what was kept raw, what was summarized, what was trimmed, token pressure, and the reason for each decision.
- Risks — likely bugs, missing tests, stale assumptions, or context that must not be lost.
- Do Not Touch — files/folders owned by other parallel agents.
Compression Rules
- Keep exact file paths and API names.
- Keep test commands and their pass/fail status.
- Keep user preferences and privacy constraints.
- Keep memory/project scope decisions.
- Keep token budget pressure, compact trigger, preserved fresh-tail count, and any context ledger id if available.
- Remove duplicate narration, old exploration branches, and raw tool output unless it is needed to reproduce a bug.
- Do not claim something was verified unless a test, build, or visual check actually ran.
Token Budget
Aim for 800-1,500 words for a normal session. If the context is under severe pressure, compress to 300-600 words and keep only: goal, decisions, touched files, current state, next action, blocked folders.
04 同仓库更多 Skills
self-improvement-review
Audit this session for gaps in speed, accuracy, and system quality — propose fixes
scenario-planner
Build structured best/base/worst case scenarios for decisions or projects
project-context
Load and summarize all relevant project context files for a named project
llm-engineer
Design and implement LLM pipelines, agent systems, and AI integrations
geneva-handoff
Package current session context for seamless handoff to next session or agent
deep_research
Multi-phase iterative research loop with web search, synthesis, and quality gate