pr-open
БесплатноБез исполняемых скриптовНе проверенOpen a pull request the bklit-ui way: stage and commit with pre-commit hooks, run ultracite from the repo root, rebuild the shadcn registry, run a production…
от bklit★ 2 058 звёзд на GitHubОб этом скилле
PR Open Skill
End-to-end workflow for committing work and opening a merge-ready PR in bklit-ui.
Read this skill when the user wants to add, commit, validate, push, and open a PR — or references @pr-open.
Before you start
Confirm branch context
- If the user merged an earlier PR on this branch and there are new changes, branch from latest
maininstead of stacking on a stale feature branch:git fetch origin main git checkout -b <new-branch-name> origin/main - Re-apply or cherry-pick only the intended changes; do not commit unrelated
registry:buildnoise (e.g. reformattedpackages/ui/registry/examples/*unless those edits are intentional).
- If the user merged an earlier PR on this branch and there are new changes, branch from latest
Never commit secrets — skip
.env, credentials, API keys, etc. Warn the user if they ask to commit them.Git safety (required)
- Do not update git config.
- Do not run destructive commands (
push --force,reset --hard) unless the user explicitly asks. - Do not skip hooks (
--no-verify) unless the user explicitly asks. - Do not
git commit --amendunless all amend rules in the user's git rules are satisfied (HEAD commit is yours, not pushed, or user requested amend). - If a commit fails due to a hook, fix the issue and create a new commit — do not amend a failed commit.
- Use HEREDOC for commit messages (see below).
- Do not push unless the user asked to push or open a PR.
Step 1 — Inspect changes
Run in parallel from the repo root:
git status
git diff
git diff --staged
git log -5 --oneline
If opening a PR, also check divergence from base:
git fetch origin main
git log origin/main..HEAD --oneline
git diff origin/main...HEAD --stat
Draft a commit message that explains why, not just what. Match recent repo style (e.g. feat(charts): …, fix(web): …).
Step 2 — Stage and commit (pre-commit loop)
Stage
git add <paths> # prefer explicit paths over blind git add -A
Commit
git commit -m "$(cat <<'EOF'
<subject line>
<optional body — 1–2 sentences on why>
EOF
)"
Husky pre-commit runs npx ultracite fix (see .husky/pre-commit).
If pre-commit fails or leaves unstaged fixes
- Read the hook output and fix every reported issue (lint correctness, nested ternaries,
biome-ignoreonly when justified, etc.). - Re-stage affected files:
git add <paths> - Commit again with a new commit (or amend only if amend rules allow and the previous commit succeeded but the hook auto-modified files).
Repeat until git commit succeeds and git status is clean (no leftover hook formatting).
Step 3 — Ultracite from repo root
After commits are clean, run the root pnpm scripts (not npx ultracite directly unless fixing a one-off):
pnpm lint # ultracite check
If check fails:
pnpm lint:fix # ultracite fix (same as pnpm format)
Then:
- Review
git difffor unexpected changes. - If files changed:
git add <paths>→git commit -m "$(cat <<'EOF' Fix lint issues from ultracite EOF )" - Re-run
pnpm lintuntil it passes with no fixes pending.
Do not open a PR while pnpm lint fails or while lint fixes are unstaged.
Step 4 — Rebuild shadcn registry (required)
Always run this before the production build on every PR — not only when packages/ui changed. Registry artifacts under apps/web/public/r/ must stay in sync with the committed UI package.
From the repo root:
pnpm registry:build
This updates apps/web/public/r/ from packages/ui (see packages/ui/package.json → registry:build).
- Review
git diffafter the build. Include intentional changes underapps/web/public/r/. - Do not commit incidental reformats on
packages/ui/registry/examples/*unless those edits are intentional. - If
apps/web/public/r/(orpackages/ui/registry.jsonwhen you edited it) changed:
git add apps/web/public/r packages/ui/registry.json
git commit -m "$(cat <<'EOF'
chore(registry): rebuild shadcn registry for PR
EOF
)"
- Re-run Step 3 (
pnpm lint) if any source files changed outsidepublic/r/.
Do not open a PR while registry outputs are stale (uncommitted apps/web/public/r/ diffs after registry:build).
Step 5 — Test build
Run a production build to catch type and compile errors before the PR.
Default (whole monorepo):
pnpm build
Web app only (faster when changes are confined to apps/web):
cd apps/web && pnpm build
If the web build OOMs in dev/CI-like environments, retry with more heap:
cd apps/web && NODE_OPTIONS='--max-old-space-size=8192' pnpm build
Optional but recommended when touching TypeScript:
pnpm check-types
If build fails
- Fix the root cause (types, imports, missing registry files, etc.).
- Re-run the failing command until it passes.
- Commit fixes with a clear messa
Установить pr-open в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-open?
Open a pull request the bklit-ui way: stage and commit with pre-commit hooks, run ultracite from the repo root, rebuild the shadcn registry, run a production test build, fix failures, push, and create a PR with a structured summary. Use when the user asks to commit, push, open a PR, "ship it", or run the full pre-PR checklist.
Как установить скилл pr-open?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-open запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic