wrap

wrap is a command for Claude Code from dwarvesf/dwarves-kit. It costs 105 tokens per session (24,795 once invoked), scanned A, original, MIT.

A session-closing command for software work. It updates work tracking, merges the operator's own completed Git branches, checks deployments, cleans up branches and worktrees, records activity, and creates a retrospective after a merge.

In plain words
What is it for?
Closing out repositories after shipping, merging completed pull requests, checking deployment status, tidying Git worktrees, and recording what happened.
Why use it?
It prevents finished work from being left in an unmerged, undeployed, or poorly recorded state at the end of a session.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions AGENTS.md.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is rid_out="$(bash lib/gate/gate-ledger.sh rid 2>&1)"; rid_rc=$?.

Part of the kit plugin — 14 skills, 39 commands, 31 agents, 9 hooks shipped together

Good fit Closing out repositories after shipping, merging completed pull requests, checking deployment status, tidying Git worktrees, and recording what happened.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit
agentmods
npx agentmods add commands/dwarvesf/dwarves-kit/wrap

Made for: Claude Code.

Or install kit, the plugin that ships this one along with the rest of its 14 skills, 39 commands, 31 agents, 9 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/dwarvesf/dwarves-kit/wrap/github.svg)](https://agentmods.dev/commands/dwarvesf/dwarves-kit/wrap)
Your own site
<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/wrap"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/wrap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wrap

Your own site · 80×15
<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/wrap"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/wrap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 24,795 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00105 $0.24795
Opus 5.5 $0.00042 $0.09918
Sonnet 5.5 $0.00021 $0.04959
Haiku 4.5 $0.00011 $0.02480

Measured today against content hash 4dee2b08cbe5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

wrap scanned grade A with 0 findings 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 today.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/wrap.md · 398 lines

How it starts

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

Self-intro (AGENTS.md "Self-intro" convention): open your first reply with exactly one banner line, [kit:wrap] Land the session after ship: board rows, merges, deploy check, tidy, activity line, retro., then proceed.

You are the session's landing step. The operator just shipped, or is ending the session, and nothing in the kit lands that session on its own: board rows stay unflipped, the operator's own green PRs stay unmerged, a merged-but-undeployed PR goes unnoticed, branches and worktrees pile up, and /kit:retro never runs. Your job is one pass over every repo the session touched, closing out every step below in order.

Scope and triggers

Also tidies branches (not just worktrees), writes the activity line, and calls /kit:retro when a shipped PR merged. Additional trigger phrases: 'wrap this up', 'let's wrap', 'pack this up for the day', 'wrap up, update items status, commit, merge PRs and clean up worktrees and stale branches, then pull the latest'. The distill half is ON by default (wrap.distill = true) and skips only when the operator's own kit.toml sets distill = false (a landing-only setup); the invocation carries the word distill (or the operator asks to distill) to turn it on for one run when the knob is off. The follow-through phase (step 10) is OFF by default (wrap.follow_through = "off") and runs when the invocation carries the word follow, including: 'wrap up and follow through', 'wrap and build the rest'.

When this runs

  • After /kit:ship completes, for the repo that just shipped.
  • At the end of a session, before the operator closes the terminal.
  • Whenever the operator asks to land, wrap up, or close out the session.
  • Never mid-build: a spec still mid-execute has nothing to land yet.

Prerequisites

  • Each named repo (or the current repo, when none is named) is a git repository. A non-repo argument prints a skip line and the rest proceed.
  • gh is optional. When it is absent or unauthenticated, every branch that is not a plain ancestor of the default branch verdicts unknown: LEAVE and bin/wrap merge refuses with exit 1; the command still runs the other seven steps and reports the degraded state, it never stops for this reason alone.

Read the full file on GitHub · 398 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. today Changed 4dee2b08cbe5
  2. 6d ago Changed · +1 lines 605d1507e9d8
  3. 9d ago Changed e3c1a1560332
  4. 15d ago Changed a4603556fb15
  5. 18d ago Changed · +1 lines eed18c54e1cc
  6. 19d ago Changed · +1 lines 05445c4a3725
  7. 20d ago Changed 60b566de4056
  8. 21d ago Changed · +11 lines 844e12fbd9fe
  9. 22d ago Changed · +1 lines 0ff5696404b6
  10. 23d ago First seen · 383 lines · 105 tokens per session scan A 29738beb0b52

Subscribe to this mod's changes

wrap is a command published in the GitHub repository dwarvesf/dwarves-kit (12 stars, last pushed today), licensed MIT. It adds 105 tokens to every session and 24,795 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.