Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Create Pr

ASecurity

Create a GitHub pull request with gh, target the correct base branch, push only committed work, and bind related issues via Fixes/Closes keywords. Use when asked to create a PR, open a pull request, push and open PR, link/bind/associate an issue to a PR, add Fixes #N, or close issues on merge.

10 stars
0 votes
0 copies
0 views
Added 9/28/2026
ai-agentspythongoshellbashgit

Security Analysis

A100/100

Scanned 9/28/2026

Install to Claude Code

$npx -y skills add fritzprix/libr-agent --skill create-pr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Pr?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Create Pr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fritzprix-create-pr/badge)](https://www.skillsdirectory.com/skills/fritzprix-create-pr)

More formats (shields.io, HTML) on the badges page.

Files
SKILL.md
---
name: create-pr
description: >-
  Create a GitHub pull request with gh, target the correct base branch, push only
  committed work, and bind related issues via Fixes/Closes keywords. Use when asked
  to create a PR, open a pull request, push and open PR, link/bind/associate an
  issue to a PR, add Fixes #N, or close issues on merge.
---

# Create PR and Bind Issues

Open a reviewable PR from the current branch and attach the right GitHub issues so merge auto-closes them.

## Preconditions

- Only **committed** changes go into the PR. Leave uncommitted/WIP files out (or ask before committing).
- Do **not** update git config, force-push, or skip hooks unless the user explicitly asks.
- Prefer `gh` for all GitHub operations.

## Resolve base branch

**If the user names a base** (e.g. `dev/0.8.x`, `main`) → use that exactly.

**If the user does not name a base** → use the **latest `dev/<version>`** branch on `origin` (semver; treat `.x` as the highest patch for that minor). Do **not** hardcode a version.

```bash
git fetch origin 'refs/heads/dev/*:refs/remotes/origin/dev/*'
python .agents/skills/create-pr/scripts/resolve_dev_base.py
# → e.g. dev/0.8.x
```

Use the printed name as `<base>` everywhere below (`git log`, `git diff`, `gh pr create --base`).

## Workflow

### 1. Inspect branch state (parallel)

After resolving `<base>`:

```bash
git status
git diff
git rev-parse --abbrev-ref HEAD
git status -sb
git fetch origin <base>
git log --oneline origin/<base>..HEAD
git diff --stat origin/<base>...HEAD
gh pr list --head <current-branch> --json number,title,url,state,baseRefName
```

### 2. Decide branch / PR shape

| Situation                                          | Action                                                                                               |
| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Open PR already exists for this head               | Update it (`gh pr edit`) or push; do not open a duplicate                                            |
| Head branch was merged earlier; new commits remain | New PR from same or cleaner branch is OK; confirm `origin/<base>..HEAD` is only the intended commits |
| Mixed concerns on one branch                       | Prefer a clean branch from `origin/<base>` + cherry-pick (or ask) before opening                     |

### 3. Push, then create

```bash
git push -u origin HEAD
gh pr create --base <base> --title "<title>" --body "$(cat <<'EOF'
## Summary
- <1-3 bullets: why / user-visible effect>

Fixes #<issue>

## Test plan
- [ ] <concrete checks>

EOF
)"
```

On Windows PowerShell, use a here-string for `--body` instead of bash HEREDOC:

```powershell
gh pr create --base $base --title "..." --body @"
## Summary
- ...

Fixes #1234

## Test plan
- [ ] ...
"@
```

Title/body style: match recent repo commits (`fix(scope): …`, `feat(scope): …`). Include issue number in title only if helpful; **always** put a closing keyword in the body (see below).

Return the PR URL when done.

### 4. Bind relevant issues

Always attach issues the PR actually resolves or substantially addresses.

1. Infer candidates from: user message, branch name (`fix/1641-…`), commit messages (`(#1641)`), and `gh issue list` / `gh issue view` when needed.
2. Put closing keywords in the PR body (preferred) or add them via:

```bash
gh pr edit <number> --body "$(…updated body with Fixes #N…)"
```

3. Verify link: `gh pr view <number> --json body,closingIssuesReferences` (or check the issue sidebar on GitHub).

Keyword details and multi-issue examples: [references/issue-linking.md](references/issue-linking.md).

### 5. After create (optional)

- If the user only asked to bind an existing PR: skip create; edit body / confirm closing references.
- Do not push again unless new commits were added.

## Quick checks before opening

- [ ] Diff vs base matches the intended fix only
- [ ] No secrets / generated noise unless intentional
- [ ] At least one `Fixes` / `Closes` / `Resolves` line when an issue exists
- [ ] Base is user-specified **or** latest `dev/<version>` from `resolve_dev_base.py`

Attribution

fritzprixfritzprix
View sourceMore from fritzprix →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

695601 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →