skills/team-pr/SKILL.md
Open the pull request after verification passes. Updates the changelog, optionally surfaces the tracking ticket, and closes out the topic. Trigger on "open the PR", "ship it", or "/team-pr".
npx skillsauth add bostonaholic/team team-prInstall 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.
Run the PR phase. Two modes:
$ARGUMENTS/task.md and
$ARGUMENTS/design.md exist.$ARGUMENTS is the artifact directory: docs/plans/<id>/. If empty, the
discovery block below resolves it for the resume path (discovery only
augments resume — the standalone path is unchanged).
The PR description is grounded in $ARGUMENTS/design.md. The ticket
identifier (if any) is read from $ARGUMENTS/task.md's frontmatter.
Resolve the artifact directory by running this self-contained block (one bash call — agent threads reset cwd between calls):
# Three-tier artifact-directory discovery (archetype A).
# ID_RE + PHASE_FILES canonical from hooks/session-start-recover.mjs.
# PHASE_FILES recency mirrors findActiveTopic() in session-start-recover.mjs.
# NOTE: this block is duplicated across 8 skills by design (see docs/architecture.md); future: shared discover-topic.sh.
ID_RE='^([A-Za-z][A-Za-z0-9_]*-[0-9]+|[0-9]{4}-[0-9]{2}-[0-9]{2})-[a-z0-9][a-z0-9-]*$'
PHASE_FILES="task questions research design structure plan"
# design.md is a lenient discovery proxy: the canonical PR-phase predecessor is
# "aggregate gate passed" (no single artifact), so we key on design.md to mean
# "topic progressed far enough to have design context". team-pr also runs standalone.
PRED="design.md" # predecessor artifact this skill consumes
# Tier 1 — explicit: $ARGUMENTS names an existing dir → use verbatim.
if [ -n "$ARGUMENTS" ] && [ -d "$ARGUMENTS" ]; then
echo "$ARGUMENTS"; exit 0
fi
# Tier 2 — discover: newest ID_RE dir under docs/plans/ that holds PRED.
best=""; best_mtime=-1
# Assumes cwd is the repo/worktree root (where docs/plans/ lives).
for dir in docs/plans/*/; do
name="$(basename "$dir")"
printf '%s' "$name" | grep -qE "$ID_RE" || continue # ID_RE filter
[ -f "$dir$PRED" ] || continue # predecessor filter
m=-1
for p in $PHASE_FILES; do
f="$dir$p.md"
[ -f "$f" ] || continue # skip racing/absent
s="$(stat -f %m "$f" 2>/dev/null || stat -c %Y "$f" 2>/dev/null)" || continue
[ "${s:-0}" -gt "$m" ] && m="$s" # max-mtime over PHASE_FILES
done
[ "$m" -gt "$best_mtime" ] && { best_mtime="$m"; best="$dir"; }
done
[ -n "$best" ] && { echo "$best"; exit 0; }
# Tier 3 — none found: print nothing → fall to AskUserQuestion (prose below).
$ARGUMENTS for the resume path
(tier 1 explicit arg, or tier 2 discovery of a directory holding design.md).
When the path came from tier 2 (no explicit arg), announce the resolved
directory to the user before proceeding, so an auto-picked topic is never
silent.## Execution, which detects the base branch
(archetype B) and stops with "Nothing to ship." only when there is nothing
ahead of the base.Follow
skills/progress-tracking/SKILL.md: when this procedure has two or more steps, seed one todo item per step before starting and mark each complete as you go.
$ARGUMENTS/repos.md if present. When present, you are in
multi-repo mode — read the ## Worktrees section to get each
repo's worktree path.repos.md), check whether
it has commits ahead of its base branch. Skip any with no commits.git -C <worktree-path> symbolic-ref refs/remotes/origin/HEAD \
| sed 's@^refs/remotes/origin/@@'
Falls back to main per repo.$ARGUMENTS/task.md exists: read ticketId from
its frontmatter. Read $ARGUMENTS/design.md for the "why" behind the
changes.CHANGELOG.md with the
entries belonging to that repo's commits.gh pr create --draft). Any
uncommitted final changes (typically CHANGELOG.md) land as a single
trailing ship commit before the push. In multi-repo mode this opens
one draft PR per repo with commits and cross-links them.ticketId is non-null, surface it in the
completion report so the user can close it in their tracking system.
The orchestrator does not close tickets automatically.gh pr edit --body) so the
Summary, Changes, and How-to-Verify sections still match what the
branch actually does. Never leave a stale description after a push. In
multi-repo mode, do this for each repo's PR whose branch you pushed.git -C <repo-path> worktree remove) remove
the worktree; in multi-repo mode, run cleanup for every involved repo.
After removing the worktree, bring the repo's local default branch up
to date with the merge: `git -C <repo-root> pull --rebase origin## Summary
[2-3 bullets drawn from $ARGUMENTS/design.md — what and why]
## Design Decisions
[Key decisions reviewers should understand]
## Changes
[Brief description, organized by component]
## How to Verify
- [ ] [Automated verification command]
- [ ] [Manual verification step]
## References
- Design: $ARGUMENTS/design.md
- Plan: $ARGUMENTS/plan.md
In multi-repo mode, append a ## Companion PRs section to each PR
listing the URLs of every other PR opened for the same topic, so a
reviewer can navigate the full change set:
## Companion PRs
This change spans multiple repos. The companion PRs are:
- [<repo-name>] <pr-url>
- [<repo-name>] <pr-url>
Open the PRs first to obtain URLs, then edit each PR's body to add the section once all URLs are known.
Before creating the ship commit, update CHANGELOG.md per
skills/changelog/SKILL.md:
git log.feat:, fix:, perf:, security:,
and any BREAKING CHANGE: footer. Exclude chore:, test:,
refactor:, ci:, docs:.[Unreleased] in CHANGELOG.md. Create the file
with the Keep a Changelog header if it does not exist.CHANGELOG.md change in the ship commit.If there are no user-facing commits, skip the changelog update and note this in the completion report.
When creating the commit, apply skills/git-commit/SKILL.md:
feat:, fix:, refactor:, etc.The implementer already committed each slice atomically during Implement. The PR may contain multiple commits (one per slice). The ship commit is only used if there are uncommitted final changes (e.g., changelog).
Report the outcome (draft PR URL and commit hash).
data-ai
Todo-first progress convention for multi-step procedures — loaded by every multi-step agent to track its own steps without drift
testing
Adversarially review a technical design document with fresh context before the human gate. Dispatches the built-in `general-purpose` subagent (clean context, no shared history with the design-author) against `docs/plans/<id>/design.md` and presents its verdict — APPROVE, REQUEST CHANGES, or COMMENT. Optional, not part of the QRSPI pipeline. Trigger on "review the design doc", "audit design.md", "is this design ready", or `/eng-design-doc-review`.
development
Generator-evaluator separation and review methodology — loaded by review agents to enforce fresh-context review discipline, Conventional Comments format, and gate verdicts
data-ai
Prepare one or more isolated git worktrees — one per repository the topic touches. Router action — no agent. Trigger on "set up the worktree", "isolate this work", or "/team-worktree".