Skip to content
Back to skills

Create Pr

ASecurity

Create a pull request with a structured description linking to the GitHub issue. Use when ready to push and open a PR -- auto-detects changed services/layers and generates a structured PR body with test plan.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 11, 2026
developmentgobashdockerterraformgitfrontendbackenddocumentation

Works with

  • claude code
  • cli
  • mcp

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add makigjuro/cloud-app-blueprint --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 with every re-scan.

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

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: create-pr
description: Create a pull request with a structured description linking to the GitHub issue. Use when ready to push and open a PR -- auto-detects changed services/layers and generates a structured PR body with test plan.
allowed-tools: Bash, Read, Glob, Grep, mcp__github-mcp-server__create_pull_request
user-invocable: true
argument-hint: "[issue-number]"
---

# Create Pull Request

Create a pull request for the current branch with a structured description.

## Configuration

Read `blueprint.json` from the project root at the start of execution. Extract relevant fields:
- `SOLUTION` = `backend.solutionPath` (default: find `*.sln`)
- `FRONTEND_PATH` = `frontend.path` (default: `web`)
- `CHARTS_PATH` = `infrastructure.chartsPath` (default: `deploy/charts`)
- `TF_PATH` = `infrastructure.terraformPath` (default: `infra/terraform/modules`)

If `blueprint.json` does not exist, auto-detect by scanning the project structure. The `gh` CLI infers the repository from the git remote -- no owner/repo configuration is needed.

## Arguments

- `{issue}` -- GitHub issue number to link (optional). If not provided, attempt to extract from the branch name.

## Prerequisites

- You must be on a feature branch (not main)
- All changes should be committed (warn if working tree is dirty)
- Branch should have at least one commit ahead of main

## Process

1. **Gather context:**
   - `git status` -- check for uncommitted changes, warn if dirty.
   - `git log origin/main..HEAD --oneline` -- list all commits on this branch.
   - `git diff origin/main...HEAD --stat` -- summary of changed files.
   - Extract issue number from branch name or argument.

2. **Analyze changes:**
   - Identify which layers were modified (Domain, Application, Infrastructure, Host, Frontend, Tests).
   - Detect affected services by checking paths against known service directories:
     ```bash
     git diff origin/main...HEAD --name-only | sed -nE 's#^src/([^/]+)/.*#\1#p' | sort -u
     ```
   - Detect what was added vs changed vs removed from the diff stat.
   - Check if documentation may need updating (new endpoints, entities, or events).

3. **Push and create PR:**
   - Push the branch to origin with `-u` flag.
   - Create the PR with `gh pr create`.

## PR Body Format

```markdown
## Summary
{1-3 bullet points describing what this PR does}

Closes #{issue-number}

## Affected Services
{List only services that were actually modified}

## Changes
- **Domain:** {changes or "No changes"}
- **Application:** {changes or "No changes"}
- **Infrastructure:** {changes or "No changes"}
- **Endpoints:** {changes or "No changes"}
- **Frontend:** {changes or "No changes"}
- **Tests:** {changes or "No changes"}

## Test Plan
{Include only the tracks matching what changed, with the concrete commands rendered from Configuration values:}
- [ ] Unit tests pass -- `dotnet test {SOLUTION} --filter "Category!=Integration"`
- [ ] Integration tests pass -- `dotnet test {SOLUTION} --filter "Category=Integration"` (requires Docker)
- [ ] Frontend lint + type-check clean -- `cd {FRONTEND_PATH} && npm run lint && npm run type-check`
- [ ] Helm charts lint clean -- `for c in {CHARTS_PATH}/*/; do helm lint "$c"; done`
- [ ] Terraform validates -- `terraform -chdir={TF_PATH} validate && terraform fmt -check -recursive {TF_PATH}`
- [ ] Architecture check passes -- `/dotnet-architect:check-architecture`
- [ ] {Any feature-specific manual verification steps}

Generated with [Claude Code](https://claude.com/claude-code)
```

## Commands

```bash
# Push branch
git push -u origin HEAD

# Create the PR (gh infers owner/repo from the git remote)
gh pr create --title "{title}" --body "{body}" --base main
```

If the GitHub MCP server is available in this session, you may use `mcp__github-mcp-server__create_pull_request` instead -- it returns typed JSON without output parsing.

## Error Handling

- **No commits ahead of main:** Warn the user -- there's nothing to PR.
- **Push fails (no upstream):** Use `git push -u origin HEAD` to set the upstream.
- **PR already exists:** Check with `gh pr list --head {branch}` and report the existing PR URL instead of creating a duplicate.

## Guidelines

- Keep the PR title under 70 characters: lowercase imperative, matching the primary commit ("add user group assignments", not "Added user group assignments").
- Use `Closes #{issue}` to auto-close the linked issue on merge.
- Report the PR URL when done.

Attribution

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

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.