Summarize and compress the current conversation history into a structured context snapshot, then call compact_chat_history to save it. Read this skill only when the user explicitly asks to compact/summarize — system-triggered compaction injects the instructions directly without requiring a skill read.
64
76%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Critical
Do not install without reviewing
Fix and improve this skill with Tessl
tessl review fix ./backend/super-magic/agents/skills/compact-chat-history/SKILL.mdCompress the current conversation into a structured summary, then call compact_chat_history immediately with the result.
The conversation history is too long and must be compressed. You must call the compact_chat_history tool immediately to complete the summary.
Your task is to create a thorough summary of the conversation so far, with special attention to the user's explicit requests and your prior actions. The summary must capture all important details, work results, and file locations to ensure continuity, since we follow an "everything-is-a-file" architecture.
Remember: subsequent work will restore context by reading files, so you must provide accurate file paths. For content already saved to files, note the location — do not repeat large blocks of text in the summary itself.
Treat the summary as a recovery index, not a transcript. Inline only information that cannot be reliably recovered by reading files or reloading skills: exact URLs, external IDs, user-provided constraints, active runtime references, and critical failure evidence.
If a User Input Reference Index is provided, do not reproduce full user messages yourself. Select the indexes of user messages that must be preserved exactly, mention those indexes in Section 6 with short reasons, and pass the same indexes to compact_chat_history as preserved_user_input_indexes. The system restores the exact text from the original chat history.
Use indexes only from the latest User Input Reference Index visible in context. If no current index is available, pass an empty list instead of guessing.
Your summary must include the following sections:
1. Task Goals and Approach
2. Key Files and Context Resources (most important part — be thorough and precise)
.workspace root, it may be relative to .workspace, but it must include the full relative path from that root..workspace, use the absolute filesystem path starting with /.magic.project.js)2.5 External Links and Irrecoverable References
3. Skills Needed to Resume This Task
read_skills() after compression, so repeating their content here wastes context budget4. Resolved Issues and Current State
5. Incomplete Tasks, Next Steps, and Continuity Confirmation
6. High-Value User Input
compact_chat_history, pass the selected indexes as preserved_user_input_indexes.Preserve exact carriers of future work when they are still relevant:
.workspace; paths outside .workspace must be preserved as absolute paths.Do not preserve full file contents when the file can be read again and the summary keeps the correct path. Preserve what to read and why instead. Do not preserve stale search-result links, old intermediate URLs, or details that were superseded by a later decision.
If any of the above sections overlap, merge them — no need to repeat.
1. Task Goals and Approach:
[Describe each specific request in detail]
- [Method 1]
- [Strategy 2]
- [...]
2. Key Files and Context Resources (most critical):
- [project outline path] - overall plan and structure - read when confirming global goals and scope
- [currently active file path] - current progress and key context - read first when resuming
- [user-specified reference path] - content user explicitly requested - read when working on that section
- [similar completed content path] - style/structure reference - read a suitable amount when consistency is needed
- [project config path] - project settings - read when config details are needed
- [history/backup path] - read when tracing back changes
- [info name] - not saved to file - how to re-acquire: [specific method]
Reading principles:
- Start with the most important items closest to the current task, then read others as needed
- For high-consistency tasks, read a suitable number of completed items as reference
- Avoid reading all files at once to prevent filling up context again
2.5 External Links and Irrecoverable References:
- URL: https://example.com/watch?v=abc123&t=10 - source video for the active analysis task; status: still needed; needed by: continue video analysis
- Run ID: run_123456 - external job created before compaction; status: pending; needed by: poll result
- Local URL: http://localhost:5173 - active dev server; status: running; needed by: browser verification
(Only include references still needed for incomplete or future tasks.)
3. Skills Needed to Resume This Task:
- [Skill name] - [one-line purpose]
- [Skill name] - [one-line purpose]
(Do NOT include skill content — it will be re-loaded automatically)
4. Resolved Issues and Current State:
[Description of resolved issues and ongoing troubleshooting]
[Accurate description of current work state]
5. Incomplete Tasks, Next Steps, and Continuity Confirmation:
Status: incomplete
- Task 1
- Task 2
Next action: continue from the failed file read using the exact full path above
Relevant quote: "Please continue analyzing this video. The link is https://example.com/watch?v=abc123."
6. High-Value User Input:
Selected user input indexes:
- 2: user gave a non-negotiable output-language constraint
- 5: user provided the source URL needed for the unfinished analysis
The system restores the exact text from the original chat history. Do not copy full user messages here.summary parameter of the compact_chat_history tool call to ensure complete delivery.preserved_user_input_indexes parameter. If none are needed, pass an empty list.f9973c5
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.