file-pr

Creates and updates GitHub pull requests with conventional commit titles and reviewer-focused bodies.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/nejcm/agents --skill file-pr-nejcm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: file-pr
Source: https://github.com/nejcm/agents/tree/main/skills/file-pr
Command: npx skills add https://github.com/nejcm/agents --skill file-pr-nejcm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Filing pull requests often produces duplicate PRs, wrong base branches, mangled multi-line bodies, and titles that say nothing useful in git history. This Skill enforces a disciplined workflow for opening PRs that reviewers can understand months later. ## Core Features & Use Cases - Pre-flight checks: Detects existing PRs for the branch, verifies the real base branch via gh repo view, and confirms lint, types, and tests pass before filing. - Conventional Commit titles: Writes lowercase, scoped titles that stand alone as squash commit messages, focusing on what changed and why it matters. - Problem-first PR bodies: Opens with the problem in the requester's words, followed by concise change bullets, with no boilerplate Summary/Testing/Checklist sections. - Attribution footer: Appends the model and harness that produced the change for later traceability. - Use Case: After finishing a bugfix branch, ask the agent to file the PR; it checks for an existing PR, reads the diff against the detected base branch, and files a real (non-draft) PR with a clean title and body via gh pr create --body-file. ## Quick Start File a pull request for my current branch against the correct base branch with a conventional commit title and a problem-first body.

Frequently Asked Questions about file-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GitHub pull request from the command line?▼

Use gh pr create with --base for the target branch, --title for a conventional commit title, and --body-file pointing to a temp file containing the body. Writing the body to a file avoids shells mangling newlines and backticks in multi-line text.

How do I update an existing pull request instead of opening a duplicate?▼

First check for an existing PR with gh pr list --head <branch>. If one exists, update it with gh pr edit <number> --title and --body-file rather than opening a second PR for the same branch.

How do I find the correct base branch for a pull request?▼

Run gh repo view --json defaultBranchRef -q .defaultBranchRef.name to get the default branch, and check what recent merged PRs targeted. The base is not always main; some repositories target develop.

Should I open a draft PR or a real PR?▼

Open a real PR so CI and review automation run immediately. Use drafts only when explicitly requested or when submitting a stack of dependent PRs with gh stack submit.

What makes a good pull request title and body?▼

Use a lowercase conventional commit title that states what changed and why it matters, since it becomes the squash commit message. The body should open with the problem in the requester's words, then list changes, avoiding Summary/Testing/Checklist boilerplate.