margaret-ship

margaret-ship is a command for Claude Code from sofiahernandes/margaret. It costs 20 tokens per session (614 once invoked), scanned A, original, MIT.

A per-change delivery command that runs repository checks, an over-engineering scan, a security review, and documentation updates in sequence. It stops when the first step fails.

In plain words
What is it for?
It is for taking the current branch from an implemented change through tests, code-quality review, security review, and documentation work.
Why use it?
It replaces a loose checklist with a defined order and prevents later review work from being based on a change that already failed an earlier check.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the margaret plugin — 8 skills, 4 commands shipped together

Good fit It is for taking the current branch from an implemented change through tests, code-quality review, security review, and documentation work.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sofiahernandes/margaret/margaret-ship
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.

Clone the repo
git clone --depth 1 https://github.com/sofiahernandes/margaret

Made for: Claude Code.

Or install margaret, the plugin that ships this one along with the rest of its 8 skills, 4 commands.

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 margaret-ship

README.md
[![agentmods](https://agentmods.dev/badge/commands/sofiahernandes/margaret/margaret-ship/github.svg)](https://agentmods.dev/commands/sofiahernandes/margaret/margaret-ship)
Your own site
<a href="https://agentmods.dev/commands/sofiahernandes/margaret/margaret-ship"><img src="https://agentmods.dev/badge/commands/sofiahernandes/margaret/margaret-ship/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 margaret-ship

Your own site · 80×15
<a href="https://agentmods.dev/commands/sofiahernandes/margaret/margaret-ship"><img src="https://agentmods.dev/badge/commands/sofiahernandes/margaret/margaret-ship.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 614 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.00020 $0.00614
Opus 5.5 $0.00008 $0.00246
Sonnet 5.5 $0.00004 $0.00123
Haiku 4.5 $0.00002 $0.00061

Measured 23d ago against content hash c51ced44b2c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

margaret-ship 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 23d 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.

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/margaret-ship.md · 58 lines

How it starts

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

Take the change on this branch from "it works on my machine" to "it's ready". Four steps, in order, stopping at the first failure.

BRANCH:

!`git rev-parse --abbrev-ref HEAD 2>/dev/null`

STATUS:

!`git status --short`

FILES CHANGED:

!`git diff --name-only origin/HEAD... 2>/dev/null || git diff --name-only HEAD`

The sequence

  1. margaret-preflight — the repo's own checks: typecheck, lint, tests.
  2. margaret-scan — over-engineering in the diff. Pass along any dead-code or duplication evidence preflight gathered.
  3. margaret-guard — exploitable security findings in the diff.
  4. margaret-docs — bring changelog, context files, and docs back in line.

Each step reads the same change set (git diff --merge-base origin/HEAD) and runs independently. Step 3 does not depend on step 2's conclusions.

Fail fast, then carry on

Stop at the first step that fails. Don't run the rest — findings about code that's about to change are findings you pay for twice.

Then:

  1. Report what failed, shortest form that identifies the cause.
  2. Offer the fix. Where the fix is a judgment call, lay out the options and ask — don't pick for the user.
  3. Once it's fixed, re-run the step that failed, then continue from there. Don't restart the sequence.

A step that reports findings without failing — a scan listing three cuts, a guard pass with a low-confidence note — is not a failure. Surface it and keep going.

Interactive by design

This command expects a person. It stops to ask, and that is the point.

Don't wire it to a git hook or a CI job. CI should run the deterministic half directly — npm run typecheck, npm run lint, npm test — which costs no tokens and needs no agent. Steps 2 through 4 need judgment and a person to answer; they belong here, before the push.

Scope

Branch against its upstream default, including uncommitted work. No upstream? Fall back to git diff HEAD and say so.

Nothing to do at a step — checks green, nothing to cut, nothing unsafe, docs current — say so in one line and move on. Four clean steps end with a one-line verdict, not a report.

Read the full file on GitHub · 58 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. 23d ago First seen · 58 lines · 20 tokens per session scan A c51ced44b2c0

Subscribe to this mod's changes

margaret-ship is a command published in the GitHub repository sofiahernandes/margaret (2 stars, last pushed 22d ago), licensed MIT. It adds 20 tokens to every session and 614 once invoked, about $0.0001 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-11-08.

Related

margaret-ship compared with commands from other repositories

margaret-ship next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
margaret-shipsofiahernandes/margaretCommand222d agoMITA20Claude Code
next-tasksmekai/taskplannerCommand26yesterdayMITA13Claude Code, Cursor
wa-guardrailsaws-samples/sample-well-architected-skills-and-steeringCommand2831mo agoMIT-0A0Claude Code
cost-optimization-reviewaws-samples/sample-well-architected-skills-and-steeringCommand2831mo agoMIT-0A0Claude Code
bump-pluginNeoLabHQ/context-engineering-kitCommand1.9k3mo agoGPL-3.0A7Claude Code
learnNisus74/humaniseCommand21mo agoMITA0Claude Code
fingerprintNisus74/humaniseCommand21mo agoMITA0Claude Code