Skip to main content
ClaudeWave
Skill5k repo starsupdated 1mo ago

compact-chat-history

compact-chat-history is a Claude Code skill that compresses lengthy conversation histories into structured context snapshots by summarizing task goals, file locations, required skills, and current progress, then saves this snapshot via the compact_chat_history tool. Use this skill when conversation length threatens to exceed token limits and you need to preserve continuity for resuming work across multiple sessions.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/dtyq/magic /tmp/compact-chat-history && cp -r /tmp/compact-chat-history/backend/super-magic/agents/skills/compact-chat-history ~/.claude/skills/compact-chat-history
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Compact Chat History

Compress the current conversation into a structured summary, then call `compact_chat_history` immediately with the result.

---

## Instructions

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**
- Record all of the user's explicit requests and intent in detail (not just high-level business goals — be specific about every requirement)
- Describe the methods and strategies you used (e.g. data processing approach, content generation strategy, information organization method), but do not repeat system prompt content; if there is nothing beyond the system prompt, write "N/A"

**2. Key Files and Context Resources** *(most important part — be thorough and precise)*
- List all relevant files and resources in order of importance for the current task, without distinguishing between "must-read" and "reference"
- For each item, include: full path, purpose, and recommended read timing
- Preserve path fidelity:
  - If a path is inside the current `.workspace` root, it may be relative to `.workspace`, but it must include the full relative path from that root.
  - If a path is outside `.workspace`, use the absolute filesystem path starting with `/`.
  - Never shorten a path to only the basename or last folder name.
  - If a file read failed, record the exact attempted path and the current working directory used for that attempt.
  - If the path is ambiguous or only partially known, quote the original user-provided path and mark it as unresolved instead of inventing a normalized path.
- Prioritize: currently active files and folders, project outline/plan files, user-specified reference files, project config files (e.g. `magic.project.js`)
- If some information is not stored in any file (no accurate path available), explicitly note it and provide a method to re-acquire it
- Suggest reading the most critical items first, then proceeding in order as needed
- Warn that reading all files at once may again fill up the context
- For tasks requiring high consistency (e.g. PPT, serial content, same-type pages/chapters), suggest reading a suitable number of already-completed items as style/structure reference

**2.5 External Links and Irrecoverable References**
- List exact non-file references that may still be needed after compression: internet URLs, media URLs, API endpoints, documentation links, repository/issue/PR links, dashboard/share links, object keys, external IDs, usernames, commit SHAs, branch names, tags, job IDs, run IDs, session IDs, active localhost URLs, ports, and UI attachment identifiers.
- For each item, include: exact value, purpose, current status, and which upcoming task needs it.
- Preserve exact URL text, including query strings and fragments. Do not shorten, rewrite, infer, or replace URLs with domain-only summaries.
- Do not include external references that were already fully processed and have no future use.
- For secrets or credentials, prefer the secure storage location, environment variable name, or config key. Include an exact secret value only when the user already provided it in chat and the current task cannot continue without that value.
- If an external reference was mentioned but is now unavailable, record how to reacquire it.

**3. Skills Needed to Resume This Task**
- List skills that are helpful or relevant to continuing the current task, in order of importance
- Include skill name and a one-line purpose description
- Do NOT reproduce, summarize, or paraphrase any skill content — skills will be re-loaded via `read_skills()` after compression, so repeating their content here wastes context budget
- Write "None" if there are no relevant skills

**4. Resolved Issues and Current State**
- Record resolved issues and any ongoing troubleshooting
- Describe in detail what you were doing just before the summary was requested, with special attention to the latest messages from both user and assistant
- Include file names; for short content quote directly (under 150 chars); for long content note the line range
- Keep unresolved failure evidence visible until it is fixed, intentionally abandoned, or superseded by the user: failed tool/command name, critical error message, attempted path or URL, and the next recovery step.

**5. Incomplete Tasks, Next Steps, and Continuity Confirmation**
- List all incomplete tasks in execution order (no priority concept)
- Describe your intended next action
- Important: ensure next steps are directly tied to the user's explicit requests and the task you were w
guidesSkill
canvas-designerSkill

Core canvas design skill covering project management, multimedia principles, AI image generation, web image search, and design marker processing. Load for any canvas design task. CRITICAL - When user message contains [@design_canvas_project:...] or [@design_marker:...] mentions, or when the user wants to generate video/animation/clip on a canvas project, you MUST load this skill first before any operations.

creating-slidesSkill

Slide/PPT creation skill that provides complete slide creation, editing, and management capabilities. Use when users need to create slides, make presentations, edit slide content, or manage slide projects. CRITICAL - When user message contains [@slide_project:...] mention, you MUST load this skill first before any operations.

crew-creatorSkill

|

deep-researchSkill

|

develop-data-analysis-dashboardSkill

Data analysis dashboard (instrument panel) development skill. Use when users need to develop data dashboards, create/edit Dashboard projects, build large-screen data boards, or perform dashboard data cleaning. Includes dashboard project creation, card plan, data cleaning (data_cleaning.py), card management tools (create_dashboard_cards, update_dashboard_cards, delete_dashboard_cards, query_dashboard_cards), map download tool (download_dashboard_maps), dashboard development, and validation.

dingtalk-cliSkill

Use when the user wants to interact with DingTalk in any way — including but not limited to: reading, querying, searching, sending, replying to, forwarding, or recalling DingTalk chat messages and chat history; managing group chats and conversations; sending DING alerts; querying contacts, org structure, AI search, or coworkers; reading, searching, creating, or editing DingTalk docs, drive files, sheets, AI tables, wiki, mail, calendar events, meeting rooms, AI meeting minutes, attendance, OA approvals, todos, reports/logs, live sessions, AI apps, permissions, or open-platform docs.

env-managerSkill

Use when the user provides API keys, tokens, or other configuration values that should persist across sessions, or when the user asks to query, list, or delete saved environment variables. Manages personal env by default and workspace env only when explicitly requested.