wrap

wrap is a command for Claude Code from dwarvesf/dwarves-kit. It costs 147 tokens per session (3,529 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 AGENTS.md.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is rid=$(bash lib/gate/gate-ledger.sh rid).

Part of the kit plugin — 11 skills, 39 commands, 31 agents, 10 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 11 skills, 39 commands, 31 agents, 10 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 147 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,529 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.00147 $0.03529
Opus 5 $0.00073 $0.01765
Sonnet 5 $0.00029 $0.00706
Haiku 4.5 $0.00015 $0.00353

Measured today against content hash a6240925c789, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 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.

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.

Process

Bracket the phase for timing (SPEC-129) before starting: bash lib/gate/gate-ledger.sh outcome <rid> wrap start.

Run the steps below once per repo the session touched (the current repo when the operator names none). Positional repo arguments; wrap never discovers touched repos on its own (Out of Scope).

Step -1: the before seam

An operator can put one skill in front of this command. Read the key first:

. lib/config/kit-config.sh && kit_config_get_root wrap.before ""

An empty value means no skill runs, which is the default; go straight to step 0. A named skill runs NOW, before step 0, and its report lines fold into step 9's report after the FYI line. The key resolves with kit_config_get_root, so it comes from the operator kit.toml or the kit-root kit.toml and never from a project .kit.toml: it names code this command runs, and a project toml rides inside an untrusted PR.

Read the full file on GitHub · 154 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 First seen · 154 lines · 147 tokens per session scan A a6240925c789

Subscribe to this mod's changes

wrap is a command published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed yesterday), licensed MIT. It adds 147 tokens to every session and 3,529 once invoked, about $0.0007 per session on Opus 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.