Skip to content
Back to search

gh-axi

GitHub CLI for agents — designed with AXI (Agent eXperience Interface).

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/kunchenguid/gh-axi with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/kunchenguid/gh-axi'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/kunchenguid-gh-axi/badge.svg)](/listings/kunchenguid-gh-axi)

HTML

<a href="/listings/kunchenguid-gh-axi"><img src="/api/listings/kunchenguid-gh-axi/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install the gh-axi skill in the [Agent Skills](https://agentskills.io) format with [`npx skills`](https://github.com/vercel-labs/skills):

npx skills add kunchenguid/gh-axi --skill gh-axi -g

That is the entire setup - no npm install needed. The skill is a minimal discovery stub that directs your agent to the always-current `npx -y gh-axi` dashboard and help output instead of duplicating command guidance. You still need [`gh`](https://cli.github.com/) installed and authenticated via `gh auth login` (Node 20+ required). gh-axi adds no new minimum `gh` version for existing commands. Only `--attach` on issue and pull request create/edit/comment requires **gh >= 2.99.0**; older `gh` returns a structured error before any mutation runs. Set `GH_BIN` to point at a specific `gh` binary. Stacked PR commands also require GitHub's official extension: `gh extension install github/gh-stack`. For GitHub Enterprise or another custom host, authenticate `gh` for that host and either pass `--hostname <host>` after the command or set `GH_HOST`.

The skill is not a user-facing slash command (`user-invocable: false`). Its frontmatter also includes Hermes Agent metadata (`metadata.hermes`) so Hermes can categorize it as a `devops` skill for GitHub, git, CI, pull requests, releases, and projects. Just ask for anything that touches GitHub - filing issues, reviewing PRs, checking CI runs, cutting releases, managing Projects boards, or managing GitHub Actions secrets and variables - and the agent loads the skill on its own when it recognizes the task.

`-g` installs the skill for all projects (`~/.claude/skills/`, for example); drop it to install for the current project only (`.claude/skills/`).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 258 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <h1 align="center">gh-axi</h1>
  2. <p align="center">
  3. <a href="https://www.npmjs.com/package/gh-axi"><img alt="npm" src="https://img.shields.io/npm/v/gh-axi?style=flat-square" /></a>
  4. <a href="https://github.com/kunchenguid/gh-axi/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/kunchenguid/gh-axi/ci.yml?style=flat-square&label=ci" /></a>
  5. <a href="https://github.com/kunchenguid/gh-axi/actions/workflows/release-please.yml"><img alt="Release" src="https://img.shields.io/github/actions/workflow/status/kunchenguid/gh-axi/release-please.yml?style=flat-square&label=release" /></a>
  6. <a href="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=flat-square"><img alt="Platform" src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=flat-square" /></a>
  7. <a href="https://x.com/kunchenguid"><img alt="X" src="https://img.shields.io/badge/X-@kunchenguid-black?style=flat-square" /></a>
  8. <a href="https://discord.gg/Wsy2NpnZDu"><img alt="Discord" src="https://img.shields.io/discord/1439901831038763092?style=flat-square&label=discord" /></a>
  9. </p>
  10. GitHub CLI for agents — designed with [AXI](https://github.com/kunchenguid/axi) (Agent eXperience Interface).
  11. Wraps the official `gh` cli with token-efficient TOON output, contextual next-step suggestions, and structured error handling.
  12. Built for autonomous agents that interact with GitHub via shell execution.
  13. Diagnostics the wrapped `gh` process writes while a request is still pending (gh is still running a second later), such as approval prompts, stream to stderr. Diagnostics `gh` writes as it exits are not echoed: a failure is reported once in the structured error, and those from a call that succeeds, including gh-axi's internal fallback attempts, are dropped.
  14. When a successful `gh` call expected to return JSON instead returns malformed JSON, or returns an unrecognizable created-comment location or an invalid `stack view` response, gh-axi reports `UNKNOWN` with the output length and a coarse shape classification, without echoing the raw response.
  15. If an attached issue or PR comment succeeds but its readback fails, the error warns against retrying the mutation and identifies it as `comment #<id>` when an ID is available, otherwise as `created comment`.
  16. ## Benchmarks
  17. Agent ergonomics is measurable.
  18. The [axi benchmark](https://axi.md) runs the same 17 real-world GitHub tasks (issue triage, PR review prep, CI failure investigation, and more) through 5 GitHub interface setups - 5 repeats each, with `claude-sonnet-4-6` as the agent and an LLM judge scoring task success.
  19. gh-axi posts the lowest input tokens, cost, and duration of all 5 conditions, and is the only one to pass every run:
  20. | Condition | Avg Input Tokens | Avg Cost/Task | Avg Duration | Avg Turns | Success |
  21. | -------------------------- | ---------------- | ------------- | ------------ | --------- | -------- |
  22. | **gh-axi** | **46,462** | **$0.050** | **15.7s** | **3** | **100%** |
  23. | gh CLI (raw) | 47,076 | $0.054 | 17.4s | 3 | 86% |
  24. | GitHub MCP code execution | 137,409 | $0.101 | 43.4s | 7 | 84% |
  25. | GitHub MCP + ToolSearch | 153,621 | $0.147 | 41.1s | 8 | 82% |
  26. | GitHub MCP (eager schemas) | 175,757 | $0.148 | 34.2s | 6 | 87% |
  27. Against raw `gh` - the very CLI this tool wraps - that is 100% vs 86% task success at 7% lower cost.
  28. Against the GitHub MCP server it is 66% cheaper, with 74% fewer input tokens and half the turns.
  29. ## Quick Start
  30. Install the gh-axi skill in the [Agent Skills](https://agentskills.io) format with [`npx skills`](https://github.com/vercel-labs/skills):
  31. ```sh
  32. npx skills add kunchenguid/gh-axi --skill gh-axi -g
  33. ```
  34. That is the entire setup - no npm install needed.
  35. The skill is a minimal discovery stub that directs your agent to the always-current `npx -y gh-axi` dashboard and help output instead of duplicating command guidance.
  36. You still need [`gh`](https://cli.github.com/) installed and authenticated via `gh auth login` (Node 20+ required). gh-axi adds no new minimum `gh` version for existing commands. Only `--attach` on issue and pull request create/edit/comment requires **gh >= 2.99.0**, and closing an issue as a duplicate (`issue close --duplicate-of` or `--reason duplicate`) requires **gh >= 2.88.0**; older `gh` returns a structured error before any mutation runs. Set `GH_BIN` to point at a specific `gh` binary.
  37. Stacked PR commands also require GitHub's official extension: `gh extension install github/gh-stack`.
  38. For GitHub Enterprise or another custom host, authenticate `gh` for that host and either pass `--hostname <host>` after the command or set `GH_HOST`.
  39. The skill is not a user-facing slash command (`user-invocable: false`).
  40. Its frontmatter also includes Hermes Agent metadata (`metadata.hermes`) so Hermes can categorize it as a `devops` skill for GitHub, git, CI, pull requests, releases, and projects.
  41. Just ask for anything that touches GitHub - filing issues, reviewing PRs, checking CI runs, cutting releases, managing Projects boards, or managing GitHub Actions secrets and variables - and the agent loads the skill on its own when it recognizes the task.
  42. `-g` installs the skill for all projects (`~/.claude/skills/`, for example); drop it to install for the current project only (`.claude/skills/`).
  43. ## Other Ways to Install
  44. The skill is the recommended path, but it is not the only one.
  45. ### Zero setup
  46. gh-axi is an AXI, so any capable agent can run the CLI directly with nothing installed at all.
  47. Just tell your agent:
  48. ```
  49. Execute `npx -y gh-axi` to get GitHub tools.
  50. ```
  51. ### Session hook
  52. Want ambient GitHub context - the current repo's open issues and PRs - fed into every agent session instead of loading on demand?
  53. Install the CLI globally and opt into the hook:
  54. ```sh
  55. npm install -g gh-axi
  56. gh-axi setup hooks
  57. ```
  58. This installs a `SessionStart` hook for **Claude Code**, **Codex**, and **OpenCode** that surfaces the current repo state and usage guidance at the start of each session.
  59. **Restart your agent session after running this** so the new hook takes effect.
  60. For global installs, run `gh-axi update --check` to see whether a newer release is available, or `gh-axi update` to upgrade.
  61. ## Usage
  62. ```bash
  63. gh-axi # dashboard - live state, no args needed
  64. gh-axi issue list # list issues in current repo
  65. gh-axi issue subissue list 16 # list sub-issues for issue #16
  66. gh-axi pr view 42 # view pull request #42
  67. gh-axi pr view 42 --fields number,title,headRefOid,reviews # select fields as TOON
  68. gh-axi issue view 42 --fields blockedBy,blocking # issue dependencies as TOON
  69. gh-axi discussion view 66 --comments # read a discussion with replies nested under each comment
  70. gh-axi stack init model api ui # create or adopt a stack of branches
  71. gh-axi stack submit --open # create ready-for-review stacked PRs without prompts
  72. gh-axi stack view # inspect the current stack as token-efficient TOON
  73. gh-axi issue edit 42 --add-label bug --add-label chore # repeat a flag per value
  74. gh-axi run list -R owner/repo # list workflow runs for a specific repo
  75. gh-axi issue list --hostname git.example.com # target a GitHub Enterprise host
  76. gh-axi run view 123456 --job 789012 # inspect a single job within a run
  77. gh-axi run view --job 789012 --log-failed # show failed log lines for one job
  78. gh-axi run view 123456 --attempt 1 --log-failed # read an earlier attempt's failed log
  79. gh-axi workflow run ci.yml --ref main # trigger a workflow
  80. gh-axi project list --owner my-org # list Projects (v2) for an owner
  81. echo -n "sk-..." | gh-axi secret set OPENAI_API_KEY # set a secret from stdin
  82. echo -n "sk-..." | gh-axi secret set CSC_LINK --env production # scope a secret to an environment
  83. gh-axi variable set NODE_ENV --body production # set a variable from a flag
  84. gh-axi gist list # list your gists
  85. gh-axi gist list --public # list only public gists
  86. gh-axi gist view <id> # view a gist's files and content
  87. echo 'new content' | gh-axi gist edit <id> --filename notes.md # replace a file from stdin
  88. gh-axi gist edit <id> --remove old.txt # remove a file
  89. gh-axi gist rename <id> old.txt new.txt # rename a file
  90. gh-axi gist create notes.md --public --desc "My notes" # create a public gist
  91. gh-axi gist create --file a.py --file b.py --secret # create a secret multi-file gist
  92. echo "content" | gh-axi gist create --filename hello.txt --public # create from piped content
  93. gh-axi gist delete <id|url> # delete a gist (always confirmed non-interactively)
  94. gh-axi gist clone <id|url> # clone a gist locally
  95. gh-axi setup hooks # install optional agent session hooks
  96. gh-axi update --check # check whether a newer release exists
  97. gh-axi update # upgrade a global install
  98. ```
  99. The no-argument dashboard reports `0 open` only after a successful empty read.
  100. A failed read shows `issues: unknown (fetch failed)` or `prs: unknown (fetch failed)` and preserves the other section's successfully fetched results.
  101. These read failures leave the dashboard's exit status at 0 so session hooks can still use it.
  102. For multi-line issue, PR, review, or comment text, write Markdown to a UTF-8 file and pass `--body-file <path>` on the relevant command.
  103. For releases, `--body` and `--body-file` are aliases for release notes, alongside `--notes` and `--notes-file`.
  104. Any of these file flags also accepts `-` to read the Markdown from piped stdin (`cat body.md | gh-axi pr comment 42 --body-file -`); an interactive terminal or empty pipe is rejected instead of waited on.
  105. For multi-line variable values, pipe stdin to `gh-axi variable set <name>`; `--body`/`-b` is for inline values only.
  106. `gh-axi pr view <number> --fields <a,b,c>` selects exactly the named `gh pr view --json` fields and renders them under `pull_request` as TOON, preserving field names, nested metadata and complete values. `gh-axi pr --help` lists the available fields. Missing, blank or unknown fields and repeated `--fields` flags are rejected locally. This opt-in mode cannot combine with `--comments`, `--reviews`, `--checks` or `--full`. Without `--fields`, the default view and those modes are unchanged.
  107. `gh-axi issue view <number> --fields <a,b,c>` does the same for issues, under `issue`: for example `--fields blockedBy,blocking` returns the native issue dependencies. `gh-axi issue --help` lists the available fields, and the mode cannot combine with `--comments` or `--full`.
  108. `--attach <path>` is repeatable on `issue` and `pr` `create`, `edit`, and `comment` (not `pr review`). It uploads a local image or video through the same `gh --attach` mechanism (requires **gh >= 2.99.0**) and inlines it in the Markdown body. If the body already references the local path, `gh` replaces that reference with the uploaded URL; otherwise it appends the attachment. Alt text is `path#alt` for images; videos cannot take alt text. Supported types: PNG, JPEG, GIF, WebP, SVG, MP4, MOV, WebM. Size limits match GitHub's web upload: 10 MB for images and GIFs, 10 MB for video on Free, 100 MB for video on paid plans. GitHub Enterprise Server is not supported in this gh release. Successful output names each attached file and only the `user-attachments` asset URLs uploaded by that invocation. Override the wrapped `gh` binary with `GH_BIN`.
  109. The label, assignee, reviewer, and project flags of `issue create`/`edit` and `pr create`/`edit` are repeatable, as are the issue relationship flags (`--blocked-by`/`--blocking` on create, `--add-`/`--remove-blocked-by` and `--add-`/`--remove-blocking` on edit): pass the flag once per value and every value reaches `gh`.
  110. `gh-axi pr create` reports the `base` and `head` the PR was created with, so omitting `--base` surfaces that the PR targets the default branch; if the follow-up ref lookup fails, `base` prints as `null` and the branch name is unavailable.
  111. `issue list` and `pr list` accept repeated `--label` filters the same way.
  112. A repeated flag with a missing or empty value (`--add-label` with nothing after it, or `--add-label=`) fails with a validation error instead of being silently dropped.
  113. The single-value list filters do the same: an empty `--assignee` or `--author` on `issue list` and `pr list`, `--milestone` on `issue list`, or `--base` or `--head` on `pr list`, fails with the same validation error as `--label=` rather than returning an unfiltered list.
  114. In `gh-axi issue list` and `gh-axi pr list`, the `count: N of M total` line counts only what the filters you passed (`--label`, `--assignee`, `--author`, and the other list filters) match, not every issue or PR in the repository.
  115. When a total cannot be expressed faithfully — a numeric `--milestone`, since search matches milestone titles only, or a filter value containing a double quote, which search has no way to escape — gh-axi omits it and falls back to `showing first N` rather than printing a number that does not match the query.
  116. A total smaller than the page it accompanies is dropped the same way, since GitHub's search index lags behind freshly created issues and pull requests and can undercount them.
  117. Long `run view --log` and `run view --log-failed` output shows the last 20,000 characters so CI failures stay visible.
  118. When truncation happens, gh-axi best-effort saves the complete log to a temp file, includes it as `full_log`, and prints a `help:` hint telling agents to grep that file for earlier context.
  119. `run view --attempt <n>` selects a historical run attempt, as in `gh run view --attempt`. It is opt-in: without it the output is unchanged. With it, the run detail and the log envelope also report `attempt` and `head_sha` (and `job` when `--job` is given), and gh-axi fails with a `VALIDATION_ERROR` instead of returning data when the attempt, run or job that gh reports does not match the request.
  120. `gh-axi run` manages existing workflow runs; use `gh-axi workflow run <name> --ref <ref>` to trigger (dispatch) a workflow.
  121. `gh-axi pr checks <number>` and the `checks` summary of `gh-axi pr view <number>` bucket every entry of the PR's status-check rollup as `pass`, `fail`, `skip`, `pending`, or `cancel`, covering both check runs (GitHub Actions and similar) and legacy commit statuses (Vercel, `ci/circleci`, and similar).
  122. Matching `gh pr checks`: a cancelled check run gets its own `cancelled` count instead of counting as failed (a cancelled run delivered no verdict about the code), and a stale check run counts as pending because its result no longer applies to the head commit. Timed-out, action-required, and startup-failure check runs still count as failed, so a red PR is never reported as merely unfinished. Like `gh pr checks`, only the latest run of each check is counted: a re-run supersedes the earlier run of the same check, so a failure fixed by a passing re-run no longer shows.
  123. For an open PR, `gh-axi pr view <number>` also prints `merge_state` right after `checks`: GitHub's merge state lowercased (`clean`, `dirty`, `behind`, `blocked`, ...), with a short hint on states that need action. Merged and closed PRs omit it, since GitHub no longer reports a meaningful value for them.
  124. `gh-axi pr checks <number> --failed` lists only the failing checks; the summary line still counts the full rollup. `gh-axi pr checks` exits like `gh pr checks`: 1 when a check failed or no check results are reported for the PR head commit, 8 when a check is still pending, and 0 otherwise. `--watch` polls every 10 seconds (`--interval <seconds>` to change it) until no check is pending and then prints the final rollup; `--fail-fast` stops the watch at the first failing check. `gh-axi pr view <number> --checks` appends the same detailed rollup to the PR detail, `gh-axi pr list --fields updatedAt` adds a relative `updated_at` column (`search issues` and `search prs` take `--fields` too, for cross-repo columns such as `updatedAt`, `url` and `isDraft`), and `gh-axi pr diff` accepts `--patch` as a no-op for `gh` compatibility since its output is already patch format.
  125. `gh-axi stack` is a strict, non-interactive adapter over the official `github/gh-stack` extension. It supports `view`, `init`, `add`, `checkout`, `push`, `submit`, `sync`, `rebase`, `link`, `unstack`, `merge`, and branch navigation. It intentionally excludes the interactive `modify` and `switch` TUIs and the human-only `alias` and `feedback` utilities.
  126. Stack commands operate on local branches and `.git/gh-stack`, so run them from the target repository's working directory. They reject `-R`, `--repo`, and `GH_REPO` rather than pretending a remote repository is enough. `--hostname` remains available for authenticated GitHub Enterprise hosts.
  127. Agent-safe behavior is automatic: `stack view` requests JSON, `stack submit` adds `--auto`, and `stack merge` requires an explicit stack or PR target and adds `--yes`. Rebase conflicts and other extension exits retain their original exit codes and include recovery guidance.
  128. `gh-axi secret set <name>` reads the value only from piped stdin because secret flags would be visible in the `gh-axi` process argv.
  129. It rejects `--body`/`-b`. An interactive terminal with no value throws immediately instead of waiting. Secret values never appear in argv, stdout, or error text: an unknown flag is echoed by name only, with any `=value` stripped.
  130. `gh-axi secret list` never prints values, matching `gh secret list`.
  131. `gh secret list` and `gh variable list` have no `--limit` or other pagination flag, so `gh-axi secret list` and `gh-axi variable list` return every result in one call.
  132. `gh-axi secret list`, `set`, and `delete` accept `--env`/`-e <environment>` to scope a secret to a deployment environment; without it the repository scope is used.
  133. A missing or empty `--env`, conflicting `--env` flags, `--env-file`, other `gh secret` scopes (`--org`, `--user`, `--app`), and any unknown flag are rejected rather than silently falling back to the repository scope.
  134. `gh-axi variable` accepts `--body`/`-b` or piped stdin, and variable values are shown in `list` output because variables are not secret.
  135. A `variable set --body` value is visible in the `gh-axi` process argv, but it is piped to `gh variable set` so the child process does not receive it in argv.
  136. `gh-axi project` wraps GitHub Projects (v2). Reading projects requires the `read:project` or `project` OAuth scope; mutations, including field creation and deletion, require `project`. If a call fails on a missing scope, gh-axi tells you the `gh auth refresh -s <scope>` command to run.
  137. `--owner` defaults to the current repo's owner, falling back to explicit `@me` for the authenticated user.
  138. Create fields with `gh-axi project field-create <number> --name <name> --data-type TEXT|SINGLE_SELECT|DATE|NUMBER [--owner <login>]`. For example, `gh-axi project field-create 3 --name Priority --data-type SINGLE_SELECT --single-select-options P0,P1,P2,P3` returns the field id and option ids in TOON, ready for `project item-edit --field-id ... --single-select-option-id ...`. `--single-select-options` accepts comma-separated names and is repeatable. Delete a field by its global id with `gh-axi project field-delete --id <field-id>`; deletion does not take a project number or owner.
  139. `gh-axi project delete <number>` deletes only empty projects: it refuses when the project still has items or its item count cannot be determined, and otherwise reports the deleted project's title.
  140. `gh-axi gist create` requires `--public` or `--secret` explicitly — passing neither (or both) is an error.
  141. Gist visibility is fixed at creation; a secret gist is unlisted (anyone with the URL can read it), not private.
  142. Two file-on-disk input forms are available: positional paths (`gist create a.py b.py`) or repeatable `--file` flags (`gist create --file a.py --file b.py`); mixing the two is an error.
  143. To create a gist from piped content, use `--filename <name>` together with a pipe (`echo "..." | gh-axi gist create --filename foo.txt --public`).
  144. `gh-axi api` accepts `-X <method>` and `-X=<method>` as alternatives to the positional HTTP method, plus `--field`, `--raw-field`, `--header`, `--input <file>`, `--paginate`, `--allow-escape-sequences`, `--jq <expression>`, `--template <format>`, and `--full`.
  145. `--allow-escape-sequences` explicitly allows `gh` to print terminal escape sequences, for example in Actions job logs. It is forwarded to `gh` without changing gh-axi's output shaping or truncation. Without it, gh's default refusal remains in effect.
  146. `-R`/`--repo` (or `GH_REPO`) fills the `{owner}` and `{repo}` placeholders; `gh api` has no `--repo`, so gh-axi hands that repository to it as `GH_REPO`.
  147. Use `--input <file>` to send a raw JSON request body, or `--input -` to relay piped stdin byte for byte.
  148. `--input -` rejects an interactive terminal instead of waiting for input.
  149. `--raw-field <key=value>` (repeatable) forwards to `gh api --raw-field` and always sends the value as a JSON string, while `--field` is typed like `gh api -F` and turns numbers, `true`, `false` and `null` into JSON values. Use `--raw-field content=+1` for a value such as a `+1` reaction that must stay a string.
  150. Giving `-X` more than once or together with a positional method is rejected, as is any other unsupported flag, extra positional argument, or repeated `--input`/`--jq`/`--template`.
  151. JSON responses are normally stripped of noisy fields before TOON encoding, but a response you shaped yourself with `--jq` or `--template` keeps every key and value verbatim — only over-long strings are still truncated so one field cannot flood an agent's context.
  152. When a bare (non-JSON) `--jq`/`--template` result still exceeds the raw output limit, it is clamped and ends with `... (truncated)` so the cut is visible; pass `--full` to lift the cap.
  153. `--full` is an explicit opt-in escape hatch: it keeps every field and every complete value, and it also returns non-JSON response bodies without the length cap. `--full` is a gh-axi flag only, and gh-axi does not send it to `gh`. Compact output stays the default without `--full`.
  154. ### Commands
  155. | Command | Description |
  156. | ------------ | ---------------------------------------------------------------------------- |
  157. | `issue` | Issues — list, view, create, edit, close, reopen, comment, subissue |
  158. | `pr` | Pull requests — list, view, create, merge, review, checks |
  159. | `discussion` | Discussions (gh preview) - list, view with nested replies, comment or reply |
  160. | `stack` | Stacked branches and PRs - create, submit, sync, rebase, merge, navigate |
  161. | `run` | Existing workflow runs - list, view, watch, rerun, cancel, delete, download |
  162. | `workflow` | Workflows - list, view, run (trigger), enable, disable |
  163. | `release` | Releases — list, view, create, edit, delete |
  164. | `repo` | Repositories — list, view, create, edit, clone, fork |
  165. | `label` | Labels — list, create, edit, delete |
  166. | `gist` | Gists — list, view, edit, rename, create, delete, clone |
  167. | `project` | Projects (v2) - list, view, create, edit, close, copy, delete, items, fields |
  168. | `secret` | Actions secrets — list, set, delete |
  169. | `variable` | Actions variables — list, set, delete |
  170. | `search` | Search issues, PRs, repos, commits, code |
  171. | `api` | Raw GitHub API access |
  172. | `setup` | Install optional agent session hooks |
  173. | `update` | Built-in self-update command inherited from `axi-sdk-js` |
  174. ### Global flags
  175. - `--help` — show help for any command
  176. - `-v`, `-V`, `--version` — show the installed `gh-axi` version
  177. - `--hostname <host>` / `--hostname=<host>` - target a custom GitHub host; explicit flags win over `GH_HOST`. The flag must follow the command. gh-axi strips it before invoking `gh` and sets `GH_HOST` for that child only when the flag is present, leaving an existing `GH_HOST` untouched otherwise. `src/host.ts` `resolveHost()` (flag, then `GH_HOST`, then `github.com`) is the host used when building or parsing URLs.
  178. - `AXI_DEBUG=1` (env) - before each `gh` call, write `[axi-debug] gh <args>` to stderr: the exact argv gh-axi forwards, shell-quoted only where needed, so the part after the prefix pastes into a shell to retry the call in plain `gh`. For `api` calls, every `-H`/`--header` value is masked as `Name: ***`; other commands are traced unmasked. An argument with a newline or other control character is written as `$'...'` so each trace stays on one line. That form replays exactly in bash, zsh, and a POSIX.1-2024 `sh`. An older `sh` without `$'...'` reads it as one literal word, so the argument text differs but never runs as a command. Any other value, or unset, prints nothing. stdout is unchanged. The line shows argv only, not env such as a `GH_HOST` set from `--hostname` or the `GH_REPO` that carries `-R` to an `api` call.
  179. Repository and host targeting are command-first too:
  180. - `gh-axi issue list -R owner/name`
  181. - `gh-axi issue list --repo owner/name`
  182. - `gh-axi issue list --repo=owner/name`
  183. - `gh-axi run list -R owner/name`
  184. - `gh-axi repo view --repo owner/name`
  185. - `gh-axi search issues "login bug" --repo owner/name`
  186. - `gh-axi issue list --hostname git.example.com`
  187. `repo view` also accepts exactly one positional repository, `gh-axi repo view owner/name`, as a repo-view-specific compatibility exception for `gh repo view [<repository>]`. Do not combine that positional form with `--repo`, and do not pass extra positional arguments. For other commands, use the command-first `--repo owner/name` form.
  188. When a command also needs a destination repository, use a dedicated flag for it:
  189. - `gh-axi issue transfer 42 -R source/repo --to-repo dest/repo`
  190. ## Development
  191. ```sh
  192. pnpm run build # Compile TypeScript to dist/
  193. pnpm run build:skill # Regenerate skills/gh-axi/SKILL.md from src/skill.ts
  194. pnpm run dev # Run CLI directly with tsx
  195. pnpm test # Run tests with vitest
  196. pnpm run test:watch # Run tests in watch mode
  197. ```
  198. The committed `skills/gh-axi/SKILL.md` is generated from `src/skill.ts` by `pnpm run build:skill`; `pnpm test` fails if the generated file drifts.
  199. The generated skill intentionally defers all command guidance to the CLI dashboard and help output so installed copies do not duplicate stale instructions.
  200. `gh-axi update` is not implemented in this repo. `axi-sdk-js` registers it as a built-in and resolves the npm package name from the nearest `package.json`. The SDK also appends a `built-in:` section to top-level `--help` at runtime, so `TOP_HELP` in `src/cli.ts` is only a prefix of the help users see.
  201. `src/version.ts` imports Node builtins only. `bin/gh-axi.ts` answers a bare `-v`, `-V`, or `--version` from that leaf module and loads the command graph only for every other invocation. Do not add a wall-clock timing assertion to `test/version-fast-path.test.ts`. Compiled CLI tests share `dist`; `test/global-setup.ts` builds it, including on watch reruns. Do not rebuild from an individual suite while other workers may be running those tests.
  202. The npm package includes `skills/gh-axi/`, so published releases ship the same installable Agent Skill documented in Quick Start.
  203. ## License
  204. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.