create-pr

Creates GitHub pull requests following the LusitAI project template and branch conventions.

Updated May 1, 2026
One-click install
npx skills add https://github.com/ricardoo022/4dill --skill create-pr-ricardoo022
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-pr
Source: https://github.com/ricardoo022/4dill/tree/main/.gemini/skills/create-pr
Command: npx skills add https://github.com/ricardoo022/4dill --skill create-pr-ricardoo022

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually writing pull requests that follow a project's template, branch naming rules, and CI checklist is repetitive and error-prone. This Skill automates branch detection, diff analysis, PR body generation from the project template, and gh pr create execution for the LusitAI aipentest repository. ## Core Features & Use Cases - Branch and User Story Detection: Reads the current git branch, extracts the User Story ID (e.g., US-037), and auto-creates a feature branch when starting from main. - Template-Based PR Body Generation: Analyzes the diff against main, categorizes changed files (source, tests, docs, database, CI), and fills the project's PR template sections including Changes, Tests, and Checklist. - Pre-PR Validation: Runs ruff check and ruff format --check before pushing, and prevents duplicate PRs by checking for existing open PRs on the branch. - Use Case: After finishing implementation on feature/US-042-add-scanner-agent, ask the assistant to create a PR; it reads the User Story from docs/USER-STORIES.md, builds the body, runs lint checks, pushes the branch, and opens the PR with gh pr create. ## Quick Start Ask the assistant to create a pull request for the current branch, for example by saying "create a PR for my changes".

Frequently Asked Questions about create-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 the GitHub CLI with `gh pr create --base main --title "title" --body "body"` after pushing your branch with `git push -u origin`. This Skill automates both steps and generates the body from the project template.

How to auto-generate a PR description from git diff?▼

Run `git diff --stat origin/main...HEAD` and `git diff --name-only origin/main...HEAD` to list changed files, then categorize them into source, tests, docs, and config groups. The Skill maps these categories into the Changes and Tests sections of the PR template.

What happens if I run create-pr while on the main branch?▼

The Skill asks for a User Story ID or change type, then creates a properly named branch such as `feature/US-XXX-description` or `chore/description` before proceeding. It never creates a PR directly from `main`.

Does the Skill prevent duplicate pull requests?▼

Yes. It runs `gh pr list --head <branch>` to check for an existing open PR on the current branch. If one exists, it informs the user and stops instead of creating a duplicate.

What checks run before the pull request is created?▼

The Skill runs `ruff check src/ tests/` and `ruff format --check src/ tests/` and reports the results. If lint or format checks fail, issues must be fixed or confirmed with the user before the PR is created.