mcpField
R
rhdh-forge

rhdh-forge

github.com/redhat-developerDevelopment1950 installsUpdated 1d ago
Repository

About rhdh-forge

RHDH Forge is a read-only skill for reading GitHub and GitLab issues, pull requests, merge requests, checks, pipelines, and repository files. It also prepares exact write payloads for a calling skill to review and execute through its mutation gate, but never performs writes itself.

Key features

  1. 01Reads GitHub and GitLab issue context
  2. 02Resolves plugin workspaces from issue references
  3. 03Inspects PR and MR checks and pipeline status
  4. 04Reads repository and branch files
  5. 05Builds write payloads without executing them

Use cases

  1. 01Triage an issue and identify its repository workspace
  2. 02Verify a check or pipeline against the relevant commit
  3. 03Prepare a PR, MR, comment, or label payload for approval

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/redhat-developer/rhdh-skills --skill rhdh-forge

After installing, type/rhdh-forgein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
gh-cli.md
glab-cli.md
issue-context.md
scripts/
fetch_issue_context.py

Details

From the project README

RHDH Forge

One home for reading a forge and constructing its write payloads. Issue parsing, issue fetch, workspace resolution, check and pipeline reads, repository content reads, and the gh and glab behaviours that mislead a caller who has not met them before all live here. Otherwise, every skill that touches a forge keeps its own drifting copy.

This skill reads. It never executes a write.

GitHub work runs through gh. GitLab work — rhidp/rhdh and rhidp/rhdh-plugin-catalog on gitlab.cee.redhat.com — runs through glab, which is only needed when a GitLab host is in play.

Route by outcome

OutcomeLoad and follow
Turn a GitHub issue reference into structured contextRun uv run scripts/fetch_issue_context.py <reference>
Parse a GitHub or GitLab reference without a network callreferences/issue-context.md
Resolve the plugin workspace an issue belongs toreferences/issue-context.md
Read PR state, labels, assignees, files, or check statusreferences/gh-cli.md
Explain a failing, stale, or missing checkreferences/gh-cli.md
Read a file from a repository or a PR branchreferences/gh-cli.md
Read a GitLab issue, MR state, pipeline status, or filereferences/glab-cli.md
Prepare a GitHub pull-request creation payloadreferences/gh-cli.md, then the caller's mutation gate
Prepare a GitLab merge-request creation payloadreferences/glab-cli.md, then the caller's mutation gate
Prepare a comment, label, assignee, or /publish payloadreferences/issue-context.md, then the caller's mutation gate
Prepare a GitLab comment, label, or approval payloadreferences/glab-cli.md, then the caller's mutation gate

Callers invoke this skill by name and consume what it returns. Do not load its files from another skill.

Invariants

  • Every route here is read-only. A caller that needs a write gets a payload, not an execution.
  • Construct an issue, PR, or MR URL from the resolved namespace, repository, and number. Never retain the user's raw URL; it may carry a fragment or a query string.
  • A Jira key is not this skill's work. Extract it, hand it back, and let the caller invoke /rhdh-jira-api for the detail.
  • gh pr checks and statusCheckRollup are cached views and go stale. Confirm a check verdict against gh run list --branch before acting on it.
  • A GitLab pipeline verdict belongs to a commit, not to a merge request. Compare the pipeline's SHA against the MR head SHA before reporting it.
  • Report an unresolved workspace as unresolved. Guessing one sends a caller into the wrong repository.
  • Never read a credential file. If gh auth status or glab auth status fails, stop and report the missing capability.

Mutation boundary

The command patterns in the references are payloads, not authorization. This skill builds the command and hands it back unexecuted, which is what leaves the decision with the user rather than with the module that knows the syntax.

Before any pull request, merge request, comment, label, assignee, review, approval, or /publish write, the calling skill invokes /mutation-gate and follows it. This skill returns the exact argument vector and a shell-safe rendering, the canonical host and repository, the target object or base and head branches, the title when applicable, and the absolute body-file path. It also returns the body-file contents for preview and a read-only verification command. It never runs the write command.

For PR and MR creation, reject a missing or multiline title, a relative or unreadable body file, an unresolved repository, or an empty base or head branch. Treat each value as one argument. Do not interpolate a title or body into shell syntax, use eval, or replace the body file with a heredoc.

A request to fetch, triage, or analyze is intent to read. It approves no write.

Issue context output

scripts/fetch_issue_context.py prints one JSON object and nothing else. There is no envelope: the issue fields are the whole document.

{
  "key": "owner/repo#607",
  "summary": "issue title",
  "source": "github",
  "url": "https://github.com/owner/repo/issues/607",
  "repository": "owner/repo",
  "number": 607,
  "state": "OPEN",
  "labels": [],
  "description": "full issue body",
  "workspace": {"name": null, "strategy": "label"},
  "comments": []
}

key is owner/repo#number, summary is the issue title, state is OPEN or CLOSED, and workspace.strategy is one of label, body, title, package, or unresolved.

/rhdh-jira-api returns the same issue shape with source: jira, and a GitLab issue read through references/glab-cli.md fills the same fields with source: gitlab, so a caller consumes any of the three without branching on shape.

Keep an unresolved workspace null with strategy: unresolved rather than inventing a name.

Scripts and references

  • scripts/fetch_issue_context.py deterministically builds that document from a GitHub issue URL, a bare #number, or owner/repo#number. A GitLab issue is read with glab instead.
  • references/issue-context.md covers reference parsing for both forges, field extraction, workspace resolution, and the gated interaction payloads.
  • references/gh-cli.md covers gh and jq read patterns, pull-request creation payloads, check and workflow-run reads, repository content reads, the failure table, and the overlay repository's /publish rules.
  • references/glab-cli.md covers glab reads for merge requests, pipelines, and repository content, GitLab merge-request creation payloads, the GitLab field names that differ from GitHub's, and the other commands it constructs but never runs.

Completion

A fetch is complete when the JSON carries key, summary, and source, url was rebuilt from the resolved namespace, repository, and number rather than copied from the request, and workspace.strategy names the rule that resolved it or reads unresolved with name: null. A check verdict is complete only once gh run list --branch confirmed it on GitHub, or the pipeline for the MR head SHA confirmed it on GitLab; a gh pr checks or statusCheckRollup value alone is a cached view, not a verdict. A write payload is complete when it is handed back unexecuted for the caller's mutation gate. An interaction payload states the exact command, repository, issue, PR, or MR number, head SHA, and body or label. A PR or MR creation payload carries the canonical repository, exact base and head branches, one-line title, absolute body-file path, body preview, argument vector, shell-safe command, and read-only verification command. A Jira key found in the issue is reported to the caller, never resolved here.

Comments

Markdown supported