Automated summary
Automates creating a GitHub pull request by checking the Git state, detecting stacked branches, reviewing the diff with triaged subagents, and then opening the PR.
Strengths
- Pre-flight checks block dirty working trees, untracked files, and the default branch.
- Detects stacked PRs and scopes the diff to the parent branch.
- Triages changed files so only the relevant review subagents are launched.
- Skips the review phase entirely for docs-only changes.
Limitations
- Assumes a GitHub remote with authenticated `gh` and `main` as the base branch.
- The style review hardcodes project-specific TypeScript conventions (CLAUDE.md, superstruct, harden), so it is not portable as-is.
- The provided text cuts off mid-sentence in the Security subagent section, leaving that review path underspecified; the skill also declares unsandboxed execution.
Use it when you need a repeatable, review-gated GitHub PR from a clean feature branch.
Avoid it for non-GitHub remotes, dirty worktrees, or projects that do not follow the referenced CLAUDE.md conventions.
Security analysis
CautionThe workflow is a legitimate, non-destructive PR-creation procedure: it only reads git state, creates PRs, and edits changelogs, with no obfuscated payloads, no credential/token exfiltration, no curl|sh, and no destructive commands. Risk comes from the broad authority it assumes — unsandboxed git/gh execution, an unprompted commit-and-push step, and spawning review subagents — so it warrants caution rather than safe, but nothing here is malicious.
- •Declares `unsandboxed: true` and drives git/gh CLI commands (git push implied in Phase 5, `gh pr create`, `gh pr edit`), giving the agent write access to repos and GitHub with network egress
- •Phase 5 automatically commits ('docs: Update changelogs') and pushes to the current branch without explicit user confirmation, which can mutate remote state
- •Launches multiple review subagents over repository diffs, which widens the agent's execution surface beyond the stated task
- •`unsandboxed: true` is set with no `allowed-tools` declared, yet the skill instructs the agent to execute arbitrary shell commands (`git`, `gh`), including `gh pr create`, `gh pr edit`, and `git push` — network-mutating operations with no tool restriction or scope guard.
- •Phase 5 instructs an automatic `git push` to the current branch without confirming with the user, so the skill can publish code to a remote as a side effect.
- •Embeds project-specific conventions and a repo-relative docs path (`docs/contributing/updating-changelogs.md`), implying assumptions about the host repository that are not validated.
Examples
Create a pull request for my current branch. Run the pre-flight checks first and stop if the working tree is dirty.This branch builds on another feature branch. Check whether it's a stacked PR, scope the review to my changes, and open the PR.Open a pull request for this docs-only branch and skip the review subagents as the skill allows.name: pr description: Creates a pull request for the current branch. unsandboxed: true
When asked to create a pull request, follow these steps:
Phase 1: Pre-flight checks
-
Run
git status. If any of the following conditions apply, stop and report the errors:- There are unstaged changes
- There are untracked files
- The current branch is the default branch (
main)
-
Check if this is a stacked PR:
- Run
git merge-base main HEADto find the common ancestor with main - Run
git log --oneline <merge-base>..HEADto see commits since diverging from main - Check if any parent commits are on another feature branch (not main)
- If so, run
gh pr list --head <parent-branch>to check if that branch has an open PR - If a parent branch has an open PR, this is a stacked PR
- Run
-
Run
git log main..HEAD --onelineto see the commit history. -
Get the diff for the review:
- If this is a stacked PR, run
git diff <parent-branch>...HEADto scope the diff to only this branch's changes. - Otherwise, run
git diff main...HEAD.
- If this is a stacked PR, run
Phase 2: Automated PR review (parallel subagents)
MANDATORY — DO NOT SKIP. This phase must run before any PR is created, regardless of how "simple", "mechanical", or "well-tested" the changes appear. Subtle bugs (e.g., semantic mismatches in API migrations) hide in exactly the changes that seem safe to skip. The only exception is docs-only changes as described below.
Before creating the PR, analyze the diff to decide which review subagents to launch. Not every PR needs every reviewer.
Triage: classify the change
Categorize each changed file, then pick subagents based on which categories are present. A file belongs to exactly one category — evaluate in this order (first match wins):
- docs:
.md,.txt,CHANGELOG,LICENSE,docs/,.claude/ - ci:
.github/workflows/,.github/actions/— these often contain shell scripts with non-trivial logic - config:
.json(notpackage.json),.yml,.yaml,.eslintrc*,.prettierrc*,tsconfig*,Dockerfile,.editorconfig,.gitignore,.gitattributes,.nvmrc,.yarnrc* - test: files matching
*.test.ts,*.spec.ts, or undertest/directories - code: everything else (
.ts,.js,.mjs,.cjs,package.json, etc.)
Then decide which subagents to launch:
- If only docs files changed: skip the entire review phase and go straight to Phase 3.
- Otherwise, select subagents based on which categories are present:
- ci present → launch Subagent 1 (Correctness) (review shell logic, conditional expressions, job dependency chains)
- config or test present → launch Subagent 2 (Style)
- test present → also launch Subagent 4 (Tests)
- code present → launch Subagent 1 (Correctness) and Subagent 2 (Style)
- code present → also launch Subagent 4 (Tests)
- code present and diff touches security-sensitive areas (network/HTTP, user input, auth, crypto,
eval/Function, capability passing,harden()/SES) → also launch Subagent 3 (Security)
Subagent 1: Correctness & Logic
Prompt the agent to:
- Review the diff for logical errors, off-by-one mistakes, race conditions, and incorrect assumptions
- Check that error handling is adequate at system boundaries
- Verify that new code paths are reachable and dead code hasn't been introduced
- Flag any behavior changes that aren't covered by tests
Subagent 2: Style & Conventions
Prompt the agent to:
- Check adherence to the project's CLAUDE.md conventions (TypeScript types over interfaces, no
any, noenum, kebab-case files,@metamask/superstructfor runtime types, options bags for 3+ args,harden()usage, etc.) - Check test conventions (no "should",
toStrictEqualfor full objects,it.eachfor parameterized tests, concise verb-form titles) - Flag unnecessary complexity, over-engineering, or missing
harden()calls
Subagent 3: Security & Performance
Prompt the agent to:
- Look for OWASP top-10 vulnerabilities (injection, XSS, etc.)
- Check for capability leaks in the ocap model (unhardened objects, leaked references)
- Identify performance issues (unnecessary allocations in hot paths, missing early returns, O(n^2) patterns)
- Verify that lockdown/SES compatibility isn't broken (no ambient authority, no forbidden globals)
Subagent 4: Test Coverage
Prompt the agent to:
- Identify new or changed logic that lacks corresponding test coverage
- Check that edge cases and error paths are tested
- Verify tests are co-located correctly per project conventions
- Flag any test anti-patterns (global state, missing cleanup, overly broad mocks)
Phase 3: Review summary
If the review phase was skipped (docs-only), proceed directly to Phase 4.
Otherwise, after all launched subagents complete:
- Compile findings into a Review Summary with sections for each subagent that ran.
- Classify each finding as one of:
- blocker - Must fix before merging
- suggestion - Should consider fixing
- nit - Minor, optional improvement
- If there are blockers, present them to the user and ask whether to:
- Fix the blockers automatically, then re-review
- Proceed with PR creation anyway
- Abort
- If there are no blockers, briefly summarize the findings and proceed.
Phase 4: Create the PR
-
Run
gh pr createto create a pull request. The PR body should include:- A brief narrative description of the PR
- A summary of the changes (bullet points)
- A brief description of how the code is tested (narrative, not a checklist)
If this is a stacked PR, add
--draftto create it as a draft PR. -
Note the PR number from the created PR URL — it is needed for changelog entries. Proceed to Phase 5 before presenting results to the user.
Phase 5: Update changelogs
MANDATORY — DO NOT SKIP. Analyze the diff and determine whether any changes are consumer-facing (i.e., affect the behavior or API of a published or private package).
- If there are NO consumer-facing changes (e.g., docs-only, CI, tooling, skill definitions, dev scripts): add the
no-changeloglabel to the PR viagh pr edit <number> --add-label no-changelogand skip the rest of this phase. - If there ARE consumer-facing changes: update changelogs as described below.
Read the instructions in docs/contributing/updating-changelogs.md and follow them to the letter. In particular:
- Think from the consumer's perspective. A changelog is not a git history. For each affected package, ask: "What changed for someone who depends on this package?" Describe changes in natural language; do not simply reuse commit messages.
- Combine like changes. If multiple commits contribute to a single logical change within one package, write one changelog entry — not one per commit.
- Split disparate changes. If one commit touches unrelated concerns in a single package, write separate entries.
- Link the PR. Use the PR number from Phase 4 in each entry (e.g.
([#123](https://github.com/.../pull/123))).
Commit the changelog updates to the current branch with the message "docs: Update changelogs" and push.
Done
Present the PR URL and any relevant information to the user. If a review was performed, include the review summary.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/create-pull-request-msshyv0b/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/create-pull-request-msshyv0b' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-pull-request-msshyv0b/download' --output '.skill-downloads/create-pull-request-msshyv0b/SKILL.md.part' && mv '.skill-downloads/create-pull-request-msshyv0b/SKILL.md.part' '.skill-downloads/create-pull-request-msshyv0b/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/create-pull-request-msshyv0b/SKILL.md' && test -s '.skill-downloads/create-pull-request-msshyv0b/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/create-pull-request-msshyv0b' '.claude/skills/pr'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/create-pull-request-msshyv0b'openskills read 'create-pull-request-msshyv0b'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/create-pull-request-msshyv0b/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.