Hatch3r pr creation

From hatch3r/hatch3r · View interactive version

Hatch3r pr creation is an AI agent skill from the GitHub repository hatch3r/hatch3r. Creates a pull request or merge request following project conventions including branch naming, PR/MR template, checklist, and rollout plan. Use when opening or preparing a PR/MR, or when the user asks to create a PR or MR.

How to use this skill

Skill file

Note: Commands below use npm as an example. Substitute with your project's package manager (yarn, pnpm, bun) or build tool when your project uses a different package manager.

PR / MR Creation Workflow

Platform detection: Check platform in .hatch3r/hatch.json to determine terminology and CLI. GitHub/Azure DevOps use "Pull Request" (PR); GitLab uses "Merge Request" (MR).

Quick Start

Task Progress:
- [ ] Step 0: Detect ambiguity (P8 B1)
- [ ] Step 1: Verify branch naming
- [ ] Step 2: Self-review against checklist
- [ ] Step 3: Fill PR/MR template
- [ ] Step 4: Create the PR/MR

Step 0 — Detect Ambiguity (P8 B1)

Before any work, scan the invocation for unresolved questions in scope, intent, acceptance criteria, target environment, or irreversibility. If any are found, ask the user via the platform-native question tool per agents/shared/user-question-protocol.md. Do not proceed under silent assumption. Default path, not an exception. Triggers for THIS skill: target base branch (board.defaultBranch vs feature branch), draft vs ready-for-review, reviewers explicitly named, rollout plan (feature flag vs direct), and whether the diff includes irreversible operations (force-push, data migration).

Fan-out Discipline (P8 B2)

Fan-out scales with task size; token cost never justifies serializing independent work (rules/hatch3r-fan-out-discipline.md P8 B2; agents/shared/efficiency-patterns.md). Emit sub_agents_spawned: { count, rationale, task_structure } in your output.

Step 1: Branch Naming

Branches must follow {type}/{short-description}:

| Type | When to Use | Example |

| ----------- | ---------------------------------- | ----------------------------- |

| feat/ | New features | feat/add-user-preferences |

| fix/ | Bug fixes | fix/login-validation-bug |

| refactor/ | Code, logical, or visual refactors | refactor/simplify-auth-flow |

| qa/ | QA validation or test additions | qa/e2e-checkout-flow |

| docs/ | Documentation changes | docs/update-readme |

| infra/ | CI/CD, tooling, infrastructure | infra/add-lint-ci-step |

Rules: lowercase, hyphens (no underscores), 3-5 words max.

Step 2: Self-Review Checklist

Before creating the PR, verify:

Scope: Changes limited to the stated issue. No unrelated changes. No TODOs without linked issues.

Quality: Code compiles (npm run typecheck). Lint passes (npm run lint). All tests pass (npm run test). No any types. No @ts-ignore without linked issue.

Security & Privacy: No secrets in code. Database rules updated and tested if data model changed. No sensitive content leaks to cloud. Event metadata uses allowlisted keys. Entitlement gates enforced server-side if gated.

Accessibility (if UI): Animations respect prefers-reduced-motion. Color contrast meets WCAG AA. Interactive elements keyboard accessible.

Step 3: Fill PR/MR Template

Use the project's PR/MR template. Fill every section:

Step 4: Create the PR/MR

PR/MR title format: {type}: {short description} (#issue)

Examples:

Create the PR/MR using the platform CLI (check platform in .hatch3r/hatch.json):

Use board.defaultBranch from .hatch3r/hatch.json as the target branch (fallback: "main").

Required Agent Delegation

You MUST spawn these agents via the Task tool (subagent_type: "general-purpose") at the appropriate points:

Related Skills

Error Handling

Size Guidelines

| Files Changed | Recommendation |

| ------------- | ------------------------------------ |

| 1-5 | Ideal. Review and merge quickly. |

| 6-15 | Acceptable. Thorough PR description. |

| 16-30 | Split if possible. |

| 30+ | Must be split. |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.