Agent skill
pull-request-format
Validate pull request source/target rules and draft standardised PR titles and Markdown descriptions that match repository GitHub Actions enforcement.
Install this agent skill to your Project
npx add-skill https://github.com/diey/codex-agent-skills/tree/main/pull-request-format
SKILL.md
Pull Request Format
Goal
When asked to create or prepare a pull request:
- Validate the requested source → target branch pair against repository rules
- Refuse to proceed if the request violates GitHub Actions enforcement
- Automatically draft a PR title and description in Markdown after validation passes
- Never create or open the PR on GitHub
Auto-draft Policy (Default)
When the user asks to create or prepare a PR:
- Automatically draft the PR title and description using available information.
- Infer changes from:
- Branch name
- Commit messages
- Available diff/context in the repository
- Do not ask the user to provide Summary / Added / Changed / Removed unless no meaningful information can be inferred.
- If details are uncertain, write best-effort bullets and mark them as
(assumed).
If there is truly not enough information:
- Populate sections with
- N/A - Add a short Needs confirmation note listing up to 3 unknowns
- Still proceed with drafting unless the user explicitly asks to stop
Enforcement Gate (Mandatory)
Before drafting any PR content:
- Validate the requested source → target pair against the branch policy below.
- If the pair is invalid:
- Refuse to proceed.
- Explain the violated rule in 1–2 lines.
- Provide the correct allowed options.
- Ask the user to confirm a compliant source/target pair.
- Do not auto-correct branches without user confirmation.
Branch Policy (Source → Target)
These rules must be enforced exactly.
Target: codex
- Allowed sources:
*-codex/*
Target: development
- Allowed sources:
codexdependabotfeature-*features-*bug-*
Target: dependabot
- Allowed sources:
dependabot
Target: main
- Allowed sources:
developmenthotfix-*
CI & Automation Awareness
When drafting PR content, reflect these enforced behaviours:
- PRs targeting
developmentrequire tests and lint to pass. - Lint workflow may run
composer cleanand auto-commit formatting fixes. - PRs targeting
mainare blocked unless source isdevelopmentorhotfix-*. - PRs from
developmentorhotfix-*tomaintrigger an automated frontend build that commitspublic/buildbefore merge.
Do not claim CI passed unless the user provides results.
PR Title
- Short, specific, human-readable.
- Start with an action verb: Add, Fix, Update, Refactor, Improve.
- Do not include branch names unless explicitly requested.
Examples:
- Fix missing production routes
- Add Flux UI badge to user listing
- Refactor activity log query for pagination
PR Description (Markdown Output Required)
Always output the PR description as GitHub-flavoured Markdown using this exact structure:
## Summary
- ...
## What was added
- ...
## What was changed
- ...
## What was removed
- ...
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
terminal-driven-fix-loop
Use a terminal-first feedback loop where the user runs tools manually and provides output for fixes.
boost-search-docs-first
Use Laravel Boost search-docs to verify the correct, version-specific approach before implementing Laravel ecosystem features.
minimal-file-changes
Prefer small, local edits. Avoid creating new files or folders unless required by Laravel conventions or explicitly requested by the user.
tests-and-formatting-discipline
Maintain testing and formatting discipline aligned with the repository CI pipeline without automatically running tools.
ask-clarifying-questions
Ask the minimum necessary clarifying questions before implementation when requirements are unclear or ambiguous.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?