dev-create-pr
Analyze the working tree, stage relevant changes, create a branch if needed, commit, and open a pull request
от Nebulavenus★ 51 звезда на GitHub
Установить dev-create-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Examine all uncommitted changes, identify what belongs to the current task,
prompt the user about anything ambiguous, create a branch (if on main),
commit with a descriptive message, and open a pull request.
When to use this skill:
- New or updated lessons under
lessons/ - Library code, skills, CI, config, scripts, tests
- Mixed infrastructure work
- Bug fixes, refactors, or tooling changes
Arguments
--all(optional): Include all uncommitted changes without prompting. Skips the relevance check in Phase 2. Use when you know every change in the tree belongs to the same task.branch-name(optional): Explicit branch name to use. If omitted, the skill infers one from the changes (see Phase 3).
Workflow
Work through each phase in order.
Phase 1 — Survey the working tree
Gather a complete picture of what has changed.
Run these commands in parallel:
git status --short
git diff --stat
git diff --cached --stat
git branch --show-current
git log --oneline -5
If there are no changes (status and both diffs are empty):
- Report "Nothing to commit — working tree is clean." and stop.
Collect:
- The current branch name
- List of modified tracked files (staged and unstaged)
- List of untracked files
- List of deleted files
- Recent commit history (for context)
Phase 2 — Classify changes by relevance
Goal: Every file in the commit must belong to the same logical unit of work. Unrelated changes must not silently slip in, and must not be silently excluded.
If --all was passed, skip this phase — stage everything and go to
Phase 3.
2a. Identify the task
Determine what the current work is about by examining:
- The current branch name — e.g.
lesson-30-new-topicorfix-checkbox-clicktells you the scope. - Already-staged files (
git diff --cached) — these are the most explicit signal of intent. - Recent commits on this branch (if not on
main) — shows what has been committed so far for this task. - File clustering — files in the same directory or module likely belong together.
Formulate a one-line description of the task, e.g.: "Add UI Lesson 11 — Widget ID System" or "Fix checkbox click detection".
2b. Classify each changed file
For every modified, added, deleted, or untracked file, assign one of:
| Classification | Meaning |
|---|---|
| Relevant | Clearly part of the current task |
| Unclear | Could belong to this task or could be unrelated |
| Unrelated | Clearly not part of the current task |
Heuristics for classification:
- Files in the same directory as staged changes → likely Relevant
- Files in a completely different module → likely Unrelated
- Build artifacts, compiled shaders,
.ofiles → Unrelated (and likely gitignored already) - Root-level project files (
CMakeLists.txt,README.md,PLAN.md) → check if the changes reference the current task; if so Relevant, otherwise Unclear .claude/skills/files → Relevant if the skill matches the task topic- Test files for the module being changed → Relevant
2c. Handle each classification
Relevant files: Stage them. No prompt needed.
Unclear files: Present each to the user with context and ask:
This file changed but may not belong to the current task:
M common/ui/forge_ui.h (+12 -3)
Diff summary: Added forge_ui_widget_id() declaration
Include in this PR?
Use AskUserQuestion with options:
- "Include" — stage the file
- "Exclude" — leave it unstaged (it stays in the working tree for a future commit)
- "View diff" — show the full diff for this file, then re-ask
Unrelated files: Present them as a group and confirm exclusion:
These files appear unrelated to the current task and will NOT be included:
?? build/CMakeCache.txt (build artifact)
M lessons/gpu/05-mipmaps/main.c (different lesson)
?? .DS_Store (OS file)
Proceed without these files?
Use AskUserQuestion with options:
- "Proceed" — leave them out
- "Let me pick" — switch to per-file prompting for this group
CRITICAL — never silently exclude. If a file has real code changes (not build artifacts or OS junk), the user must be told it is being left out. The purpose of this skill is to prevent both accidental inclusions AND accidental omissions.
Phase 3 — Create a branch (if needed)
If already on a feature branch (not main), skip to Phase 4.
If on main:
Ensure
mainis up to date:git pull origin mainDerive a branch name from the changes. Use the task description from Phase 2 to generate a kebab-case name:
Task description Branch name Add UI Lesson 11 — Widget ID System ui-lesson-11-widget-idFix checkbox click detection fix-checkbox-clickAdd dev-create-pr skill add-dev-create-pr-skillUpdate math library wit
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dev-create-pr?
Analyze the working tree, stage relevant changes, create a branch if needed, commit, and open a pull request
Как установить скилл dev-create-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dev-create-pr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…