Push Prのロゴ

Push Pr

組織
Codagent-AI
push-pr

Commits changes, pushes to remote, and creates or updates a pull request for the current branch. Use when the user says "push pr", "create pr", "push and create pr", or invokes "codagent:push-pr".

概要

公開者Codagent-AI
リポジトリagent-skills
スキル名push-pr
スター
31
フォーク
1
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

codagent:push-pr

Commit all changes, push to the remote, and create or update the pull request for the current branch.

Steps

  1. Run validator detection

    • Run agent-validator detect 2>&1
    • Exit 0 → gates would run, invoke agent-validator:validator-run skill and wait for it to pass before proceeding
    • Exit 2 → no gates would run (no changes or no applicable gates), skip to Step 2
    • Exit 1 → error, report the error to the user and stop
    • Any other exit code → treat as error, report output to the user, and stop
  2. Check for uncommitted changes using git status --porcelain

    • If there are changes, create a commit:
      • Run git diff --staged and git diff to see what's changed
      • Generate a concise, descriptive commit message based on the changes
      • Stage changed files by name (avoid staging sensitive files like .env or credentials)
      • Commit with: git commit -m "message"; add -m "Co-Authored-By: <Name> <email>" only when the co-author identity is explicitly configured or provided by the user
    • If there are no changes, proceed to push check
  3. Push to remote

    • Get current branch: git branch --show-current
    • Push with upstream tracking: git push -u origin <branch>
    • If push fails, show the error and stop
  4. Check if PR exists

    • Query the current branch explicitly: gh pr list --head <branch> --state open --json url,title,state,number,headRefOid --limit 2
    • If the command fails for auth, network, API, or another error, report stderr and stop
    • If the output is invalid JSON or contains more than one open PR, report the unexpected state and stop
    • If exactly one open PR exists, use it; do not let a prior closed or merged PR substitute for it
    • If PR exists and is OPEN:
      • Check if there are new commits by comparing current HEAD with PR's headRefOid
      • If new commits exist:
        • Get default branch: gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
        • Get all commits for the description: git log <default-branch>..HEAD --oneline
        • Regenerate the PR description based on all commits (including the new ones)
        • Update the PR: gh pr edit <pr-number> --body "updated description"
        • Print: "PR updated with new commits: "
      • If no new commits: print "PR already exists: "
    • If no open PR exists:
      • Optionally query gh pr list --head <branch> --state all for context. Treat CLOSED and MERGED as terminal history, not as the current PR.
      • Print that no open PR exists and create a new PR using the steps below.
      • Get default branch: gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
      • Get commit history for PR description: git log <default-branch>..HEAD --oneline
      • Generate a clear PR title and description based on the commits and change context
      • Create PR: gh pr create --base <default-branch> --title "title" --body "description"
      • Print the PR URL
  5. Print the PR URL at the end so it's easy to find

Notes

  • Operates on the current branch — does NOT create or switch branches
  • Uses descriptive commit messages that explain the "why" not just the "what"
  • PR descriptions should summarize the changes and their purpose
  • Always include the PR URL in the final output
  • Can be invoked standalone at any point without prior workflow state
  • A merged or closed PR for the current branch never prevents creating a new open PR

よくある質問

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

Commits changes, pushes to remote, and creates or updates a pull request for the current branch. Use when the user says "push pr", "create pr", "push and create pr", or invokes "codagent:push-pr".

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

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

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

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

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

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

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

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

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

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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