Doc Gatherのロゴ

Doc Gather

組織
opendatahub-io
doc-gather

Use when you need to gather context for a Jira ticket or PR. Resolves ticket metadata, clones relevant repos, collects candidate files, runs filtering pipeline, and produces workspace/context-package.json.

概要

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

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

  • どのLLMでも利用可能

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

  • 7個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

AIスキル「Doc Gather」を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-documentation/skills/doc-gather
  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-documentation/skills/doc-gather .claude/skills/doc-gather
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

doc-gather

Gather context from Jira tickets, source repos, and documentation repos to produce a structured context package for downstream skills.

Parse arguments

$ARGUMENTS contains either:

  • A Jira ticket key (e.g., RHOAIENG-55490)
  • A PR/MR URL (e.g., https://github.com/org/repo/pull/123)

Detect the input type:

  • If it starts with http → PR URL
  • Otherwise → Jira ticket key

Step 1: Resolve ticket metadata

For Jira tickets

Use the resolve script to fetch and structure ticket metadata:

bash
bash ${CLAUDE_SKILL_DIR}/scripts/resolve-jira.sh <JIRA-KEY>

This returns JSON with: key, summary, description, acceptance_criteria, fix_versions, components, linked_tickets, epic_key, status, issue_type.

If the ticket has linked tickets that provide useful context (e.g., parent epic, related stories), resolve those too (up to 5 linked tickets):

bash
bash ${CLAUDE_SKILL_DIR}/scripts/resolve-jira.sh <LINKED-KEY>

For PR URLs

Use gh CLI to extract PR metadata:

bash
gh pr view <PR-URL> --json title,body,labels,files,headRefName

Extract the Jira key from the PR title or body (pattern: [A-Z]+-\d+), then resolve the Jira ticket using the resolve script as above.

Step 2: Parse product configuration

Read the product configuration bundled with this skill:

bash
python3 ${CLAUDE_SKILL_DIR}/scripts/parse-product-config.py ${CLAUDE_SKILL_DIR}/references/rhoai.yaml

From the config, determine:

  1. Context sources — which repos to clone and where to find files
  2. Version mappings — how to map Jira fixVersion to git branches
  3. Component resolver — map Jira component names to repo slugs
  4. Docs conventions — module prefixes, framework, attribute files

Step 3: Resolve version to branches

For each fixVersion from the ticket:

bash
python3 ${CLAUDE_SKILL_DIR}/scripts/parse-product-config.py ${CLAUDE_SKILL_DIR}/references/rhoai.yaml --resolve-version "<fixVersion>"

This determines which branch to checkout for each repo.

Step 4: Resolve components to repos

For each component from the ticket:

bash
python3 ${CLAUDE_SKILL_DIR}/scripts/parse-product-config.py ${CLAUDE_SKILL_DIR}/references/rhoai.yaml --resolve-component "<component-name>"

This identifies which source repos are relevant.

Step 5: Clone and collect candidate files

For each context source in the product config, plus each resolved component repo:

bash
bash ${CLAUDE_SKILL_DIR}/scripts/gather-context.sh <repo-slug> <branch> <path-patterns...>

The branch is determined by:

  1. Version resolution from Step 3 (if applicable)
  2. The branch_hint from the context source declaration
  3. Fallback to main

Step 6: Run filtering pipeline

Assemble a JSON input for the filtering pipeline combining:

  • All candidate files from Step 5
  • Task context (ticket metadata as keywords, components, version)
  • Source declarations from product config
bash
python3 ${CLAUDE_SKILL_DIR}/scripts/context-filter.py <<< '<assembled-json>'

The pipeline runs six stages:

  1. Static inclusion — mark always_include sources
  2. Version branch — (already resolved in Step 3)
  3. Component affinity — filter by component overlap
  4. Path relevance — score by path patterns and keywords
  5. Keyword relevance — BM25 scoring against ticket text
  6. Budget enforcement — select top candidates within 100K token budget

Step 7: Read file contents

Source the git utilities (which internally uses scripts/load-env.sh to load credentials from the environment) and read each selected candidate's content from the cloned repo:

bash
source ${CLAUDE_SKILL_DIR}/scripts/git-utils.sh
git_file_content "workspace/repos/<repo-slug>" "<file-path>"

Attach content to each candidate entry.

Step 8: Write context package

Write workspace/context-package.json with this structure:

json
{
    "ticket": {
        "key": "RHOAIENG-55490",
        "summary": "...",
        "description": "...",
        "fix_versions": ["rhoai-2.18"],
        "components": ["Dashboard"],
        "linked_tickets": [],
        "epic_key": "",
        "status": "In Progress",
        "issue_type": "Story"
    },
    "product": {
        "product_id": "rhoai",
        "display_name": "Red Hat OpenShift AI",
        "docs_repo": "opendatahub-io/opendatahub-documentation",
        "docs_branch": "main",
        "framework": "asciidoc-modular",
        "module_prefixes": {
            "concept": "con_",
            "procedure": "proc_",
            "reference": "ref_",
            "assembly": "assembly_",
            "snippet": "snip_"
        }
    },
    "context_files": [
        {
            "source_type": "documentation",
            "repo": "opendatahub-io/opendatahub-documentation",
            "file_path": "modules/serving/pages/con_model-serving.adoc",
            "content": "...",
            "relevance_score": 0.85,
            "size_bytes": 4521,
            "estimated_tokens": 1130,
            "signals": [...]
        }
    ],
    "metadata": {
        "gathered_at": "2026-04-14T10:30:00Z",
        "total_candidates": 500,
        "selected_candidates": 42,
        "total_tokens": 85000,
        "version_resolved": "2.18",
        "branch_resolved": "release-2.18"
    }
}

Gotchas

  • GITHUB_TOKEN must be set in the environment; without it, private repo clones and GitHub API calls will fail silently or return incomplete data.
  • The 100K token budget in the filtering pipeline is a hard cap; if too many repos are relevant, lower-relevance files will be dropped without warning.
  • Linked ticket resolution is capped at 5; large epics with many linked issues will only get partial context.

Stop conditions

  • Halt: Jira ticket not found or resolve-jira.sh fails (missing credentials)
  • Halt: No context sources configured in product config
  • Warn and continue: Individual repo clone fails (skip that repo)
  • Warn and continue: Individual file unreadable (skip that file)

Output

Primary: workspace/context-package.json Report to caller: number of files gathered, total tokens, repos cloned.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Doc Gather」では何ができますか?

Use when you need to gather context for a Jira ticket or PR. Resolves ticket metadata, clones relevant repos, collects candidate files, runs filtering pipeline, and produces workspace/context-package.json.

TypingMindでDoc Gatherを使うメリットは何ですか?

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

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

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

Doc Gatherを使えるAIモデルはどれですか?

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

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

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

AIスキル「Doc Gather」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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