wrap

wrap is a command for coding agents from gf-labs/claude-toolbox. It costs 46 tokens per session (2,418 once invoked), scanned A, original, MIT.

A command for closing a coding session by collecting session notes, checking the repository, cleaning up plans, reviewing the backlog, and marking the session complete.

In plain words
What is it for?
Use it when ending a session, such as after saying “wrap,” “I’m done,” or “close out.”
Why use it?
It gathers the final project and session state in one wrap-up process so unfinished work or repository changes are not overlooked.

Command

Part of the tools plugin — 2 skills, 13 commands, 5 agents, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/gf-labs/claude-toolbox/wrap
Clone the repo
git clone --depth 1 https://github.com/gf-labs/claude-toolbox

Or install tools, the plugin that ships this one along with the rest of its 2 skills, 13 commands, 5 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wrap

README.md
[![agentmods](https://agentmods.dev/badge/commands/gf-labs/claude-toolbox/wrap.svg)](https://agentmods.dev/commands/gf-labs/claude-toolbox/wrap)
Your own site
<a href="https://agentmods.dev/commands/gf-labs/claude-toolbox/wrap"><img src="https://agentmods.dev/badge/commands/gf-labs/claude-toolbox/wrap.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,418 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00046 $0.02418
Opus 5 $0.00023 $0.01209
Sonnet 5 $0.00009 $0.00484
Haiku 4.5 $0.00005 $0.00242

Measured 4d ago against content hash 2c28cfc73c3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wrap scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

git_root = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'], stderr=subprocess.DEVNULL, text=True).strip()
commands/wrap.md · 254 lines

How it starts

The opening of the file, as written. The whole thing — 254 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Collect context

Run each command below now before proceeding. Store results mentally.

Scope:

python3 ${CLAUDE_TOOLBOX_ROOT}/scripts/_scope.py

Session activity:

python3 ${CLAUDE_TOOLBOX_ROOT}/scripts/collect-summarize.py

Session log status:

python3 ${CLAUDE_TOOLBOX_ROOT}/scripts/collect-session-log.py

session-log.md (full content, for skip check):

python3 -c "
import os, sys
sys.path.insert(0, os.environ.get('CLAUDE_TOOLBOX_ROOT', '') + '/scripts')
from _scope import get_scope, project_key
from pathlib import Path
mode, data, cwd = get_scope()
projects_dir = Path.home() / '.claude' / 'projects'
if mode == 'single':
    key = data
else:
    import subprocess
    try:
        git_root = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'], stderr=subprocess.DEVNULL, text=True).strip()
        key = project_key(git_root, projects_dir)
    except Exception:
        print('SESSION_LOG: unavailable')
        exit(0)
log = projects_dir / key / 'memory' / 'session-log.md'
print(f'PATH: {log}')
print(log.read_text() if log.exists() else 'MISSING — will be created on first save')
"

Git state, diff, unpushed commits, backlog, date:

echo "GIT_DIFF_STAT:" && (git diff HEAD --stat 2>/dev/null || echo "none")
echo "GIT_STATE:" && (git status --short 2>/dev/null || echo "clean")
echo "UNPUSHED:" && (git log @{u}.. --oneline 2>/dev/null || echo "none (or no remote)")
TW_PROJECT=$(python3 ${CLAUDE_TOOLBOX_ROOT}/scripts/_slug.py)
echo "IN_PROGRESS:" && (task rc.verbose=nothing project:${TW_PROJECT} +ACTIVE list 2>/dev/null || echo "(none)")
echo "UP_NEXT:" && (task rc.verbose=nothing project:${TW_PROJECT} limit:3 list 2>/dev/null || echo "(none)")
echo "DATE:" && date +%Y-%m-%d

Plans:

python3 ${CLAUDE_TOOLBOX_ROOT}/scripts/collect-plans.py

Project MEMORY.md:

python3 -c "
import os, sys
sys.path.insert(0, os.environ.get('CLAUDE_TOOLBOX_ROOT', '') + '/scripts')
from _scope import get_scope, project_key
mode, data, cwd = get_scope()
from pathlib import Path
projects_dir = Path.home() / '.claude' / 'projects'
if mode == 'single':
    mem = projects_dir / data / 'memory' / 'MEMORY.md'
    print(f'PATH: {mem}')
    print(mem.read_text() if mem.exists() else 'MISSING')
elif mode == 'parent':
    print('PARENT MODE — see scope output for child projects')
else:
    import subprocess
    git_root = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'], stderr=subprocess.DEVNULL, text=True).strip()
    key = project_key(git_root, projects_dir)
    mem = projects_dir / key / 'memory' / 'MEMORY.md'
    print(f'PATH: {mem}')
    print(mem.read_text() if mem.exists() else 'MISSING')
"

Read the full file on GitHub · 254 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 254 lines · 46 tokens per session scan A 2c28cfc73c3e

Subscribe to this mod's changes

wrap is a command published in the GitHub repository gf-labs/claude-toolbox (2 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 2,418 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.