Back/Engineering/GitHub Copilot
AdvancedEngineeringGitHub Copilot

Automate Your Pre-Merge PR Checklist with a Custom AI `/ship` Skill

Turn your team's standard operating procedure for shipping code into an executable AI skill. Automate running tests, fixing lint, pushing to the repo, and monitoring CI, saving significant engineering time and reducing friction.

From How I AI

How Figma's Team Syncs Design and Code with Claude Code and Codex

with Claire Vo

Automate Your Pre-Merge PR Checklist with a Custom AI `/ship` Skill

Tools Used

GitHub Copilot

AI pair programmer

02Step-by-Step Guide
1

Document Your Pre-Merge SOP

Identify and list the entire manual checklist your team follows before merging a pull request. This includes tasks like running lint, running tests, building, pushing to git, and monitoring the CI pipeline.

2

Define a Custom AI Skill

Convert the documented SOP into a custom, executable skill for your code assistant. The blog post suggests creating a /ship skill that encapsulates the entire process.

3

Script Pre-flight Checks and Repo Pushes

The skill should first run all necessary local checks on the code (e.g., using Bazel for linting/building). Once local checks pass, it should push the code to the Git repository.

4

Add CI Monitoring and Auto-Fix Logic

Program the skill to monitor the CI/CD pipeline (e.g., BuildKite) by checking the pull request status. Add logic for the AI to automatically fix minor issues, such as lint errors, and retry the build.

5

Implement Safety Rails

Include important constraints in the skill's instructions to prevent destructive actions. For example, explicitly instruct the AI not to force push to avoid overwriting Git history.

Pro Tip: Safety constraints are crucial for giving the team confidence to use powerful automation tools.
6

Execute the Skill to Ship Code

When your code change is ready, simply invoke your custom skill (e.g., by typing /ship in your code assistant) and let the AI handle the entire monotonous process of getting your code merged.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready