implement-and-ship/SKILL.md
--- name: implement-and-ship description: End-to-end implementation workflow. Given a plan reference (Linear issue URL, GitHub issue URL, or local markdown file path), creates a feature branch auto-named from the plan ID/title, implements the plan, spawns a code-reviewer agent and applies only critical/blocking suggestions, then commits, pushes, and opens a PR using the project PR template. Trigger with phrases like "implement this plan", "implement and ship", "build from plan", or when given a
npx skillsauth add anahelenasilva/skills implement-and-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.
Reads a plan, creates a branch, implements, reviews, applies critical fixes, ships a PR.
Detect plan source from the argument provided:
Linear URL (linear.app in URL): use Linear MCP to fetch the issue. Extract: title, description, acceptance criteria, issue ID (e.g. ENG-123).
GitHub issue URL (github.com + /issues/ in URL): run gh issue view <number> --repo <owner/repo> --json title,body,number. Extract: title, body, number.
Local file path (starts with / or ./, ends with .md): use Read tool. Extract: first heading as title, full content as description.
Store: plan_title, plan_description, plan_id (issue ID or filename slug).
Derive branch name from plan source:
| Source | Format | Example |
|--------|--------|---------|
| Linear | feat/<issue-id>-<slug> | feat/ENG-123-add-auth-middleware |
| GitHub | feat/GH-<number>-<slug> | feat/GH-88-rate-limiting |
| Local file | feat/<slug-from-title> | feat/auth-refresh-token |
Slug rules: lowercase, hyphens only, max 40 chars, strip special characters.
git checkout -b <branch-name>
Confirm branch created before proceeding.
Run tests after each meaningful slice:
pnpm test
Stop and report if tests fail at any point — do not proceed to review with failing tests.
After implementation is complete and all tests pass, spawn a review agent:
Agent({
subagent_type: "agent-skills:code-reviewer",
description: "Review implementation for <branch-name>",
prompt: "Review all changes on branch <branch-name> vs main. List ONLY critical or blocking issues that must be fixed before merge. For each issue: file path, line number, problem description, suggested fix. Ignore style, readability, and optional refactors."
})
A suggestion is critical/blocking if it involves:
Skip: style suggestions, readability improvements, optional refactors, performance micro-optimizations (unless plan explicitly targets performance).
For each critical suggestion:
pnpm test to confirm fix doesn't break anythingIf a suggestion is ambiguous or would significantly expand scope, skip it and note it under "Known Issues / Follow-up" in the PR body.
Invoke the commit-commands:commit-push-pr skill.
After the PR is created, run:
gh pr view --json url -q .url
Output the URL to the user as the final message.
Before invoking, prepare the PR body using .github/PULL_REQUEST_TEMPLATE.md. Fill every section — no template placeholders left:
## Problem
<what was missing or broken — link to plan: Linear/GitHub URL or file path>
## Solution
<summary of what was implemented — key design decisions, tradeoffs>
## Type
- [x] <check the appropriate box based on plan content>
## Test Plan
- [x] Unit tests pass (`pnpm test`)
- [ ] e2e tests pass (`pnpm test:e2e`)
- Manual steps:
1. <step>
## DB Changes
- [x] <appropriate box — No schema changes / Migration included / Seed data updated>
## Checklist
- [x] No `console.log` left in
- [x] No hardcoded secrets or env values
- [x] Public API contracts unchanged (or breaking change flagged)
| Situation | Action |
|-----------|--------|
| Linear MCP not authenticated | Prompt: ! mcp__linear-server authenticate |
| Branch already exists | Ask user: checkout existing or create with suffix |
| Tests fail after implementation | Stop, report failures, do not proceed to review |
| Tests fail after applying a suggestion | Revert that suggestion, note in PR as follow-up |
| gh not authenticated | Prompt: ! gh auth login |
| Plan content is ambiguous | List assumptions explicitly, ask user to confirm before implementing |
User: implement this plan: https://linear.app/team/issue/ENG-42/add-rate-limiting
feat/ENG-42-add-rate-limitingUser: implement this plan: ./docs/specs/auth-refresh-token.md
feat/auth-refresh-tokenUser: implement this plan: https://github.com/org/repo/issues/88
gh issue view 88 --repo org/repo --json title,body,numberfeat/GH-88-slug-from-titletools
Merges a specified branch into the current branch using pnpm-based verification (typecheck + tests), resolves conflicts, and optionally closes a GitHub issue via gh CLI. Use when the user mentions "Sandcastle", asks to merge a branch and close an issue, or references the Sandcastle merge protocol.
tools
Autonomously implements open GitHub issues labeled "Sandcastle" one at a time using the RALPH workflow (explore, plan, RGR test-first, verify, commit, close). Use when the user says "implement next Sandcastle issue", "process open issues", "run RALPH", or asks to work through the Sandcastle backlog. Assumes pnpm, gh CLI, and git are configured in the current repo.
development
Reviews and refines code on a branch for the Sandcastle project. Use when asked to "review", "clean up", "refine", or "code review" on a branch. Call as `/sandcastle-code-review` to review the current branch, or `/sandcastle-code-review [branch-name]` to review a specific branch. Makes improvements in place — reads the diff, fixes issues, runs tests, commits. Do NOT use for general code questions or reviews outside the Sandcastle project.
development
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.