session-handoff
/session-handoff
Buduje plik HANDOFF.md z logu sesji Claude Code, by zwolnić limit użycia, i ostrzega, gdy kontekst przekracza około 150k tokenów.
- Autor
- binay-py ↗
- Repozytorium
- claude-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 09.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 1
- Komentarze HTML
- 1
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 09.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
- SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.
Skrypty: scripts/handoff.mjs
Co robi i kiedy
Buduje plik HANDOFF.md z logu sesji Claude Code, by zwolnić limit użycia, i ostrzega, gdy kontekst przekracza około 150k tokenów.
Wyzwalacze z opisu
Oryginalny opis (EN)
Keep long Claude Code sessions from eating usage limits. `write` builds a HANDOFF.md from the session log (files edited, commands run, recent requests, last todo list, git status and recent commits, secrets redacted) with sections Claude fills in (goal, done, decisions, open problems, next steps), so the user can /clear and continue in a cheap fresh session. `meter` is a Stop hook that warns the user when the context passes ~150k tokens. Use when a session is long or drifting, when the user says "write a handoff", "summarize where we are", "I need to restart", or when context warnings appear.
Jak działa
- Writing a handoff (when the user asks, or the meter fires)
- Context meter (optional hook, ask before installing)
- Limits
Podgląd SKILL.md
---
name: session-handoff
description: Keep long Claude Code sessions from eating usage limits. `write` builds a HANDOFF.md from the session log (files edited, commands run, recent requests, last todo list, git status and recent commits, secrets redacted) with sections Claude fills in (goal, done, decisions, open problems, next steps), so the user can /clear and continue in a cheap fresh session. `meter` is a Stop hook that warns the user when the context passes ~150k tokens. Use when a session is long or drifting, when the user says "write a handoff", "summarize where we are", "I need to restart", or when context warnings appear.
---
# session-handoff
`scripts/handoff.mjs` is zero-dependency Node 22+ and reads the local logs in `~/.claude/projects/`.
Every message in a session re-sends the whole context. At 300k+ tokens even "thanks" costs as much as reading a book, and the claude-token-audit skill usually shows a few long sessions eating most of the usage. A good handoff plus `/clear` resets that to a few thousand tokens.
## Writing a handoff (when the user asks, or the meter fires)
1. `node handoff.mjs write` (in the project folder). It picks this session automatically, even with several Claude Code windows open. `--session <id-prefix>` or `--transcript <file>` choose explicitly; `--out` changes the file name.
2. Open `HANDOFF.md` and replace every `<!-- CLAUDE: … -->` placeholder from your knowledge of the session. Be short and concrete: real file names, exact error messages, commands that worked, what the user explicitly decided or rejected. Don't pad. The "Facts from the session log" section is already filled.
3. Tell the user: **run `/clear`, then say "Read HANDOFF.md and continue"**. Remind them HANDOFF.md is a working note (the script warns if it isn't gitignored).
Secrets in commands and prompts (API keys, tokens, `PASSWORD=…`, credentialed URLs) are replaced with `[redacted]` in the facts section. Still read it before sharing.
## Context meter (optional hook, ask before installing)
```json
{ "hooks": { "Stop": [ { "hooks": [ { "type": "command", "command": "node \"/ABSOLUTE/PATH/session-handoff/scripts/handoff.mjs\" meter" } ] } ] } }
```
After each reply it reads the tail of the transcript. Once context passes 150k tokens it shows the user one line suggesting a handoff or `/compact`, then again every +50k (`HANDOFF_WARN_TOKENS`, `HANDOFF_STEP_TOKENS`). Silent otherwise, and it fails open.
`node handoff.mjs status` prints the current context size.
## Limits
- The facts come from the log. The *why* comes from Claude filling the sections, so the handoff is only as good as that summary. Write it before the context is so long that early details are fuzzy.
- `/compact` is the built-in alternative when you want to stay in the same session. A handoff file survives across sessions, machines and teammates.
Pliki w paczce (2)
- SKILL.md 3 KB
- scripts/handoff.mjs 10 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · binay-py/claude-skills | 100 | MIT |
| iuliandita/skills | 100 | MIT |
| cardene777/agent-shuriken | 100 | MIT |
| mcorbett51090/ravenclaude | 100 | MIT |
| upex-galaxy/agentic-qa-boilerplate | 100 | MIT |
| adobe/spectrum-web-components | 100 | Apache-2.0 |
| FrancoStino/opencode-skills-collection | 100 | MIT |
| h2xd/skills | 100 | MIT |
| davila7/claude-code-templates | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 68d5ac96fa65 (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
- 90handoff
Przygotowuje lub wznawia przekazanie sesji Claude Code przy granicach zadań, gdy kontekst jest zapełniony w około 60-70 proc. - 86handoff
Pisze lub aktualizuje plik HANDOFF.md, aby nowy agent mógł kontynuować pracę bez utraty kontekstu. - 100session-wrapper
Zamienia długą sesję Claude Code lub Codex albo wyeksportowany czat w jeden plik przekazania, z zredagowanymi sekretami i numerami tur. - 100handoff
Zapisuje .token-saver/handoff.md, żeby praca mogła wrócić w świeżej, taniej sesji, gdy kontekst się kończy. - 90handoff
Pisze dokument przekazania, by inny agent lub nowa sesja mogła kontynuować pracę bez ponownego tłumaczenia. - 90handoff
Zapisuje notatkę przekazania na koniec sesji z celami, decyzjami, otwartymi pytaniami i pierwszym krokiem; ukrywa sekrety.