Logo vun Wrap

Wrap

Communautéit
somnus0x
wrap

Write a compact session handoff so you can /clear and continue in a fresh, cheap context — the new session auto-loads it via a SessionStart hook. Use when the user says "wrap", "wrap up", "handoff and clear", "fresh session", "clear context", "reset context", or after the context-nudge HUD/hook warns (≥250K context or cold cache) at a natural boundary (post/feature/project done).

Iwwersiicht

Editeursomnus0x
Repositoryagt-skill-pack
Skill-Nummwrap
Stären
74
Forks
17
Matgeliwwert Fichieren
3
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum somnus0x op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Wrap an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/somnus0x/agt-skill-pack/tree/main/skills/wrap
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/somnus0x/agt-skill-pack.git /tmp/agt-skill-pack
mkdir -p .claude/skills
cp -r /tmp/agt-skill-pack/skills/wrap .claude/skills/wrap
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Wrap an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Wrap automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Wrap net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Wrap — handoff, then /clear

Why: a long main loop re-reads its whole context every call, so a short reply typed into a huge chat after an idle gap costs the same as a long one. One cold resume at 800K context runs $5–10 at list price. A ~50-line brief carries what matters at a fraction of that.

You cannot run /clear yourself — your job is to make clearing lossless, then tell the user to type it.

Steps

  1. Path: python3 ~/.claude/hooks/session-handoff.py --path → the one handoff file for this cwd. Overwrite it; never write elsewhere (never into the repo).
  2. Gather receipts, not memory (one batch of read-only calls): git status --short, git branch --show-current, git log --oneline -5, branches ahead of origin — skip if not a git repo. Re-read any file you are about to cite.
  3. Write the brief — terse, ≤ 60 lines, only what the next session can't cheaply re-derive from the repo:
markdown
# Wrap — <cwd basename> — <YYYY-MM-DD HH:MM>
**Next:** <the single next action; use $ARGUMENTS if given>

## State
- Doing: <task in 1-2 lines>  · Branch: <b> · Uncommitted: <files or "clean">
- Done this session: <bullets, each with file:line or commit sha>

## Decisions (locked — don't relitigate)
- <decision> — because <why>

## Open
- <question / blocker / thing the user still has to decide>

## Gotchas
- <non-obvious things that cost time this session: wrong turns, corrected facts, tool quirks>

## Resume
- Files to read first: <paths>
- Commands: <exact commands to re-run / verify>

Rules: corrected facts go in Gotchas (e.g. "the staging DB is NOT a copy of prod"). No secrets, no key values. Don't paste code — point to file:line. Don't restate CLAUDE.md. 4. Surface stranded work: if this session created/modified files that are uncommitted, or a branch is ahead of origin, say so in one line — don't commit unless asked. 5. Hand over — reply with exactly:

  • the handoff path and line count,
  • Type /clear — the next session loads this automatically. (also loads on a fresh claude start in this directory within 24h),
  • if the next task is a taste/design call, suggest /model after the clear; otherwise stay on the default.

If the user wants to keep going in the same session instead, suggest /compact with the Next line as the focus.


Install the other half

The skill writes the brief. A SessionStart hook is what loads it back after /clear — without it you get a note that never returns. install.sh only copies this file, so fetch the three scripts yourself:

bash
mkdir -p ~/.claude/hooks
BASE=https://raw.githubusercontent.com/somnus0x/agt-skill-pack/main/skills/wrap/hooks
curl -sL $BASE/session-handoff.py -o ~/.claude/hooks/session-handoff.py
curl -sL $BASE/context-nudge.py   -o ~/.claude/hooks/context-nudge.py
curl -sL $BASE/statusline.sh      -o ~/.claude/hooks/statusline.sh
chmod +x ~/.claude/hooks/statusline.sh

Then merge into ~/.claude/settings.json:

json
{
  "env": { "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "400000" },
  "hooks": {
    "UserPromptSubmit": [{ "hooks": [{ "type": "command",
      "command": "python3 ~/.claude/hooks/context-nudge.py", "timeout": 5 }] }],
    "SessionStart": [{ "matcher": "clear|startup", "hooks": [{ "type": "command",
      "command": "python3 ~/.claude/hooks/session-handoff.py", "timeout": 5 }] }]
  },
  "statusLine": { "type": "command",
    "command": "~/.claude/hooks/statusline.sh", "refreshInterval": 30 }
}

What each piece does:

  • session-handoff.py — SessionStart hook. On /clear (or a fresh start in the same directory within 24h) it injects the brief as context, then renames it .consumed.md so it never loads twice. Handoffs live in ~/.claude/session-handoffs/, outside any repo.
  • context-nudge.py — UserPromptSubmit hook plus a HUD line. Warns when the cache has gone cold at ≥150K context (this turn rewrites ~$X) and once per 250K step.
  • statusline.sh — optional, and Mac-shaped. It chains the claude-hud plugin and then appends the nudge line, with a hardcoded Homebrew node path. If you don't use claude-hud, replace the first half with your own statusline command, or point statusLine straight at python3 ~/.claude/hooks/context-nudge.py --hud.

CLAUDE_CODE_AUTO_COMPACT_WINDOW is the part that works without you. It compacts before the main loop passes 400K, so the habit doesn't have to hold.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Wrap?

Write a compact session handoff so you can /clear and continue in a fresh, cheap context — the new session auto-loads it via a SessionStart hook. Use when the user says "wrap", "wrap up", "handoff and clear", "fresh session", "clear context", "reset context", or after the context-nudge HUD/hook warns (≥250K context or cold cache) at a natural boundary (post/feature/project done).

Firwat Wrap op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Wrap besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Wrap an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/somnus0x/agt-skill-pack/tree/main/skills/wrap an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Wrap benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Wrap benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Wrap domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Wrap gratis?

Jo. De Skill gëtt vum somnus0x ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇