Get the FREE Ultimate OpenClaw Setup Guide →

create-pr

npx machina-cli add skill jmerta/codex-skills/create-pr --openclaw
Files (1)
SKILL.md
1.9 KB

Create a PR

Goal

Produce a PR that’s easy to review and safe to merge:

  • small, scoped changes
  • green checks (lint/tests/build as appropriate)
  • clear description + validation steps

Workflow (checklist)

  1. Confirm scope
    • Restate the goal and acceptance criteria.
    • Identify files likely to change; avoid unrelated cleanup.
  2. Create a branch
    • Use a descriptive name: fix/<topic>, feat/<topic>, chore/<topic>.
  3. Implement changes
    • Keep diffs focused; prefer small commits.
  4. Run quality gates
    • Run the repo’s standard commands (lint/tests/build).
    • If bun.lock exists, prefer bun lint / bun build.
    • If bun.lock exists but bun is not available, tell the user and ask whether to install bun or use the repo’s alternative package manager.
  5. Commit
    • Prefer Conventional Commits: fix: ..., feat: ..., chore: ....
  6. Push + open PR
    • Always use GitHub CLI (gh) for PR workflows (e.g. gh pr create --fill).
    • If gh is not authenticated, run gh auth login (or gh auth status to check).
    • If gh is not installed or cannot be authenticated, tell the user and ask whether to install/authenticate or proceed with manual PR creation steps.
  7. Fill in PR body
    • Use references/pr-description-template.md.

Notes

  • Don't force-push unless you're sure it's safe for collaborators.
  • If the PR changes UX, include screenshots or a short GIF.
  • Prefer gh for create/view/checks (e.g. gh pr view, gh pr checks).

Deliverable

Provide:

  • Branch name and PR URL (or the exact steps to open it manually).
  • PR title/body (using references/pr-description-template.md).
  • Commits included and verification commands run.
  • Screenshots/GIFs if UX changed.

Source

git clone https://github.com/jmerta/codex-skills/blob/main/create-pr/SKILL.mdView on GitHub

Overview

This skill guides you through producing a PR that’s easy to review and safe to merge. It emphasizes small, scoped changes, green checks, and a clear PR description with validation steps, following a structured workflow from scope to description.

How This Skill Works

Follow a checklist to validate scope, then create a descriptive branch and implement focused changes. Run the repository’s quality gates (lint/tests/build), commit with conventional commits, and push to open the PR with the GitHub CLI, filling the body from the PR template for consistency.

When to Use It

  • When you’re asked to open or prepare a PR for a change
  • When implementing a small, focused fix or feature
  • When you need to ensure CI gates pass (lint/tests/build) before merge
  • When you require a clear PR description with validation steps
  • When you want a consistent PR workflow using gh pr create --fill

Quick Start

  1. Step 1: Confirm scope and acceptance criteria for a small, focused change
  2. Step 2: Create a descriptive branch name (fix/<topic>, feat/<topic>, chore/<topic>) and implement changes in small commits
  3. Step 3: Run lint/tests/build, commit with conventional prefixes, push, and create PR with gh pr create --fill; fill PR body from references/pr-description-template.md

Best Practices

  • Confirm scope and acceptance criteria before coding
  • Keep diffs small and commits focused on a single topic
  • Use Conventional Commits: fix:, feat:, chore: etc.
  • Run lint/tests/build and report the results in the PR
  • Fill in the PR body using the references/pr-description-template.md and include UX screenshots if applicable

Example Use Cases

  • PR fixes a bug in the login flow with a small, contained change and a concise description
  • Feature branch adds a new dashboard widget with isolated changes and clear validation steps
  • Chore PR updates lint configuration and dependencies, ensuring green checks
  • Refactor PR improves internal module structure with minimal surface area
  • UX change PR updates UI text and includes before/after screenshots or a short GIF

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers