ship

An automated delivery command that commits staged code, pushes the branch, and opens a pull request. A pull request is a proposal for reviewing and merging changes into a shared codebase.

In plain words
What is it for?
Detecting the project type, creating a conventional commit, pushing with upstream tracking, and writing a pull-request description with tests and breaking changes.
Why use it?
It groups the routine steps of sending finished work for review and applies consistent commit and pull-request conventions.

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/bravew/trove/ship
Clone the repo
git clone --depth 1 https://github.com/bravew/trove
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,108 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.00009 $0.01108
Opus 5 $0.00005 $0.00554
Sonnet 5 $0.00002 $0.00222
Haiku 4.5 $0.00001 $0.00111

Measured 2d ago against content hash dede86cc725b, 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 · 172 lines

How it starts

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

Ship: Commit → Push → PR

Context

  • Branch: !git branch --show-current
  • Status: !git status --short
  • Staged: !git diff --staged --stat

Optional PR title override: $ARGUMENTS

Steps

  1. Commit — Analyze staged changes and create atomic commit with conventional message
  2. Push — Push to remote with upstream tracking
  3. PR — Create PR with comprehensive description

Commit message follows conventional commits format. NEVER mention Claude Code or Anthropic.

PR Description Best Practices:

  • Clear, concise summary of changes
  • Explain motivation and context
  • List key technical changes
  • Include test plan with project-appropriate validation commands
  • Note any breaking changes or migrations needed
  • Reference related issues if applicable

Run

Step 1: Detect Project Stack

Detect the project type to determine the correct validation and scope conventions:

# Detect project type from config files
if [ -f "Package.swift" ]; then
  echo "STACK=swift"
elif [ -f "pyproject.toml" ] || [ -f "setup.py" ]; then
  echo "STACK=python"
elif [ -f "next.config.js" ] || [ -f "next.config.ts" ] || [ -f "next.config.mjs" ]; then
  echo "STACK=nextjs"
elif [ -f "package.json" ]; then
  echo "STACK=node"
fi

Step 2: Analyze Staged Changes

git branch --show-current
git status
git diff --staged --stat
git diff --staged

Step 3: Create Commit

Examine staged changes and determine type, scope, and description:

  • Type: feat, fix, refactor, perf, test, docs, style, chore
  • Scope (optional): derive from the primary area affected
  • Description: concise summary of what changed and why
git commit -m "<type>(<scope>): <description>"

Step 4: Push to Remote

git push -u origin HEAD

Step 5: Detect Base Branch

# Fetch known integration branches
git fetch origin --no-tags 2>/dev/null

BASE=staging
best_distance=""
for candidate in staging production main master develop; do
  mb=$(git merge-base HEAD "origin/$candidate" 2>/dev/null) || continue
  distance=$(git rev-list --count "$mb"..HEAD 2>/dev/null) || continue
  if [[ -z "$best_distance" ]] || [[ "$distance" -lt "$best_distance" ]]; then
    best_distance=$distance
    BASE=$candidate
  fi
done
echo "Detected base: $BASE"
git log $BASE..HEAD --oneline
git diff $BASE...HEAD --stat

Read the full file on GitHub · 172 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. 2d ago First seen · 172 lines · 9 tokens per session scan A dede86cc725b

Subscribe to this mod's changes

ship is a command published in the GitHub repository bravew/trove (10 stars, last pushed 3d ago), licensed MIT. It adds 9 tokens to every session and 1,108 once invoked, about $0.0000 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.