KS
Killer-Skills

ghx — ghx setup guide ghx setup guide, what is ghx, ghx vs gh, how to use ghx with AI agents, ghx install, automated GitHub workflows, ghx alternative, ghx documentation, ghx tutorial, GitHub automation for AI agents

v1.0.0
GitHub

About this Skill

Ideal for GitHub Automation Agents requiring standardized and reliable repository operations ghx is an enhanced reliability layer on top of gh, standardizing GitHub operations and preventing common agent mistakes for AI agents.

Features

Provides context collection with a stable artifact manifest
Enables publishing for PR/review/comment workflows
Utilizes environment variables such as GITHUB_OUTPUT_DIR and GITHUB_CONTEXT
Supports shell escaping and multi-line payload handling
Offers a standardized way to automate GitHub operations for AI agents
Integrates with CI/CD pipelines for automated workflows

# Core Topics

holon-run holon-run
[0]
[0]
Updated: 3/6/2026

Quality Score

Top 5%
45
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add holon-run/holon

Agent Capability Analysis

The ghx MCP Server by holon-run is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for ghx setup guide, what is ghx, ghx vs gh.

Ideal Agent Persona

Ideal for GitHub Automation Agents requiring standardized and reliable repository operations

Core Value

Empowers agents to automate GitHub workflows with context collection and PR publishing capabilities, utilizing a stable artifact manifest and preventing common mistakes like shell escaping and multi-line payload issues, all while leveraging the `gh` command-line interface

Capabilities Granted for ghx MCP Server

Automating context collection for GitHub repositories
Publishing pull requests and reviewing code changes
Streamlining comment workflows for collaborative development

! Prerequisites & Limits

  • Requires `GITHUB_OUTPUT_DIR` environment variable for artifact directory
  • Dependent on `gh` command-line interface for GitHub operations
Project
SKILL.md
5.0 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

GHX Skill

ghx is an enhanced reliability layer on top of gh, used by higher-level skills. It standardizes common GitHub operations and prevents common agent mistakes (especially shell escaping and multi-line payload issues).

It provides two capabilities:

  • Context collection with a stable artifact manifest
  • Publishing for PR/review/comment workflows

Environment Variables

  • GITHUB_OUTPUT_DIR: artifact directory (caller-provided; defaults to a temp dir when unset)
  • GITHUB_CONTEXT_DIR: context directory (default ${GITHUB_OUTPUT_DIR}/github-context)
  • GITHUB_TOKEN / GH_TOKEN: token used by gh
  • DRY_RUN: preview mode for publish commands (true|false)

Commands

Use scripts/ghx.sh as the entrypoint.

Context collection

bash
1scripts/ghx.sh context collect holon-run/holon#123 2scripts/ghx.sh context collect 123 holon-run/holon

Publish commands

bash
1scripts/ghx.sh review publish --pr=holon-run/holon#123 --body-file=review.md --comments-file=review.json 2scripts/ghx.sh pr create --repo=holon-run/holon --title="Title" --body-file=summary.md --head=feature/x --base=main 3scripts/ghx.sh pr update --pr=holon-run/holon#123 --title="New title" --body-file=summary.md 4scripts/ghx.sh pr comment --pr=holon-run/holon#123 --body-file=summary.md 5# stdin body is also supported 6scripts/ghx.sh pr comment --pr=holon-run/holon#123 --body-file=- <<'EOF' 7Multiline body from stdin. 8EOF

Batch mode

bash
1scripts/ghx.sh batch run --batch=${GITHUB_OUTPUT_DIR}/publish-batch.json

Use batch mode when one run needs multiple publish actions. Use direct commands for single-action publish.

Contract Boundary

  • Public contract for other skills:
    • Call ghx.sh commands.
    • Read ${GITHUB_CONTEXT_DIR}/manifest.json for context artifacts.
    • Read ${GITHUB_OUTPUT_DIR}/publish-results.json for publish execution results.
    • Use publish-batch.json schema when running ghx.sh batch run (defined below and in references/github-publishing.md).
  • Integration guidance for third-party skills:
    • Prefer direct commands for single actions.
    • Use batch mode only when one run needs multiple publish actions.
    • Do not depend on undocumented fields or script internals outside this documented schema.

Context Output Contract

context collect writes:

  • ${GITHUB_CONTEXT_DIR}/manifest.json
  • Context files under ${GITHUB_CONTEXT_DIR}/github/ (for example pr.json, pr.diff, comments.json)

manifest.json is the source of truth for collected context:

json
1{ 2 "schema_version": "2.0", 3 "provider": "ghx", 4 "kind": "pr|issue", 5 "ref": "owner/repo#123", 6 "success": true, 7 "artifacts": [ 8 { 9 "id": "pr_metadata", 10 "path": "github/pr.json", 11 "required_for": ["review"], 12 "status": "present|missing|error", 13 "format": "json|text", 14 "description": "What this artifact contains" 15 } 16 ], 17 "notes": [] 18}

Consumers must use artifacts[] instead of assuming fixed context filenames.

Publish Output Contract

Publish commands write ${GITHUB_OUTPUT_DIR}/publish-results.json with per-action status and summary totals.

Batch Input Contract (Public)

ghx.sh batch run consumes ${GITHUB_OUTPUT_DIR}/publish-batch.json (or any path passed by --batch).

json
1{ 2 "version": "1.0", 3 "pr_ref": "owner/repo#123", 4 "actions": [ 5 { 6 "type": "post_comment", 7 "description": "optional", 8 "params": { 9 "body": "summary.md" 10 } 11 } 12 ] 13}

Schema summary:

  • Top-level required fields: pr_ref, actions
  • Top-level optional field: version (default 1.0)
  • Action required field: type
  • Action optional fields: description, params
  • params is action-specific payload; legacy inline action fields are also accepted.

Supported type values:

  • create_pr
  • update_pr
  • post_comment
  • reply_review
  • post_review

Notes

  • Prefer ghx for multi-step or error-prone GitHub operations.
  • context collect also prints a human-readable artifact summary; this is informational only.
  • For long or multi-line text, never inline shell arguments; always write to a file and pass --body-file/--comments-file.
  • Command selection:
    • single action: use direct commands (review publish, pr create|update|comment)
    • multiple actions in one run: use batch run

Safety Rules (Text Payloads)

To reduce failure rate from quoting/newline/markdown escaping:

  1. Never pass large markdown/JSON payloads inline on command line.
  2. Always pass payloads via file arguments:
    • ghx: --body-file, --comments-file (--body-file=- is allowed to read from stdin)
    • raw gh: --body-file
  3. Apply this rule to PR reviews, PR comments/description, issue comments, and issue creation.

Good:

bash
1cat > /tmp/issue-body.md <<'EOF' 2## Summary 3Detailed markdown with quotes, backticks, and newlines. 4EOF 5gh issue create --repo owner/repo --title "Bug report" --body-file /tmp/issue-body.md

Bad:

bash
1gh issue create --repo owner/repo --title "Bug report" --body "## Summary 2Detailed markdown with quotes, backticks, and newlines."

Related Skills

Looking for an alternative to ghx or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication