# Pr

> >

- **Type:** Skill
- **Install:** `agentstack add skill-urmzd-dotfiles-pr`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [urmzd](https://agentstack.voostack.com/s/urmzd)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [urmzd](https://github.com/urmzd)
- **Source:** https://github.com/urmzd/dotfiles/tree/main/dot_agents/skills/pr

## Install

```sh
agentstack add skill-urmzd-dotfiles-pr
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# PR

Create a pull request with a well-structured summary.

## Steps

1. **Gather context**:
   - Detect the default branch: `gh repo view --json defaultBranchRef -q .defaultBranchRef.name`
   - Get all commits since divergence: `git log ..HEAD --oneline`
   - Get the full diff: `git diff ...HEAD --stat`
   - Check if the branch is pushed: `git rev-list @{u}..HEAD --count 2>/dev/null`

2. **Push if needed**: If there are unpushed commits, run `git push -u origin HEAD`.

3. **Generate PR content**:
   - **Title** (if not provided): Derive from commits. If single commit, use its message. If multiple, summarize the theme (under 70 chars).
   - **Body**: Use this format:
     ```text
     ## Summary
     - 

     ## Test plan
     - [ ] 
     ```

4. **Create PR**: Run `gh pr create --title "" --body ""` using a HEREDOC for the body.

5. **Report**: Show the PR URL.

## Rules

- Never create a PR if there are no commits ahead of the default branch.
- If a PR already exists for this branch, show its URL instead of creating a duplicate.
- Keep the title under 70 characters.
- Group commits by type (feat, fix, chore, etc.) in the summary.

## Gotchas

- Refuse when `HEAD` is the default branch: a PR needs a non-default source branch. Detect the default with `gh repo view --json defaultBranchRef -q .defaultBranchRef.name`, compare to `git branch --show-current`, and if they match, stop and tell the user to create a feature branch first.
- For a fork-based PR, the head ref must be qualified as `owner:branch`. Pass it with `gh pr create --head :` (the owner is the fork's GitHub login), so the PR targets the upstream repo from your fork.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [urmzd](https://github.com/urmzd)
- **Source:** [urmzd/dotfiles](https://github.com/urmzd/dotfiles)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-urmzd-dotfiles-pr
- Seller: https://agentstack.voostack.com/s/urmzd
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
