Pr Jira Linkerのロゴ

Pr Jira Linker

組織
opendatahub-io
pr-jira-linker

Jira参照がないPR/MRを見つけ、Jira課題とリンクします。単一のPR/MRのリンクと、設定済みリポジトリの一括監査に対応しています。ユーザーが「PRをJiraにリンク」「PRをスキャン」「PR監査」「Jira参照のないMR」「マージリクエストをリンク」と言った場合や、コード変更を追跡できるようJiraに関連付けたい場合に使用します。

概要

公開者opendatahub-io
リポジトリai-helpers
スキル名pr-jira-linker
スター
39
フォーク
76
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

PR-Jira Linker

Detects PRs/MRs missing Jira references, finds or creates the matching Jira issue, and links them bidirectionally.

Required Tools

  • GitHub (MCP: user-github): list_pull_requests, pull_request_read, update_pull_request
  • GitLab (MCP: plugin-gitlab-GitLab): get_merge_request, get_merge_request_commits, search, create_workitem_note
  • Jira (MCP: user-mcp-atlassian): jira_search, jira_add_comment, jira_create_issue
  • Shell — git commands, curl for GitLab API fallback (constrained; see safety rules below)

Configuration

The skill reads repository lists and project defaults from a user-provided config.yaml file. A minimal example:

yaml
defaults:
  project_key: "MYPROJECT"
  issue_type: "Task"
  security_level: "Red Hat Employee"
  priority: "Normal"
  component: "Engineering"
  team: "My Team"
  team_id: "your-team-id-here"

repos:
  gitlab:
    - project: "my-org/my-repo"
      host: "gitlab.example.com"
  github:
    - owner: "my-org"
      repo: "my-repo"

Jira Key Detection

Scan for pattern [A-Z][A-Z0-9]+-[0-9]+ in: (1) PR/MR title, (2) description, (3) branch name, (4) commit messages. If found, mark as candidate key detected and verify bidirectional linkage (PR/MR references Jira key and Jira issue has PR/MR URL comment) before classifying as linked.

Mode 1: Single PR/MR

Trigger: User provides a PR/MR URL or says "link this PR to Jira".

Step 1: Read the PR/MR

Use pull_request_read (GitHub) or get_merge_request (GitLab). If GitLab MCP is down, fall back to curl --negotiate -u: against the GitLab REST API under the following mandatory safety constraints:

  1. Host allowlist: Only issue requests to hostnames explicitly listed in config.yaml under repos.gitlab[].host. Reject any target not in the allowlist.
  2. No raw IPs: Reject URLs containing raw IP addresses (IPv4 or IPv6). Resolve hostnames and reject any that resolve to private/reserved ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8, 169.254.0.0/16, ::1, fc00::/7, fe80::/10) to prevent SSRF.
  3. URL canonicalization: Parse the URL, verify scheme is https://, and reconstruct from validated components. Do not pass user-supplied URLs directly to shell commands.
  4. Safe argument passing: Pass URL, host, and path as separate, safely shell-quoted arguments. Never string-concatenate untrusted input into commands. Pass credentials via environment variables (e.g., GITLAB_TOKEN), not interpolated into command strings.
  5. Resource limits: Always use --max-time 30 --max-redirs 3 to enforce timeouts and limit redirects.
  6. Protocol restriction: Use --proto '=https' to prevent protocol downgrade or scheme switching.

Extract title, description, branch name, author.

Step 2: Detect Jira Reference

Scan title, description, branch, and commits for Jira key.

  • Found: Report candidate key and verify bidirectional link status before deciding skip/fix.
  • Not found: Proceed to Step 3.

Step 3: Find Matching Jira

Search Jira with escaped/sanitized keywords from the PR/MR title (treat user text as data, not query syntax). Strip or escape JQL/Lucene operators (+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ /) before constructing the query. If sanitized tokens are empty, fall back to prompting the user for manual input. Show matches and let user pick, or offer to create new / enter key manually / skip.

Step 4: Link Bidirectionally

After user selects or creates a Jira issue:

4a. Add Jira ref to PR/MR: Use update_pull_request (GitHub) to append to description. For GitLab, use create_workitem_note to add a comment with the Jira link.

4b. Add PR/MR link to Jira: Use jira_add_comment with MR/PR URL, repo, branch, and author.

4c. Report success: Show both URLs and confirm what was linked.

Never modify a PR/MR or Jira issue without showing a preview and getting user confirmation.

Mode 2: Batch Audit

Trigger: "scan PRs for missing Jira links", "PR audit", "check repos for unlinked PRs".

  1. Load repos from config.yaml
  2. Scan open PRs/MRs in each repo, run Jira key detection on each
  3. Report: List missing vs. linked (verified bidirectionally), offer to fix individually or fix all
  4. Fix: Run the Single PR/MR flow for each selected item

Creating New Jira Issues

When no matching Jira exists, the skill can create one:

  1. Gather context from PR/MR content (title, description, diff)
  2. Read defaults from config.yaml
  3. Show defaults, ask for modifications
  4. Draft issue with What/Why/What Changed sections
  5. Preview and confirm
  6. Create via jira_create_issue
  7. Return to the linking step

IMPORTANT: Every issue MUST include "security": {"name": "Red Hat Employee"} and "customfield_10001": "[TEAM_ID]" in additional_fields. Never omit these fields.

Error Handling

ErrorAction
GitLab MCP downFall back to curl --negotiate -u: only for hosts allowlisted in config.yaml; reject non-allowlisted targets and raw IPs; enforce --max-time 30 --max-redirs 3 --proto '=https'; pass credentials via env vars
GitHub MCP not availableSkip GitHub repos, process GitLab only
PR/MR already linkedVerify bidirectional linkage, report and skip if confirmed
Jira search returns nothingOffer to create new or enter key manually
PR/MR description update failsFall back to adding a comment
Permission deniedInform user, suggest checking repo access

Examples

Single PR Linking

text
User: Link this PR to Jira https://github.com/my-org/my-repo/pull/42
Assistant: [Reads PR, scans for Jira key, searches Jira, links bidirectionally]

Single MR Linking

text
User: Link this MR to Jira https://gitlab.example.com/my-org/my-repo/-/merge_requests/15
Assistant: [Reads MR via API, scans for Jira key, creates or finds Jira issue, links both]

Batch Audit

text
User: Scan my repos for PRs missing Jira links
Assistant: [Loads repos from config, scans all open PRs/MRs, reports linked vs missing]

よくある質問

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

Jira参照がないPR/MRを見つけ、Jira課題とリンクします。単一のPR/MRのリンクと、設定済みリポジトリの一括監査に対応しています。ユーザーが「PRをJiraにリンク」「PRをスキャン」「PR監査」「Jira参照のないMR」「マージリクエストをリンク」と言った場合や、コード変更を追跡できるようJiraに関連付けたい場合に使用します。

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

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

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

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

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

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

Pr Jira Linkerで使えるAIモデルの数に制限はありますか?

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

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

はい。opendatahub-ioがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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