Przejdź do treści
Biblioteka skilli
AI i agenci · Pisanie

sessionlog:compact

/sessionlog:compact

Kompresuje bieżącą sesję do streszczenia, które można kontynuować po wyczyszczeniu kontekstu.

Repozytorium
claude-code ↗
Licencja
MIT
Ostatnia zmiana repozytorium
07.10.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format15 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 07.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Kompresuje bieżącą sesję do streszczenia, które można kontynuować po wyczyszczeniu kontekstu.

Wyzwalacze z opisu

compact sessioncompress sessionsave session contextsessionlog compactcompact this sessionprepare for clear
Oryginalny opis (EN)

This skill should be used when the user asks to "compact session", "compress session", "save session context", "sessionlog compact", "compact this session", "prepare for clear", or wants to create a compressed summary of the current session that can be continued after clearing context.

Jak działa

  1. Steps
Sekcje z nagłówków SKILL.md, w oryginale · 110 linii, 561 słów
Podgląd SKILL.md
---
name: sessionlog:compact
description: >
  This skill should be used when the user asks to "compact session",
  "compress session", "save session context", "sessionlog compact",
  "compact this session", "prepare for clear", or wants to create a
  compressed summary of the current session that can be continued
  after clearing context.
disable-model-invocation: false
---

# Session Compact

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.

## Steps

### 1. Identify current session

```bash
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"
```

### 2. Export the session transcript

Use the export script to produce the human-readable TXT:

```bash
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`.

### 3. Read the exported TXT file

Read the full content of `docs/sessionlogs/claude-<session-id>.txt`.

### 4. Generate the compact continuation file

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:
- The problem being solved and its current status.
- What has been done and what progress was made.
- What worked, what failed, and why.
- Lessons learned and constraints to avoid repeating past mistakes.
- The next steps and reasoning context to continue effectively.

Create `docs/sessionlogs/claude-<session-id>-compact.md` with the following structure. Accuracy and clarity are more important than brevity.

```markdown
# 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:**
- Prioritize actionable context over surface dialogue.
- Remove filler, conversational fluff, and meta-comments.
- Preserve all facts, reasoning, and lessons that affect future outcomes.
- Highlight contradictions or missteps to help future iterations avoid them.
- Focus on knowledge propagation, not chronological fidelity.
- When uncertain, assume the next agent must be able to pick up immediately where the last left off.

### 5. Report to user

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.md`
>
> To continue in a fresh session:
> 1. Run `/clear` to reset context
> 2. Then run `/sessionlog:continue` to pick up where you left off

Wersje

W bazie nie ma innych skilli o nazwie sessionlog:compact.

Migawka bazy z 13.11.2026 · wersja paczki ba532b766021 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90sessionlog:continue
    Wczytuje kontekst z wcześniej skompresowanego pliku sesji i pozwala kontynuować pracę dokładnie tam, gdzie skończono.
  • 90sessionlog:export
    Eksportuje bieżącą sesję Claude Code jako plik JSON w standardzie rozmów LLM oraz jako czytelny zapis tekstowy TXT.
  • 100compact-chat-history
    Streszcza i kompresuje historię bieżącej rozmowy do ustrukturyzowanej migawki kontekstu, a potem zapisuje ją przez compact_chat_history.
  • 100compact-summary
    Pomaga ocenić, czy warto skompaktować rozmowę, gdy kończy się kontekst, i przygotować instrukcję dla polecenia /compact.
  • 100handoff
    Tworzy zwięzły brief przekazania, który pozwala skompaktować bieżącą sesję albo przejść do nowej, gdy zajętość kontekstu rośnie lub przed wyczyszczeniem historii.
  • 100context-handoff
    Zachowuje kontekst przy kompaktowaniu i przywraca stan sesji z pliku HANDOFF.md, także automatycznie po poleceniach compact lub clear.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.