Dev Create Prのロゴ

Dev Create Pr

コミュニティ
Nebulavenus
dev-create-pr

Analyze the working tree, stage relevant changes, create a branch if needed, commit, and open a pull request

概要

公開者Nebulavenus
リポジトリforge-gpu
スキル名dev-create-pr
スター
46
フォーク
7
同梱ファイル
指示のみ
ライセンスZlib
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    NebulavenusがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルDev Create PrをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/dev-create-pr
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Nebulavenus/forge-gpu.git /tmp/forge-gpu
mkdir -p .claude/skills
cp -r /tmp/forge-gpu/.claude/skills/dev-create-pr .claude/skills/dev-create-pr
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDev Create Prを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にDev Create Prを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Dev Create Prは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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:

bash
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:

  1. The current branch name — e.g. lesson-30-new-topic or fix-checkbox-click tells you the scope.
  2. Already-staged files (git diff --cached) — these are the most explicit signal of intent.
  3. Recent commits on this branch (if not on main) — shows what has been committed so far for this task.
  4. 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:

ClassificationMeaning
RelevantClearly part of the current task
UnclearCould belong to this task or could be unrelated
UnrelatedClearly 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, .o files → 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:

text
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:

text
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:

  1. Ensure main is up to date:

    bash
    git pull origin main
  2. Derive a branch name from the changes. Use the task description from Phase 2 to generate a kebab-case name:

    Task descriptionBranch name
    Add UI Lesson 11 — Widget ID Systemui-lesson-11-widget-id
    Fix checkbox click detectionfix-checkbox-click
    Add dev-create-pr skilladd-dev-create-pr-skill
    Update math library with cross productmath-cross-product

    If the user provided a branch-name argument, use that instead.

  3. Create and switch to the branch:

    bash
    git checkout -b <branch-name>

Phase 4 — Stage, review, and local review

MANDATORY: Run /dev-local-review before committing. No exceptions. Do NOT proceed to Phase 5 until the local review passes with zero findings.

  1. Stage all relevant files (those classified as Relevant in Phase 2, plus any Unclear files the user chose to include):

    bash
    git add <file1> <file2> ...

    Stage files by explicit name — never use git add -A or git add ..

  2. Run quality checks on staged content:

    • If any .md files are staged, lint only those files:

      bash
      git diff --cached --name-only -- '*.md' \
        | xargs -r npx markdownlint-cli2

      If errors are found in staged files, fix them, re-stage, and re-check. Never bypass lint rules.

    • If any scripts/*.py or pipeline/*.py files are staged, lint only those files:

      bash
      git diff --cached --name-only -z -- 'scripts/*.py' 'pipeline/*.py' 'tests/pipeline/*.py' \
        | xargs -0 -r uv run ruff check
      git diff --cached --name-only -z -- 'scripts/*.py' 'pipeline/*.py' 'tests/pipeline/*.py' \
        | xargs -0 -r uv run ruff format --check

      Fix issues if found.

    • If any Python files are staged (scripts/, pipeline/, or tests/pipeline/), run Pyright type checking:

      bash
      STAGED_PY=$(git diff --cached --name-only -- '*.py')
      [ -n "$STAGED_PY" ] && uv run pyright

      Fix issues if found.

  3. Show the final staging summary:

    bash
    git diff --cached --stat

    Report the file count and total lines changed.

  4. Run /dev-local-review.

    This is a mandatory gate. Run the local review skill and fix any findings it reports. Do NOT proceed to Phase 5 until it completes with zero findings. This catches problems before they reach the PR and burn a GitHub review round.


Phase 5 — Compose the commit message

Analyze the staged diff to write a descriptive commit message.

bash
git diff --cached

Commit message format:

text
<type>: <short summary under 70 chars>

<body — what changed and why, wrapped at 72 chars>

Files changed:
- path/to/file.c — brief description of change
- path/to/other.h — brief description of change

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Type prefixes:

PrefixWhen to use
AddNew feature, lesson, skill, or file
FixBug fix
UpdateEnhancement to existing functionality
RefactorCode restructuring without behavior change
DocsDocumentation-only changes
ChoreBuild, CI, config, or tooling changes

Rules for the message:

  • The summary line describes the what concisely
  • The body explains the why — what motivated the change, what problem it solves, what the user will see differently
  • List every changed file with a brief note (helps reviewers)
  • Do not pad the message with filler — be direct
  • If the changes span multiple concerns, note that honestly rather than forcing a single narrative

Present the message to the user before committing. Allow them to edit it.


Phase 6 — Commit and push

  1. Block secrets before commit:

    Scan staged file names for .env files or credential patterns. If any are found, refuse to proceed:

    bash
    # Block .env files
    git diff --cached --name-only \
      | grep -E '(^|/)\.env(\.|$)' && {
        echo "Refusing to commit .env files. Unstage them first."
        exit 1
      }
    
    # Block credential and key files
    if git diff --cached --name-only \
      | grep -Eq '(^|/)(credentials\.json|[^/]+\.pem|[^/]+\.key)$'; then
      echo "Refusing to commit credential/key files. Unstage them first."
      exit 1
    fi
  2. Commit:

    bash
    git commit -m "$(cat <<'EOF'
    <commit message from Phase 5>
    EOF
    )"
  3. Push with upstream tracking:

    bash
    git push -u origin <branch-name>
  4. Verify the push succeeded. If it fails (e.g. network error, permission denied), report the error and stop.


Phase 7 — Create the pull request

  1. Compose the PR title and body.

    • Title: Same as the commit summary line (under 70 chars).
    • Body: Structured description derived from the commit message.
  2. Create the PR:

    bash
    gh pr create --title "<title>" --body "$(cat <<'EOF'
    ## Summary
    <2-4 bullet points describing what changed and why>
    
    ## Changes
    <bulleted list of files with descriptions>
    
    ## Test plan
    - [ ] <relevant verification steps>
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    EOF
    )"
  3. Report the PR URL to the user.


Error handling

  • No changes to commit: Report and stop — do not create an empty commit.
  • Branch already exists: If the inferred branch name already exists, append a numeric suffix (-2, -3) or ask the user for a name.
  • Push rejected: If the remote rejects the push (e.g. branch exists remotely with different history), report the error. Do not force-push.
  • gh CLI not authenticated: Provide setup instructions (gh auth login) and stop.
  • Markdown lint fails: Fix the issues — never bypass. See Phase 4.
  • Merge conflicts: Should not happen on a fresh branch from main, but if they do, report and stop.

Safety guarantees

  • Never uses git add -A or git add . — always stages files by name.
  • Never silently ignores changed files — every non-trivial change is either staged or explicitly acknowledged by the user as excluded.
  • Never silently includes unrelated changes — unclear files are always prompted.
  • Never force-pushes.
  • Never commits secrets or .env files — if detected in the staged set, block the commit and exit so the user can unstage them.
  • Never bypasses quality checks — lint must pass before commit.
  • Always shows the commit message for user approval before committing.

よくある質問

AIスキル「Dev Create Pr」では何ができますか?

Analyze the working tree, stage relevant changes, create a branch if needed, commit, and open a pull request

TypingMindでDev Create Prを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Dev Create Prはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDev Create Prをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/dev-create-prを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Dev Create Prを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Dev Create Prは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDev Create Prを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Dev Create Pr」は無料ですか?

はい。NebulavenusがGitHubでZlibライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇