Wrap logo

Wrap

Community
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).

Overview

Publishersomnus0x
Repositoryagt-skill-pack
Skill namewrap
Stars
74
Forks
17
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by somnus0x on GitHub. Read the source before you install it.

Installation

Install the Wrap AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/somnus0x/agt-skill-pack/tree/main/skills/wrap
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wrap in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Wrap on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Wrap is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Wrap AI skill do?

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).

Why use Wrap on TypingMind?

Because you install it once and use it with any model. Wrap is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Wrap in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/somnus0x/agt-skill-pack/tree/main/skills/wrap. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Wrap?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Wrap?

As many as you like. As long as a model supports skills, you can use Wrap with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Wrap AI skill free?

Yes. It is published on GitHub by somnus0x under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇