⚓ firstmate field guide
The AXI ecosystem

The AXI tools firstmate uses

gh-axi, chrome-devtools-axi, tasks-axi, quota-axi and lavish-axi — install, core commands, and exactly where firstmate calls each one.

Tool Role in firstmate Floor Required
gh-axi every GitHub read and write by workers and merge checks 0.1.29 yes
chrome-devtools-axi browser work by workers presence yes
tasks-axi the backlog (data/backlog.md) and captain holds 0.2.6 + capability probes yes
quota-axi quota-aware dispatch among candidate profiles 0.1.51 yes
lavish-axi visual boards, plans and reviews 0.1.77 optional

Each floor is enforced by one owner file (bin/fm-bootstrap.sh, bin/fm-tasks-axi-lib.sh, bin/fm-quota-axi-lib.sh), so a version bump is one edit. An incompatible required tool blocks the capability it backs. It doesn't degrade silently. The one designed degradation is lavish-axi, which falls back to plain text.

All of them install the same way:

npx skills add kunchenguid/<tool> --skill <tool> -g      # skill only
npm install -g <tool> && <tool> setup hooks              # binary + SessionStart ambient context
npx -y <tool>                                            # zero setup, slower

-g installs the skill for all projects. The skills CLI may print PromptScript does not support global skill installation even when the install worked for your other agents; check for <tool>/SKILL.md in the agent's skills directory (for example ~/.claude/skills/) to confirm. Drop -g for a per-project install (.claude/skills/).

gh-axi#

gh-axi is a GitHub CLI for agents. It wraps gh, so gh auth login must be done first, and needs Node 20+.

gh-axi                                  # dashboard: live state, no args
gh-axi pr view 42
gh-axi discussion view 66 --comments  # read a discussion with replies nested under each comment
gh-axi issue list
gh-axi issue edit 42 --add-label bug
gh-axi issue close 42 --duplicate-of 17
gh-axi run view 123456 --job 789012 --log-failed
gh-axi workflow run ci.yml --ref main
gh-axi stack init model api ui && gh-axi stack submit --open     # stacked PRs (needs gh-stack ext)
echo -n "sk-..." | gh-axi secret set OPENAI_API_KEY

Multi-line bodies go through --body-file <path|->, never an editor. issue create and pr create need --body or --body-file unless --attach is given. A bare --title fails with VALIDATION_ERROR before any gh call, not gh's generic error (on main, ad26055).

gh-axi workflow view <id|name> --yaml prints the workflow file's YAML instead of its metadata.

gh-axi api takes a repeatable --raw-field <key=value> that always sends the value as a string. --field is typed: numbers, true, false and null become JSON values. A +1 reaction needs the string form:

gh-axi api POST /repos/{owner}/{repo}/issues/1/reactions --raw-field content=+1

A discussion command (list, view, comment) wraps gh's preview gh discussion (gh-axi 0.1.36). That release also added issue and PR attachment uploads, pr merge --admin, and repo create with --source, --push and --remote. view --comments nests each comment's replies under it. comment on a comment URL posts a reply under that comment.

pr review takes --match-head-commit <SHA>. It refuses to review when the PR head differs, and records the review on that commit. It needs exactly one of --approve, --request-changes, --comment (on main, 9de033a).

For an open PR, gh-axi pr view <n> prints merge_state right after checks: GitHub's merge state lowercased (clean, dirty, behind, blocked, ...). States that need action get a short hint; behind suggests gh-axi pr update-branch <n>. Merged and closed PRs omit it (on main, f5bbf71).

gh-axi pr view <n> --fields <a,b,c> returns exactly those gh pr view --json fields as TOON under pull_request, with complete values. It cannot be combined with --comments, --reviews, --checks or --full (on main, 3098da7). gh-axi issue view <n> --fields <a,b,c> does the same for issues, under issue: --fields blockedBy,blocking returns the native issue dependencies. It cannot be combined with --comments or --full (on main, 81313b3). Issue create takes repeatable --blocked-by/--blocking, and edit takes --add-/--remove-blocked-by and --add-/--remove-blocking (on main, a1c6935).

gh-axi pr checks exits like gh pr checks: 1 when a check failed or none are reported for the PR head commit, 8 when one is pending, 0 otherwise. --watch polls every 10 seconds (--interval <seconds> changes it) until nothing is pending. --fail-fast stops the watch at the first failing check (on main, 96e44e6). Like gh pr checks, only the latest run of each check counts. A re-run supersedes the earlier run, so a failure fixed by a passing re-run no longer shows in pr checks or the pr view summary (on main, 036f321).

gh-axi run view <id> --attempt <n> reads an earlier run attempt, logs included. The output then also reports attempt and head_sha. gh-axi fails with VALIDATION_ERROR when the attempt, run or job gh returns does not match the request (on main, 0626d2c).

gh-axi pr merge re-reads the PR after gh exits and reports status: merged, enqueued (merge queue) or auto-merge. Before, it always printed merged with status: ok (15b48df).

AXI_DEBUG=1 writes [axi-debug] gh <args> to stderr before each gh call. That is the exact argv gh-axi forwards, so you can paste it to retry in plain gh. For api calls, -H/--header values are masked. stdout is unchanged (on main, 0a63932). search issues and search prs take --fields. Search leaves out the cwd/GH_REPO context repo when you pass --owner or an org:/user:/repo: qualifier. An explicit --repo/-R still applies (af773be). Two or more qualifiers in one argument fail with VALIDATION_ERROR; pass them separately: gh-axi search prs 'is:open' 'author:@me' --owner octo (6231608).

issue close --duplicate-of <number|url> (or --reason duplicate) closes an issue as a duplicate. It requires gh >= 2.88.0 (97564fd). On an issue or PR that is already closed, nothing goes to gh. The output now names the options not applied (--comment, and for issues --reason/--duplicate-of) and points to issue comment/pr comment for the comment (on main, c200fbd). gh api has no --repo, so gh-axi api -R owner/repo now hands the repository to it as GH_REPO, which fills {owner}/{repo} (5c4e7af).

In firstmate:

  • fm-dod-lib.sh requires gh-axi pr view <n> to confirm draft: no (and runs gh-axi pr ready if needed) before a no-mistakes PR counts as ready.
  • fm-teardown.sh resolves a branch's PR with gh-axi pr list --state all --head <branch>.
  • fm-pr-merge.sh falls back to gh-axi pr view for the post-merge read.

chrome-devtools-axi#

chrome-devtools-axi wraps chrome-devtools-mcp behind an AXI CLI.

$ chrome-devtools-axi open https://example.com
page: {title: "Example Domain", url: "https://example.com", refs: 1}
snapshot:
RootWebArea "Example Domain"
  heading "Example Domain"
  uid=g1:1 link "More information..."
help[1]: Run `chrome-devtools-axi click @g1:1` to click the "More information..." link

$ chrome-devtools-axi click @g1:1

Refs carry a generation prefix (g1:). A stale ref fails loudly with STALE_REF instead of silently doing nothing. The skill tells agents to re-verify state changes with a fresh snapshot before claiming success. It scored 100% in the browser benchmark at the lowest cost (AXI).

The bridge is detached and runs until chrome-devtools-axi stop, though it now exits by itself when its chrome-devtools-mcp process dies. To clean up after sessions that never stop it, set CHROME_DEVTOOLS_AXI_IDLE_TIMEOUT_MS (minimum 1000): the bridge, its MCP process and any browser it launched shut down after that long with no command. The bare home view, which setup hooks shows at agent session start, doesn't count as activity, so new sessions don't keep an abandoned bridge alive (on main after 0.1.36, 77a044b).

CHROME_DEVTOOLS_AXI_EXECUTABLE_PATH launches a specific Chrome binary instead of the installed Chrome. It applies only when the tool launches the browser, and is ignored with CHROME_DEVTOOLS_AXI_AUTO_CONNECT and CHROME_DEVTOOLS_AXI_BROWSER_URL. For launched browsers it takes precedence over CHROME_DEVTOOLS_AXI_CHANNEL. On macOS, use a Chrome for Testing build: a headless copy of the installed Chrome can receive links clicked in other apps (on main, 13260d5).

CHROME_DEVTOOLS_AXI_DESCRIPTION replaces the home view's description line. An empty string omits the line but keeps the session status and help (on main, 0b94b40).

newpage and selectpage take --no-snapshot, which prints only the page metadata, without the accessibility tree or its suggestions. Capture still runs, so ref generations stay fresh. It takes precedence over --full. Use it before eval, not for UID-based click/fill (on main, 73d1020).

The bridge forwards CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS and CI to the chrome-devtools-mcp process it launches, so that server's usage-statistics opt-out now works (on main, 30d5e29).

open and newpage take --timeout <ms>, or set CHROME_DEVTOOLS_AXI_NAVIGATION_TIMEOUT_MS. The flag wins. It overrides chrome-devtools-mcp's 10-second navigation default. An invalid value is a usage error (on main, ecb14d6).

newpage --context <name> opens the tab in a separate browser context with its own cookies and storage, so one browser can hold two sign-ins. Later newpage --context calls with the same name join it. Names use 1-64 characters from [A-Za-z0-9._-], not starting with -. A name lasts only while the bridge runs (on main, 1dbdac1).

reload [--full] reloads the selected page and prints a snapshot. press sends keys to the page through CDP, not as browser commands, so shortcuts like Meta+R, Ctrl+R and Meta+L do nothing (on main, abfb414).

tasks-axi#

tasks-axi is a task and backlog manager for agents. It edits a hand-editable backlog.md in place with a byte-exact round-trip. It borrows the dependency graph and ready-query model from beads.

Every backlog mutation today regenerates markdown through the model, which is expensive output tokens and risks dropped, duplicated, or reordered items. — tasks-axi README

tasks-axi                                     # dashboard: in_flight, summary, queued, done
tasks-axi add fix-login-q3 "fix flaky login test" --kind ship --repo xyz --priority 2 --start
tasks-axi done fix-login-q3 --pr https://github.com/you/xyz/pull/42
tasks-axi block a-task --by other-task
tasks-axi hold a-task --reason "captain decision pending" --kind captain
tasks-axi unhold a-task
tasks-axi ready [--include-held]
tasks-axi show a-task --full
tasks-axi update a-task --body "rewritten" --archive-body
tasks-axi prune --keep 10                     # archives, never deletes
tasks-axi mv a b --to ../other-home/data/backlog.md   # atomic multi-ID move

In firstmate:

  • .tasks.toml points it at data/backlog.md with done_keep = 10.
  • Captain holds are tasks-axi holds (--kind captain).
  • Secondmate handoffs always use tasks-axi mv.
  • Firstmate probes the actual --help surface for --archive-body and multi-ID mv, not just the version.
  • config/backlog-backend=manual opts a home out for routine edits.

quota-axi#

Your agent needs to be aware of your quota.

It reports quota windows for Claude, Codex, Cursor, Copilot, Grok, Kimi, Z.AI, Alibaba, OpenCode Go, Antigravity, MiniMax, DeepSeek, OpenRouter, Devin, Muse and more, in one call. It is data only. It never routes, recommends, proxies or logs in. It is local-first and hits first-party endpoints only.

$ npx -y quota-axi --provider claude,codex,cursor,grok
quota[n]{provider,scope,effectivePercentRemaining,spendPriority,runway,confidence,limitedBy,resetsAt}: ...
exhaustion[n]{provider,scope,usableRunwaySeconds,projectedExhaustedAt,limitingWindowId}: ...
attention[n]{provider,scope,kind,detail,remedy}: ...
help[1]: Run `quota-axi --full` for windows, pace, reserve, and account evidence
  • To read native secure stores (the macOS Keychain, etc.), grant consent once with quota-axi --allow-keychain-prompt.
  • Setting QUOTA_AXI_CLAUDE_PROFILES to a list of Claude config directories (:-separated on macOS and Linux) opts into one lane per Claude profile, each with its own key and cache slot. Unset, Claude stays one selected lane (on main, 9b66e34).
  • Codex has the same opt-in. QUOTA_AXI_CODEX_HOMES lists absolute Codex home directories (:-separated on macOS and Linux, ; on Windows). Each becomes its own codex-home:<digest> lane that reads only its own auth.json and has its own cache slot. A relative entry fails with VALIDATION_ERROR. Unset, Codex discovery is unchanged (on main, 053d364).
  • QUOTA_AXI_CLAUDE_SWAP=1 is a second opt-in. It reports one claude-swap:<digest> lane per account that the third-party claude-swap lists in its read-only cswap list --json, and takes no credential from it (on main, 5e50b51).
  • Copilot quota for a GitHub Enterprise Cloud host is opt-in: set QUOTA_AXI_COPILOT_HOST=<subdomain>.ghe.com and the gh login for that host is used instead of github.com. Any value that is not a *.ghe.com host is ignored (on main, 91dc7dd).
  • Kun also mentions a human dashboard, quota-axi --tui. quota-axi 0.1.60 adds opt-in light and system-appearance themes for it.
  • tui.accountLabels in ~/.config/quota-axi/config.json maps a Claude config directory to a name, so that lane's TUI card reads claude · posam. A key can also be the exact account key, such as claude-swap:9a1c20d6b88a9bcec745fb70; claude-swap lanes need this because they have no locator path. A relative path names nothing (b3ccf8e). The labels never reach TOON, --json, --full, or the cache (on main, 97fad39).
  • In firstmate: the quota-array-dispatch skill ranks candidate worker profiles by spendPriority after its eligibility, reasoning-class and runway gates. See Scaling.

lavish-axi#

HTML is the new markdown. Lavish is the new editor for your HTML artifacts. — @kunchenguid, 2026-05-12

Lavish opens agent-generated HTML locally. You annotate elements or selected text, edit Mermaid diagrams, and click buttons, and your feedback goes back to the agent. At launch Kun wired in Tailwind and daisyUI, because "almost half of tokens while generating HTML are spent on stylesheets". Current versions no longer auto-inject them. The agent picks a design direction from lavish-axi design (the DESIGN_PRIORITY_RULE), and the packaged assets stay available for older artifacts (docs/invariants.md).

npx skills add kunchenguid/lavish-axi --skill lavish
npm install -g lavish-axi && lavish-axi setup hooks     # or: setup plugin (VS Code / Cursor / Copilot CLI)
lavish-axi plan.html            # open or attach a review session
lavish-axi plan.html --reopen

Kun's use: "i just ask the agent 'review the PR with me in lavish'... key decisions are then rendered as buttons and inputs for me to quickly decide."

The npm release sends anonymous Umami telemetry by default: the command name, the Lavish version, platform and arch, with no arguments, file paths or content. --version (-v, -V) sends none. Set LAVISH_AXI_TELEMETRY=0 (or false or off) to turn it off (on main, 18cb923).

The browser tab takes the artifact's <title> and first <link rel="icon"> when it loads. A long-lived artifact can opt in to keep the tab current with window.lavish?.setDocumentMeta?.({ title, icon }). The title is trimmed to 120 characters; the icon must be a data:image/svg+xml URL of at most 8192 characters (on main, 0e2d3de).

On wider screens, the sidebar button in the top bar hides the Conversation panel so the artifact takes the full width. While it is hidden, the button counts queued notes or marks an agent reply you have not seen. The choice is remembered in this browser for every review (on main, 94b9493).

Behind a reverse proxy, set LAVISH_AXI_PUBLIC_URL to an http(s) origin (optional port; no path, query or wildcard host). It replaces the whole session-link origin, taking precedence over MagicDNS and LAVISH_AXI_LINK_HOST, without changing binding. Its hostname is allowed automatically. An invalid value fails startup (on main, 0159b44).

Unsent queued notes belong to the tab where you typed them, kept in that tab's sessionStorage. Take over here in another window does not bring them along. An empty Send to Agent says "Nothing queued in this tab." (on main, 741ea83).

In firstmate:

  • /bearings lavish builds the interactive fleet board at $FM_HOME/.lavish/bearings-board.html (bin/fm-bearings-board.sh). "A live session is proved, never assumed."
  • bin/fm-procevent-lavish.sh turns board clicks into process events. Decision answers feed fm-captain-hold.sh answers.
  • Missing or below the 0.1.77 floor → PRESENTATION_UNAVAILABLE, and everything continues in plain text.
  • With lavish-axi 0.1.80 or newer, a worker's board reply is posted through lavish-axi reply and the server's acceptance is confirmed before the listener is armed. 0.1.77–0.1.79 keep the old staged reply, which can't confirm acceptance, and bootstrap recommends upgrading.
  • config/lavish-axi-host sets a per-machine server address.
  • /lavish-url <url> [--mobile] captures any http or https page, public or local, into an annotatable Lavish review with [Fix Layout], [Update Text] and [Mobile Bug] chips (bin/fm-lavish-url.sh). Feedback is filed to the backlog of the registered project that owns the site, mapped through config/lavish-url-domains; an uncertain site goes to you for a decision (bc9370e).
  • lavish-axi 0.1.83 adds per-note emoji delivery receipts (seen, working, done). Ctrl-click (Cmd-click on macOS) follows a link in annotate mode. Off macOS, Meta-click annotates like a plain click (on main, 7cc7a4d).
  • lavish-axi 0.1.85's whiteboard loads user Excalidraw libraries and renders library icon nodes.
  • data-lavish-annotate="off" on the root <html> makes an artifact start in explore mode, so stray clicks don't open annotation cards. The toolbar can override it, and the reviewer's choice persists across artifact reloads (on main, fac7c00).
  • Closing the last review tab during a poll starts a reconnect grace, 10 seconds by default. A phone that locks or backgrounds the tab drops the connection too. Set LAVISH_AXI_DISCONNECT_GRACE_MS to a longer millisecond budget, or to 0 or off so a disconnect never ends the poll (on main, 1ea519f).
  1. node, git, gh + gh auth login
  2. no-mistakes (see no-mistakes)
  3. gh-axi, chrome-devtools-axi (with setup hooks)
  4. tasks-axi
  5. quota-axi (+ --allow-keychain-prompt if needed)
  6. your backend's tool + treehouse (skip treehouse for Orca)
  7. optional: lavish-axi

In practice you can skip the manual steps. The first mate's bootstrap lists exactly what's missing and installs the supported ones after one "yes".

Unofficial guide built 2026-09-26 from kunchenguid/firstmate, the AXI repos, and Kun Chen's public posts. The repo moves daily; when this guide and the repo disagree, the repo wins.