.codex/skills/ship/SKILL.md
Create PR with comprehensive documentation
npx skillsauth add harshanandak/forge .codex/skills/shipInstall 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.
Push code and create a pull request with full context and documentation links.
This command creates a PR after validation passes.
/ship
<HARD-GATE: /ship entry>
Do NOT create PR until:
1. /validate was run in this session with all four outputs shown (type, lint, tests, security)
2. All checks confirmed passing — not assumed, not "was passing earlier"
3. Beads issue is in_progress
4. git branch --show-current output is NOT main or master
</HARD-GATE>
Ensure all four validation checks completed successfully with fresh output in this session.
Even though /validate rebased onto the base branch, time may have passed since then (user reviewed design doc, took a break, etc.). This lightweight check catches staleness before pushing.
BASE=$(git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}')
if [ -z "$BASE" ] || [ "$BASE" = "(unknown)" ]; then BASE="master"; fi
git fetch origin "$BASE" || { echo "✗ Fetch failed — cannot verify freshness"; exit 1; }
BEHIND=$(git rev-list --count HEAD..origin/"$BASE")
BEHIND > 0: STOP. Print: "$BASE has advanced since /validate ($BEHIND new commits). Run /validate again to rebase and re-check."BEHIND = 0: Continue to push.|| { ...; exit 1; } guard catches this — STOP. Do NOT push without confirming freshness.This is NOT a full rebase — just a check. The rebase happens in /validate where the full test suite runs afterward.
Before creating the PR, check merge readiness:
# Run merge simulation against base branch
bash scripts/pr-coordinator.sh merge-sim "$(git branch --show-current)" 2>&1
# Show recommended merge order
bash scripts/pr-coordinator.sh merge-order 2>&1 || true
# Auto-label the PR after creation (called after gh pr create below)
# bash scripts/pr-coordinator.sh auto-label <issue-id>
If merge simulation finds conflicts:
n: exit cleanlyy: log override via bd comments add <id> "Ship override: creating PR despite merge conflicts", then continueAfter PR creation completes:
# Auto-label the newly created PR
bash scripts/pr-coordinator.sh auto-label <issue-id>
# Check for stale worktrees (informational)
bash scripts/pr-coordinator.sh stale-worktrees 2>&1 || true
bd update <id> --status done
bd sync
Use --force-with-lease because /validate may have rebased the branch, rewriting history. This is safe: it only forces the push if the remote branch hasn't been updated by someone else since the last fetch.
git push --force-with-lease -u origin <branch-name>
CRITICAL: Always use the project's own PR template. Never use a hardcoded body.
Step 5a: Locate the PR template
Check for a PR template in the project (in order of precedence):
# Check standard locations
PR_TEMPLATE=""
for path in .github/pull_request_template.md .github/PULL_REQUEST_TEMPLATE.md docs/pull_request_template.md pull_request_template.md; do
if [ -f "$path" ]; then
PR_TEMPLATE="$path"
break
fi
done
Step 5b: Read and populate the template
If a PR template exists:
<!-- ... -->) with real content- [x])beads-xxx with actual ID)docs/plans/YYYY-MM-DD-<slug>-design.mdIf no PR template exists, use this minimal fallback:
## Summary
[1-3 sentences: what this PR does and why]
## Changes
[Bulleted list of key changes]
## Testing
[How it was tested, test results]
## Beads
Closes beads-xxx
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Step 5c: Create the PR
gh pr create --title "<type>: <concise description>" --body "<populated-template-content>"
Rules for the PR body:
[x] for items that apply, [ ] for items that don'tbash scripts/beads-context.sh validate <id>
bash scripts/beads-context.sh stage-transition <id> ship review \
--summary "<PR created, checks pending>" \
--decisions "<template sections filled, beads linked>" \
--artifacts "<PR URL, branch name>" \
--next "<review focus areas>"
After PR is created, sync issue state to GitHub and verify 1:1 mapping:
# Sync issue state to GitHub
forge team sync 2>&1 || true
# Verify 1:1 mapping
forge team verify 2>&1 || true
✓ Validation: /validate passed (all 4 checks — fresh output confirmed)
✓ Freshness: Branch is up-to-date with master
✓ Beads: Marked done & synced (forge-xyz)
✓ Pushed: feat/stripe-billing
✓ PR created: https://github.com/.../pull/123
- PR body: Problem → Root Cause → Fix → Value (narrative format)
- Beads linked: forge-xyz
- Implementation details in collapsible section
⏸️ PR created, checks started (Greptile, SonarCloud, GitHub Actions)
Poll for up to 60 seconds. If checks are still pending, stop here.
Next: /review <pr-number> (when automated checks complete or new feedback appears)
Utility: /status → Understand current context before starting
Stage 1: /plan → Design intent → research → branch + worktree + task list
Stage 2: /dev → Implement each task with subagent-driven TDD
Stage 3: /validate → Type check, lint, tests, security — all fresh output
Stage 4: /ship → Push + create PR (you are here)
Stage 5: /review → Address GitHub Actions, Greptile, SonarCloud
Stage 6: /premerge → Update docs, hand off PR to user
Stage 7: /verify → Post-merge CI check on main
.github/pull_request_template.md (or equivalent) and populate it — never substitute your own formatdevelopment
Pull issues, metrics, quality gates, and analysis data from SonarCloud. ALWAYS use this skill when the user mentions SonarCloud, asks about code quality metrics, wants to check PR quality gates, or needs to review security vulnerabilities and technical debt from static analysis. Also trigger during /review workflow when SonarCloud issues need addressing. Trigger on phrases like "SonarCloud", "quality gate", "code quality metrics", "technical debt", "coverage report", "static analysis issues", "security vulnerabilities from scan".
tools
Produces comprehensive research reports that go far beyond what built-in web search can achieve. Sends research tasks to Parallel AI's pro/ultra processors which spend 3-25 minutes autonomously crawling, reading, and synthesizing dozens of sources — returning structured reports with citations. Built-in WebSearch can only run a few queries; this skill runs an entire research pipeline externally. No binary install — requires PARALLEL_API_KEY in .env.local. ALWAYS use this skill instead of doing multiple WebSearch calls when the user needs a comprehensive report, market analysis, competitive landscape, industry deep-dive, strategic recommendations, or multi-source synthesis. This is the RIGHT tool for any research task that would require more than 3-4 web searches to answer properly. Also trigger during /plan Phase 2 research and /research workflows.
testing
Test content
testing
Test content