ship

A guarded Git command for committing and pushing the current work. It checks the repository, changed files, secrets, and branch before sending changes to the remote repository.

In plain words
What is it for?
Use it when finished with a change and want to check, commit, and push it while following Git identity and branch-safety rules.
Why use it?
It reduces the risk of committing passwords or API keys, pushing from the wrong branch, or creating an empty or unsafe commit.

Command

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/jansenanalytics/claudex/ship
Clone the repo
git clone --depth 1 https://github.com/JansenAnalytics/claudex
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00017 $0.00684
Opus 5 $0.00009 $0.00342
Sonnet 5 $0.00003 $0.00137
Haiku 4.5 $0.00002 $0.00068

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

Security

Grade A, and why

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 2d 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/ship.md · 26 lines

What it actually says

Commit and push the current work safely. Honor the user's git identity (<your-git-email>, GitHub user <your-github-username>). Use ~/.local/bin/gh for any GitHub auth/remote ops. Work through the steps in order; STOP early if a gate fails. Optional commit message: $ARGUMENTS.

  1. Repo check — run git rev-parse --show-toplevel. If it errors (not a git repo), report "Not a git repo — nothing to ship" and STOP.
  2. Change check — run git status --porcelain and git diff --stat HEAD. If both are empty (clean tree, nothing staged/unstaged), report "Working tree clean — nothing to commit" and STOP.
  3. Secret safety — inspect the changed file list. ABORT (do not stage/commit) and warn if any of these are about to be committed:
    • files matching .env, *.key, *.pem, *.secret, id_rsa*, *credentials*
    • git diff HEAD content matching ANTHROPIC_API_KEY, OPENAI_API_KEY, sk-, ghp_, github_pat_, or other token-like strings List the offending file(s)/line(s) and STOP. Tell the user to gitignore or unstage them first.
  4. Branch guard — run git rev-parse --abbrev-ref HEAD. If on main or master: do NOT commit straight to it. Derive a short kebab slug from the change and create + switch to feat/<slug> via git checkout -b feat/<slug> BEFORE committing. (Exception: a tiny docs-only fix may go to main — but ask the user first; don't assume.) If already on a feature branch, stay on it.
  5. Commitgit add -A, then commit. Use $ARGUMENTS verbatim as the subject if provided; otherwise generate a conventional-commit subject (feat: / fix: / docs: / chore:) inferred from the diff. End every commit message with a blank line and the trailer: Co-Authored-By: Claude Opus 4.8 <[email protected]> Set author/committer to the user's identity if not already configured.
  6. Pushgit push -u origin HEAD. If no remote exists or push fails on auth, report the exact error and STOP (don't silently retry).
  7. Report — one Telegram-friendly message, bullets only:
    • Branch: <name>
    • Commit: <short-sha> — subject line
    • Files: count + key paths
    • Push: ✅ pushed / ❌ failed (with reason) If the branch warrants a PR (feature branch, non-main target), OFFER: "Want me to open a PR? gh pr create ..." — do NOT auto-open one. Don't pad. Don't congratulate.
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. 2d ago First seen · 26 lines · 17 tokens per session scan A fe2a84293cf2

Subscribe to this mod's changes

ship is a command published in the GitHub repository JansenAnalytics/claudex (5 stars, last pushed 2mo ago), licensed MIT. It adds 17 tokens to every session and 684 once invoked, about $0.0001 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-08-31.