ship-init
Skill0 starsChanged 37 days agoMITView on GitHub
Draft and write the repo's .claude/ship-profile.json, which /cdr:ship-epic and cdr:pr-review-loop read. Scans the repo for its GitHub name, base branch, gate commands, PR workflows and worktree setup, then asks the user for what a scan can't settle. Trigger: /cdr:ship-init, "set up ship-epic for this repo".
- Reads credentials
In this repository2 other files it gives its agents.
- pr-review-loopSkill
- pr-reviewSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Write the file, run jq . <file> to prove it parses, and check every required field is set: repo, base, context, docs, setup, rules, …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ship profile init
Writes <main checkout>/.claude/ship-profile.json. The plugin README lists every field; ${CLAUDE_PLUGIN_ROOT}/README.md.
The main checkout is the dirname of git rev-parse --path-format=absolute --git-common-dir.
A profile already there: show it, ask what to change, and edit only that.
Scan
Fill every field you can from the repo, and note where each value came from:
repo:gh repo view --json nameWithOwner -q .nameWithOwner.base: the branch most recent PRs merged into (gh pr list --state merged -L 30 --json baseRefName); the default branch when there are none.gates: from the build tool:package.jsonscripts (and the package manager its lockfile implies), a Makefile,Cargo.toml,pyproject.toml,go.mod. Write each as a command with-C <wt>orcd <wt> &&so it runs in a worktree.targetedis how to run named test files (<files>). No smoke or e2e suite:smokeis the same astestandsmokeWhenisnever.review.workflow,review.checks: the workflows in.github/workflows/that run onpull_requestintobase. The AI review is the one that posts a review comment; the checks are the one that runs the gates. Theirruns-ongivesreview.runners(the self-hosted runnersforself-hosted). With cdr'spr-reviewskill as the review, one workflow may run both: then both fields name it.review.focus(optional, read by cdr'spr-review): one or two sentences on what the product is and where a defect costs most (payments, auth, data migrations), from the README.setup: what a fresh worktree lacks: the dependency install (frozen lockfile), submodules, and gitignored tools or env files that tests need (copy from<root>). End with a cheap preflight if the repo has one.context:CONTEXT.md,docs/adr/, anAGENTS.mdorCLAUDE.md, whichever exist.docs: the docs files a change usually touches (READMEs,AGENTS.md,.env.example,docs/). Leave out generated files; they go incontract.contract(optional): generated contract artifacts, such as an OpenAPI document or captured examples, and the script that regenerates them (anopenapi,snapshotorgeneratescript inpackage.json).filesare the generated paths,refreshthe command,whenthe changes that need it,ruleswhere examples come from.rules: toolchain quirks a fresh agent would trip on (a monorepo-Cconvention, long commands that need the 600000 ms Bash timeout, a submodule setting).followUpLabel(optional): the label for issues ship-epic files from pre-existing or out-of-scope QA findings, so agents pick them up. Fromgh label list --json name: a "ready for agent" style label (ready-for-agent, a triage doc in the repo naming one) when it exists; leave it out when none does.blockingRules: the feedback memories in~/.claude/projects/<root with non-alphanumerics as ->/memory/that name a must-fix review finding, one short phrase each.
Ask
Show the draft as JSON, then ask the user, with AskUserQuestion, only what the scan couldn't settle:
- Which candidate
blockingRulesto keep, and any to add. - Known flaky check failures (
review.flakes): exact error text, so a triager can match them. smokeWhen, if there is a smoke suite: which changes need it.contract.rules, if there is a contract: how examples are produced (recorded, captured, written by hand).followUpLabel, if the repo has several candidate labels and none is clearly the agent-ready one.- Which workflow is which, if more than one runs on PRs.
Write
Write the file, run jq . <file> to prove it parses, and check every required field is set: repo, base,
context, docs, setup, rules, blockingRules, gates.{typecheck,test,targeted,build,smoke,smokeWhen},
review.{workflow,checks,runners,focus,flakes}. Then tell the user to commit it, and to enable the plugin for the repo
(claude plugin install cdr@cdr-kit --scope project) if it isn't already.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

