file-pr — Claude Code skill: what it does, how to install
The file-pr Claude Code skill creates a pull request when asked to open or file one. It checks the branch and diff before submission.
MIT 1,300 installs ★ 4,278 updated 2026-11-11
npx skills add t3dotgg/tstack --skill file-pr -a claude-codeWhat file-pr does
The skill prepares a pull request for the current branch. It first checks whether that branch already has a PR, then reviews the local diff against the base branch, usually origin/main.
It follows title patterns from the repository history and writes a short account of the problem and fix. Before submission, it checks the title, description, quotes, and attachments for secrets or private details. The PR description names the model and harness behind the changes; when the model identity is unavailable, it names only the harness.
The skill opens a regular PR rather than a draft so review bots can run. It uses gh to create the PR. If gh pr create hits the GraphQL rate limit, it can use gh api with the REST endpoint. For requested follow-up monitoring, it invokes babysit-pr; PR comments go through leaving-pr-comments only when they serve the request.
What it helps with
- open a pull request for the current branch
- write a concise PR title and explain the change
- check PR text and attachments for secrets
- use a REST request when GraphQL rate limits block PR creation
Example prompts for the agent
- Open a pull request for this branch and summarize the problem and fix.
- Review the diff against
origin/mainand create a PR using the repository's title style. - Create a regular PR; if
gh pr createhits a rate limit, use the REST route.
How to install file-pr
1Skills CLI (Vercel)
npx skills add t3dotgg/tstack --skill file-pr -a claude-code2Manually: put the files in place
~/.claude/skills/file-pr/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/file-pr/
1Skills CLI (Vercel)
npx skills add t3dotgg/tstack --skill file-pr -a codex2Manually: put the files in place
.agents/skills/file-pr/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add t3dotgg/tstack --skill file-pr -a cursor2Manually: put the files in place
.cursor/skills/file-pr/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install t3dotgg/tstack skills/file-pr2Manually: put the files in place
.github/skills/file-pr/SKILL.md1Skills CLI (Vercel)
npx skills add t3dotgg/tstack --skill file-pr -a gemini-cli2Platform CLI
gemini skills install https://github.com/t3dotgg/tstack --path skills/file-prManually: put the files in place
.devin/skills/file-pr/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add t3dotgg/tstack --skill file-pr -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about file-pr
How do I install file-pr in Claude Code?
Run npx skills add t3dotgg/tstack --skill file-pr -a claude-code. The skill file is stored at ~/.claude/skills/file-pr/SKILL.md.
What does file-pr do?
It checks for an existing PR and reviews the diff, drafts a concise title and description, scans PR content for sensitive details, and opens a pull request.
What does file-pr need to work?
It uses the GitHub CLI, gh, to create pull requests. If gh pr create reaches the GraphQL rate limit, it can switch to a REST request through gh api.
Source text
SKILL.md · MIT
--- name: file-pr description: File a concise pull request. Use when the user asks to file, open, or create a PR. --- # File PR Before filing, check whether a PR for this branch already exists. Review the diff locally against the base branch (usually `origin/main`) to make sure its contents match the goal. PR titles usually become commit messages, so follow the repository's title conventions. Look at recently merged PRs and Git history for examples. Prefer a concise, human-readable title that explains why the change matters: BAD > ❌ perf(server): negotiate permessage-deflate on the websocket GOOD > ✅ perf(server): cut websocket frame size by 70%+ with gzipping Open the description with a simple explanation of the problem based on the user's original prompt, then briefly explain the solution. Do not lead with an implementation inventory: BAD > ❌ Removed implicit workspace carry-over from every "new thread" entry point (cmd+n / cmd+shift+o, sidebar v1/v2 buttons, command palette). New threads inherit only the project from context; branch, worktree, and env mode always come from the configured defaults. Deleted buildContextualThreadOptions, startNewThreadInProjectFromContext, and the v1 sidebar's seed-context machinery. GOOD > ✅ My "new worktree" default was ignored when starting new threads on existing worktrees. Super unintuitive. Now your preferences always apply. End the description with the public model name and harness that made the changes, for example `Created with <model> in <harness>.` Include subagent models that wrote part of the change. Use the model name the harness reports. If model identity is unavailable, name the harness without guessing a model. Before submission, check the title, description, quotes, and attachments for secrets and private details. Open a real PR rather than a draft so review bots run. If `gh pr create` fails because the GraphQL rate limit is used up, open it through REST with `gh api repos/<owner>/<repo>/pulls -f title=... -f head=... -f base=... -F body=@<file>`. If the user also asked to babysit it, continue with the `babysit-pr` skill. Do not post a follow-up PR comment unless it serves the user's request. When a comment is needed, use the `leaving-pr-comments` skill.
© t3dotgg · MIT · t3dotgg/tstack