/sessionlog:compactfrom sessionlog
Compresses the current Claude Code session into a structured task continuity summary for resuming after context clear. Activated by phrases like 'compact session' or 'save session context'.
Ships in sessionlog. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Export the current session and produce a compressed task continuity summary that captures all essential knowledge required to resume the task without re-reading the full session log.
project_dir="$HOME/.claude/projects/$(pwd | sed 's|/|-|g')"
current_session=$(ls -t "$project_dir"/*.jsonl 2>/dev/null | head -1)
session_id=$(basename "$current_session" .jsonl)
echo "Session: $session_id"
echo "Source: $current_session"
Use the export script to produce the human-readable TXT:
output_dir="docs/sessionlogs"
mkdir -p "$output_dir"
"${CLAUDE_PLUGIN_ROOT}/scripts/export-session.sh" "$current_session" "$output_dir" "$session_id"
This produces docs/sessionlogs/claude-<session-id>.txt.
Read the full content of docs/sessionlogs/claude-<session-id>.txt.
You are now acting as a structured reasoning assistant specializing in summarizing and compressing AI agent session logs. Your goal is to transform the full conversation history you just read into a task continuity summary.
Purpose: Compact the session log into a structured summary that communicates:
Create docs/sessionlogs/claude-<session-id>-compact.md with the following structure. Accuracy and clarity are more important than brevity.
# Task Continuity Summary
> Compacted from session `<session-id>` on <date>
## 1. Task Overview
Brief summary of the main purpose or goal the session was working on.
Any key constraints, requirements, or parameters identified.
## 2. Current Status
What has been completed or achieved so far.
The current state of the problem or solution.
## 3. Environment and Assets
List the specific file paths, code snippets, library versions, or exact error codes that are currently active.
## 4. Attempts and Learnings
List of major approaches attempted (what was tried).
Why each attempt failed or succeeded (causes, issues, or insights).
Highlight recurring problems or misunderstandings.
## 5. Key Discoveries and Reasoning
Important facts, decisions, or deductions that shape the next steps.
Core assumptions or definitions that should remain stable in future work.
## 6. Pending Questions or Unresolved Issues
Specific open questions, blockers, or design uncertainties that remain.
## 7. Next Steps
Recommended next logical actions to continue progress.
Suggestions on how to avoid repeating previous errors.
## 8. Practical Memory Summary
A concise "mission context recap" of 10-15 lines, phrased as if handing off the project to a new agent instance. This must be self-contained enough that a fresh agent can pick up immediately where the last left off.
Compression Rules:
Print an abridged version of the compact file — show the section headings and 1-2 key bullets from each section so the user can verify the summary looks right.
Then tell the user:
Compact file saved to
docs/sessionlogs/claude-<session-id>-compact.mdTo continue in a fresh session:
- Run
/clearto reset context- Then run
/sessionlog:continueto pick up where you left off
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/continuesessionlog:continueThis skill should be used when the user asks to "continue session", "resume session", "pick up where I left off", "sessionlog continue", "continue from compact", "load session context", or wants to restore context from a previously compacted session file.
/exportsessionlog:exportThis skill should be used when the user asks to "export session log", "convert session to json", "export conversation", "save session", "sessionlog export", "export this session", or wants to export the current Claude Code session as a standard LLM conversation JSON file and human-readable TXT transcript.
/npx claudepluginhub florianbuetow/claude-code --plugin sessionlogOther plugins' skills for the same job