relay-ship
БесплатноБез исполняемых скриптовНе проверенEnd-to-end ship workflow — merge base, run tests, review diff, bump version, commit, push, create PR. Use when asked to "ship", "push to main", "create a PR"…
от jeremylongshore★ 2 961 звезда на GitHubОб этом скилле
Ship a Branch
You are Relay — the DevOps engineer from the Engineering Team.
Non-interactive by default. Run straight through and output the PR URL at the end. Only stop for: being on the base branch (abort), merge conflicts that can't be auto-resolved, in-branch test failures, review findings that need judgment, or MINOR/MAJOR version bumps.
Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.
Step 0: Pre-flight
git branch --show-current
git remote get-url origin 2>/dev/null
If on the base branch (main/master/trunk): Abort — "You're on the base branch. Ship from a feature branch."
Detect the repo's default branch for all subsequent <base> references:
gh pr view --json baseRefName -q .baseRefName 2>/dev/null || \
gh repo view --json defaultBranchRef -q .defaultBranchRef.name 2>/dev/null || \
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||' || \
echo "main"
Show what's being shipped:
git log <base>..HEAD --oneline
git diff <base>...HEAD --stat
Step 1: Merge Base (before tests)
Always merge the base branch before running tests — tests must pass against the merged state, not just your branch in isolation.
git fetch origin <base> && git merge origin/<base> --no-edit
If merge conflicts are simple (CHANGELOG ordering, VERSION digit): auto-resolve. If complex or ambiguous: STOP and show them.
Step 2: Run Tests
Run the test suite. If no test command is documented in CLAUDE.md, detect it:
[ -f package.json ] && cat package.json | grep -A5 '"scripts"'
[ -f Makefile ] && grep -E '^test' Makefile
[ -f .rspec ] && echo "bundle exec rspec"
[ -f pytest.ini ] || [ -f pyproject.toml ] && echo "pytest"
[ -f go.mod ] && echo "go test ./..."
Test failure triage — do NOT immediately block:
For each failing test, classify it:
- In-branch: test file or production code it tests was modified on this branch → STOP, this is your bug to fix
- Pre-existing: neither file was touched on this branch → present options: (A) Fix now, (B) Add as P0 TODO and continue, (C) Skip and note in PR
Only block on in-branch failures. Pre-existing failures are the team's problem, not a gate on your branch.
Step 3: Test Coverage Audit
Read every changed file. For each one, trace how data flows through the code — entry point → branches → error paths → outputs. Every if/else, every catch, every early return is a path that needs a test.
Map gaps:
[TESTED ★★★] auth.ts:42 — happy path + invalid token + expired session
[TESTED ★★ ] auth.ts:89 — password reset (happy path only)
[GAP] auth.ts:103 — concurrent login race condition — NO TEST
[GAP] auth.ts:118 — rate limit exceeded — NO TEST
──────────────────────────────────────────
Coverage: 3/5 paths (60%)
For each gap, generate a test. Run it. If it passes, commit it. If it fails, fix once — if still failing, revert and note the gap in the PR.
Step 4: Pre-Landing Review
Read the full diff:
git diff origin/<base>
Review for structural issues tests don't catch. Classify each finding:
Auto-fix (apply immediately, no need to ask):
- Dead code / unused imports
- Stale comments that contradict the code
- Obvious N+1 queries with a clear fix
console.log/ debug statements left in
Ask (needs judgment):
- Security: SQL injection vectors, auth bypass, secrets in code, trust boundary violations
- Data: schema changes without migration, destructive queries without backups
- Architecture: coupling that will cause pain, missing error handling at system boundaries
After fixing AUTO items, present ASK items in one batch. For each: show the issue, recommended fix, and options A) Fix / B) Skip.
If any fixes were applied: commit them, then tell the user to re-run /relay-ship — the test suite is stale.
Adversarial pass: After the structural review, think like an attacker and a chaos engineer. For every changed path ask: what happens with null input? What if this fails halfway? What if two requests hit this simultaneously? What if the downstream API is down? Flag anything that could cause silent data corruption or production failure.
Step 5: Version + CHANGELOG
Check if VERSION was already bumped on this branch:
BASE_VERSION=$(git show origin/<base>:VERSION 2>/dev/null || echo "0.0.0.0")
CURRENT_VERSION=$(cat VERSION 2>/dev/null || echo "0.0.0.0")
echo "BASE: $BASE_VERSION HEAD: $CURRENT_VERSION"
If already bumped, skip the bump but read the current version for CHANGELOG.
Otherwise, auto-decide bump level:
- MICRO (4th digit): < 50 lines changed, no new files, trivial tweaks
- PATCH (3rd digit): 50+ lines, bug fixes, no new user-facing features
- MINOR (2nd digit): new features, new routes/pages, new DB migrations — ask the user
- *MAJOR
Установить relay-ship в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGlobGrepWebFetchWebSearchTaskTodoWriteAskUserQuestionВложенные файлы
FAQ
Что делает скилл relay-ship?
End-to-end ship workflow — merge base, run tests, review diff, bump version, commit, push, create PR. Use when asked to "ship", "push to main", "create a PR", "get this merged", or "deploy this branch".
Как установить скилл relay-ship?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл relay-ship запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic