src/claude/skills/pr-submit/SKILL.md
Agent-side signal to captain that your branch is ready for PR landing. Runs preconditions (clean tree, pushed, matching QGR receipt) then dispatches captain with a structured payload. Captain's /pr-captain-land picks it up. Replaces the distributed "agent creates PR" model with a captain-owned PR lifecycle (the-agency#296).
npx skillsauth add the-agency-ai/the-agency pr-submitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Agent-side handoff to captain: "my branch is ready for PR landing." Captain picks up the dispatch and runs /pr-captain-land to own the remaining PR lifecycle (version bump, PR creation, CI wait, merge, release, fleet-notify).
Per the-agency#296: the distributed "agent creates PR, captain merges" model causes four failure modes that the captain-owned lifecycle eliminates:
agency_version simultaneously against the same origin/master baseline; one loses.Solution: captain owns the PR lifecycle end-to-end. Agent owns substance + QG. /pr-submit is the single handoff point — a structured dispatch with branch, SHA, diff-hash, receipt path, and scope summary.
Before running, Read the files listed in required_reading: frontmatter.
REFERENCE-CODE-REVIEW-LIFECYCLE.md — where this skill sits in the end-to-end PR flow.REFERENCE-RECEIPT-INFRASTRUCTURE.md — the five-hash receipt chain this skill verifies against.REFERENCE-ISCP-PROTOCOL.md — the dispatch protocol the handoff uses.The dispatch payload schema itself is in this skill's reference.md.
/pr-submit --scope "one-line PR summary"
/pr-submit --scope "..." --priority high
--scope: required. One-line summary of what this PR delivers (becomes part of the dispatch subject + body).--priority normal|high: optional. Defaults to normal. high raises dispatch visibility in captain's queue.The script enforces all of these before dispatching; any failure exits non-zero with a clear error and no dispatch is sent:
.claude/worktrees/<name>/), not the main checkout.master / main / HEAD (not detached).git status --porcelain empty.origin/<branch> equals local HEAD.agency/workstreams/**/qgr/*qgr-pr-prep-*-{hash}.md where {hash} matches the current diff-hash against origin/master.If preconditions 3 or 4 fail, fix them (commit/push via /git-safe-commit or /sync) and retry. If precondition 5 fails, you need to re-run /pr-prep to sign a fresh receipt.
scripts/pr-submit computes all preconditions. If any fail, exit 1 with a one-line reason. No partial state.
./agency/tools/agent-identity (principal + agent + repo).BRANCH = git rev-parse --abbrev-ref HEAD.SHA = git rev-parse HEAD.git rev-parse "origin/$BRANCH" equals SHA../agency/tools/diff-hash --base origin/master --json
Capture the full SHA-256 and the 7-char short form. The 7-char short form is what matches the receipt filename suffix.
Glob for agency/workstreams/**/qgr/*qgr-pr-prep-*-{hash-short}.md. Exactly one receipt should match. If zero, exit 1 — agent must re-run /pr-prep. If multiple, pick the most recent and warn.
Follow the schema in reference.md (protocol v1.0). Envelope:
to: <org>/{principal}/captain
type: pr-submit
priority: normal | high
subject: "Ready for PR landing: {branch} — {scope}"
Body is the markdown template in reference.md — branch, SHA, diff-hash, receipt path, scope, captain-action list.
./agency/tools/dispatch create \
--to <org>/{principal}/captain \
--type pr-submit \
--subject "<subject>" \
--body "<body>"
Capture the dispatch ID. Report to the agent: "Submitted to captain as dispatch <id>. Captain will run /pr-captain-land <branch>; you'll receive a master-updated dispatch when the PR lands."
Agent does NOT:
agency_versionAgent stands by to respond to review comments via /pr-respond if any come. On merge, a master-updated dispatch arrives with PR URL + release tag.
origin/<branch> diverge. Push or pull first (./agency/tools/git-push <branch> or git-safe fetch + merge)./pr-prep to regenerate.--priority high or flag the captain directly./pr-captain-land. Agent must not run gh pr create or /pr-create after this.agency_version. Captain is the single writer./pr-prep left it.active (v2, agency-skill-version 2 from birth — this skill is the Phase 1 pilot for the-agency#296 captain-owned PR lifecycle). Ready for fleet-wide dogfood on designex / patient / of-mobile next PRs.
/pr-captain-land — captain-side companion; consumes this skill's dispatch/pr-prep — the QG-before-PR-create that produces the receipt this skill verifies/pr-respond — agent-side skill for handling captain review comments (planned)agency/tools/dispatch — the ISCP tool this skill wraps for emissionagency/tools/diff-hash — receipt-matching hashagency/tools/agent-identity — principal/agent/repo resolutionreference.md — dispatch payload schema (protocol v1.0)examples.md — happy-path + failure-mode examplesOFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!
business
Sync worktree with master — merge, copy settings, run sandbox-sync, report changes
tools
List all git worktrees with status info (branch, clean/dirty, deps)
tools
Remove a git worktree and optionally delete its branch
development
Create a new git worktree with dedicated branch and bootstrapped dev environment