Skip to content

Commit ccc9e2b

Browse files
authored
feat(axi): add AXI skill plugin to marketplace (#228)
Add the AXI (Agent eXperience Interface) skill plugin, which provides ergonomic standards and conventions for building agent-facing CLI tools. Sourced from github.com/kunchenguid/axi via skills.sh (bunx skills add). - .claude-plugin/marketplace.json: added axi entry (source of truth) - .agents/plugins/marketplace.json: regenerated Codex marketplace with axi - plugins/axi/: new plugin directory with skill files and skills-lock.json - plugins/axi/.claude-plugin/plugin.json: Claude Code manifest - plugins/axi/.codex-plugin/plugin.json: Codex manifest (multi-format) - plugins/axi/plugin.json: Antigravity manifest (multi-format) - release-please-config.json: added plugins/axi package with 3 manifests - .release-please-manifest.json: added plugins/axi version 1.0.0 - README.md: added AXI entry under Built-in Plugins
1 parent 5909d20 commit ccc9e2b

10 files changed

Lines changed: 330 additions & 1 deletion

File tree

.agents/plugins/marketplace.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,18 @@
819819
"authentication": "ON_INSTALL"
820820
},
821821
"category": "Tooling"
822+
},
823+
{
824+
"name": "axi",
825+
"source": {
826+
"source": "local",
827+
"path": "./plugins/axi"
828+
},
829+
"policy": {
830+
"installation": "AVAILABLE",
831+
"authentication": "ON_INSTALL"
832+
},
833+
"category": "Productivity"
822834
}
823835
]
824836
}

.claude-plugin/marketplace.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,11 @@
758758
"repo": "cloudflare/skills"
759759
},
760760
"homepage": "https://github.com/cloudflare/skills"
761+
},
762+
{
763+
"name": "axi",
764+
"description": "Agent eXperience Interface (AXI) — ergonomic standards for building CLI tools that agents use via shell execution. Use when building, modifying, or reviewing any agent-facing CLI.",
765+
"source": "./plugins/axi"
761766
}
762767
]
763768
}

.release-please-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@
6262
"plugins/skill-optimizer": "1.1.0",
6363
"plugins/nostics": "1.0.0",
6464
"plugins/dev3000": "1.0.0",
65-
"plugins/lavish": "1.0.0"
65+
"plugins/lavish": "1.0.0",
66+
"plugins/axi": "1.0.0"
6667
}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,12 @@ Turn complex or visual agent responses into rich, reviewable HTML artifacts the
428428

429429
**Install:** `/plugin install lavish@pleaseai` | **Source:** [plugins/lavish](https://github.com/pleaseai/claude-code-plugins/tree/main/plugins/lavish)
430430

431+
#### AXI
432+
433+
Agent eXperience Interface (AXI) — ergonomic standards for building CLI tools that agents use via shell execution. Use when building, modifying, or reviewing any agent-facing CLI.
434+
435+
**Install:** `/plugin install axi@pleaseai` | **Source:** [plugins/axi](https://github.com/pleaseai/claude-code-plugins/tree/main/plugins/axi)
436+
431437
## Quick Start
432438

433439
The fastest way to get started — install the marketplace and let the plugin recommender auto-detect what you need:
Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
---
2+
name: axi
3+
description: >
4+
Agent eXperience Interface (AXI) — ergonomic standards for building CLI tools that agents
5+
use via shell execution. Use when building, modifying, or reviewing any agent-facing CLI.
6+
---
7+
8+
# Agent eXperience Interface (AXI)
9+
10+
AXI defines ergonomic standards for building CLI tools that autonomous agents interact with through shell execution.
11+
12+
## Before you start
13+
14+
Read the [TOON specification](https://toonformat.dev/reference/spec.html) before building any AXI output.
15+
16+
## 1. Token-efficient output
17+
18+
Use [TOON](https://toonformat.dev/) (Token-Oriented Object Notation) as the output format on stdout.
19+
TOON provides ~40% token savings over equivalent JSON while remaining readable by agents.
20+
Convert to TOON at the output boundary — keep internal logic on JSON.
21+
22+
```
23+
tasks[2]{id,title,status,assignee}:
24+
"1",Fix auth bug,open,alice
25+
"2",Add pagination,closed,bob
26+
```
27+
28+
## 2. Minimal default schemas
29+
30+
Every field in stdout costs tokens — multiplied by row count in collections.
31+
Default to the smallest schema that lets the agent decide what to do next: typically an identifier, a title, and a status.
32+
33+
- Default list schemas: 3-4 fields, not 10
34+
- Default limits: high enough to cover common cases in one call (if most repos have <100 labels, default to 100, not 30)
35+
- Long-form content (bodies, descriptions) belongs in detail views, not lists
36+
- Offer a `--fields` flag to let agents request additional fields explicitly
37+
38+
## 3. Content truncation
39+
40+
Detail views often contain large text fields. Omitting them forces agents to hunt; including them wastes tokens.
41+
Truncate by default and tell the agent how to get the full version.
42+
43+
```
44+
task:
45+
number: 42
46+
title: Fix auth bug
47+
state: open
48+
body: First 500 chars of the issue body...
49+
... (truncated, 8432 chars total)
50+
help[1]: Run `tasks view 42 --full` to see complete body
51+
```
52+
53+
- Never omit large fields entirely — include a truncated preview
54+
- Show the total size so the agent knows how much it's missing
55+
- Suggest the escape hatch (`--full`) only when content is actually truncated
56+
- Choose a truncation limit that covers most use cases (500-1500 chars)
57+
58+
## 4. Pre-computed aggregates
59+
60+
The most expensive token cost is often not a longer response — it's a follow-up call. If your backend has data that agents commonly need as a next step, compute it and include it.
61+
62+
**Aggregate counts**: include the **total count** in list output, not just the page size. Agents need "how many are there?" and will paginate if the answer isn't definitive.
63+
64+
```
65+
count: 30 of 847 total
66+
tasks[30]{number,title,state}:
67+
1,Fix auth bug,open
68+
...
69+
```
70+
71+
**Derived status fields**: when the next step almost always involves checking related state, include a lightweight summary inline.
72+
73+
```
74+
task:
75+
number: 42
76+
title: Deploy pipeline fix
77+
state: open
78+
checks: 3/3 passed
79+
comments: 7
80+
```
81+
82+
Only include derived fields your backend can provide cheaply — a summary ("3/3 passed"), not the full data.
83+
84+
## 5. Definitive empty states
85+
86+
When the answer is "nothing", say so explicitly. Ambiguous empty output causes agents to re-run with different flags to verify.
87+
88+
```
89+
$ tasks list --state closed
90+
tasks: 0 closed tasks found in this repository
91+
```
92+
93+
State the zero with context. Make it clear the command succeeded — the absence of results is the answer.
94+
95+
## 6. Structured errors & exit codes
96+
97+
### Idempotent mutations
98+
99+
Don't error when the desired state already exists. If the agent closes something already closed, acknowledge and move on with exit code 0. Reserve non-zero exit codes for situations where the agent's intent genuinely cannot be satisfied.
100+
101+
```
102+
$ tasks close 42
103+
task: #42 already closed (no-op) # exit 0
104+
```
105+
106+
### Structured errors on stdout
107+
108+
Errors go to **stdout** in the same structured format as normal output, so the agent can read and act on them. Include what went wrong and an actionable suggestion. Never let raw dependency output (API errors, stack traces) leak through.
109+
110+
```
111+
error: --title is required
112+
help: tasks create --title "..." [--body "..."]
113+
```
114+
115+
- Validate required flags before calling any dependency
116+
- Translate errors — extract actionable meaning, discard noise
117+
- Never leak dependency names — suggestions reference your CLI's commands, not the underlying tool
118+
119+
### No interactive prompts
120+
121+
Every operation must be completable with flags alone. If a required value is missing, fail immediately with a clear error — don't prompt for it. Suppress prompts from wrapped tools.
122+
123+
### Output channels
124+
125+
- **stdout**: all structured output the agent consumes — data, errors, suggestions
126+
- **stderr**: debug logging, progress indicators, diagnostics (agents don't read this)
127+
- **Exit codes**: 0 = success (including no-ops), 1 = error, 2 = usage error
128+
129+
Never mix progress messages into stdout. An agent that reads "Fetching data..." will try to interpret it as data.
130+
131+
## 7. Ambient context via session integrations
132+
133+
Register your tool into the agent's session lifecycle so every conversation starts with relevant state already visible — before the agent takes any action.
134+
135+
**Pattern:**
136+
137+
1. Provide an explicit setup command that installs or repairs a session hook or plugin after user intent is clear
138+
2. At session start, the integration runs your tool and provides a compact dashboard as context
139+
3. The agent receives this as initial context and can act immediately
140+
141+
```
142+
# Agent sees this at session start — no invocation needed:
143+
specs[2]{id,title,status}:
144+
1,Fix auth bug,open
145+
2,Add pagination,in-progress
146+
147+
help[2]:
148+
Run `mytool specs view 1` for details
149+
Run `mytool specs create --title "..."` to add a spec
150+
```
151+
152+
**Rules:**
153+
154+
- **Default app targets**: by default, support Claude Code, Codex, and OpenCode. Do not hard-code a single agent integration when the tool can reasonably support multiple agents
155+
- **Explicit opt-in**: register hooks or plugins only from a user-invoked setup command, not from ordinary CLI commands
156+
- **Portable commands**: hook commands should use a PATH-verified binary name when it resolves to the current executable, and fall back to the full absolute path otherwise. This keeps global installs portable while ensuring hooks do not accidentally run a different binary
157+
- **Path repair**: setup commands should check existing hooks and update the executable path if it has changed (e.g., after reinstall or relocation)
158+
- **Idempotent**: repeated installs with the same path are silent no-ops
159+
- **Directory-scoped**: show only state relevant to the current working directory
160+
- **Token-budget-aware**: this context loads on _every_ session — ruthlessly minimize it. Include just enough for the agent to orient and act; deep data belongs in explicit invocations
161+
- **Lifecycle capture**: use session-end hooks to capture what happened (transcripts, files touched, specs referenced) so future session-start context gets richer over time
162+
163+
**How to integrate with each app:**
164+
165+
- **Claude Code**: use native hooks in `~/.claude/settings.json` or project `.claude/settings.json`. Prefer `SessionStart` to inject compact context via stdout
166+
- **Codex**: use native hooks in `~/.codex/hooks.json` or `<repo>/.codex/hooks.json`, and ensure `[features].hooks = true` in `config.toml`. Prefer `SessionStart` for ambient context via stdout
167+
- **OpenCode**: use a managed plugin in `~/.config/opencode/plugins/`. Prefer ambient system-context injection for the home view rather than adding a custom tool
168+
169+
**Also ship an installable skill (secondary recommendation):**
170+
171+
The session hook is the primary integration, but it only helps agents whose harness supports hooks, and it loads on _every_ session.
172+
Offer an installable [Agent Skill](https://agentskills.io) as a secondary discovery path.
173+
It loads on demand when the agent recognizes a matching task, carries no per-session token cost, and works in any agent that supports the skill format.
174+
Recommend the hook first (ambient context plus live state) and the skill second (lower overhead, broader agent support) - they are complementary, and a user installs whichever fits, or both.
175+
176+
```sh
177+
npx skills add <owner>/<repo> --skill <name>
178+
```
179+
180+
- **Single source of truth**: generate `SKILL.md` from the same content your no-args home view prints, so the skill never drifts from the CLI's own guidance. Add a `--check` build step to CI that fails if the committed skill is stale
181+
- **Strip live state**: a skill is static, so omit dynamic data (open sessions, current items) that only the hook can show
182+
- **Non-interactive commands**: rewrite command examples to a form the agent can run without a global install (e.g. `npx -y mytool ...`), since a skill may be installed without the binary on PATH
183+
- **Trigger-shaped frontmatter**: include `name` and a `description` written as a trigger — terse and outcome-focused so the agent loads it on the right intent
184+
- **Document both paths**: in your README, present the hook and the skill as two ways to achieve the same thing, and make clear the user only needs one
185+
186+
## 8. Content first
187+
188+
Running your CLI with no arguments should show the most relevant live content — not a usage manual.
189+
When an agent sees actual state it can act immediately. When it sees help text, it has to make a second call.
190+
191+
```
192+
$ tasks
193+
tasks[3]{id,title,status}:
194+
1,Fix auth bug,open
195+
2,Add pagination,open
196+
3,Update docs,closed
197+
help[2]:
198+
Run `tasks view <id>` to see full details
199+
Run `tasks create --title "..."` to add a task
200+
```
201+
202+
## 9. Contextual disclosure
203+
204+
Include **a few next steps** that follow logically from the current output.
205+
The agent discovers your CLI's surface area organically by using it, not by reading a manual upfront.
206+
207+
Rules:
208+
209+
- **Relevant**: after an open item → suggest closing; after an empty list → suggest creating; after a list → suggest viewing
210+
- **Actionable**: every suggestion is a complete command (or template) carrying forward any disambiguating flags from the current invocation (e.g., `--repo`, `--source`)
211+
- **Parameterize dynamic values**: when a suggested command needs a runtime value such as an ID, title, branch, URL, or path, use placeholders like `<id>` or `"<title>"` instead of guessing a concrete value that may mislead the agent
212+
- **Omit when self-contained**: when the output fully answers the query (a detail view, a count, a confirmation), suggestions are noise — leave them out. Include them on list and mutation responses where the next step isn't obvious.
213+
- **Guide discovery, not workflows**: suggest a variety of possible next actions, don't prescribe a fixed sequence. An agent that already knows what it wants should never be nudged into an extra step.
214+
- **Reveal truncated lists**: when a list shows only the most recent N items out of a larger total, add a help hint telling the agent how to see all of them (e.g., `Run 'mytool list' for all 47 items`). Don't encode pagination into TOON array headers — use help hints instead.
215+
- **Resolve errors**: on errors, suggest the specific command that fixes the problem, not "see `--help`"
216+
217+
## 10. Consistent way to get help
218+
219+
The top-level home view should also identify the tool itself before the live data:
220+
221+
- Include the absolute path of the current executable, with the user's home directory collapsed to `~`
222+
- Include a one-sentence description of what this AXI does
223+
224+
```
225+
$ tasks
226+
bin: ~/.local/bin/tasks
227+
description: Manage project tasks in the current workspace
228+
...
229+
```
230+
231+
Every subcommand should support `--help` with a concise, complete reference: available flags with defaults, required arguments, and 2-3 usage examples. Keep it focused on the requested subcommand — don't dump the entire CLI's manual.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "axi",
3+
"version": "1.0.0",
4+
"description": "Agent eXperience Interface (AXI) — ergonomic standards for building CLI tools that agents use via shell execution. Use when building, modifying, or reviewing any agent-facing CLI.",
5+
"license": "MIT",
6+
"keywords": ["axi"],
7+
"skills": "./.agents/skills/"
8+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "axi",
3+
"version": "1.0.0",
4+
"description": "Agent eXperience Interface (AXI) — ergonomic standards for building CLI tools that agents use via shell execution. Use when building, modifying, or reviewing any agent-facing CLI.",
5+
"author": {
6+
"name": "Community"
7+
},
8+
"interface": {
9+
"displayName": "Axi",
10+
"shortDescription": "Agent eXperience Interface (AXI) — ergonomic standards for building CLI tools that agents use via shell execution",
11+
"longDescription": "Agent eXperience Interface (AXI) — ergonomic standards for building CLI tools that agents use via shell execution. Use when building, modifying, or reviewing any agent-facing CLI.",
12+
"developerName": "Community",
13+
"category": "Productivity",
14+
"capabilities": [
15+
"Skill"
16+
],
17+
"defaultPrompt": [
18+
"Help me use Axi for my current task."
19+
]
20+
},
21+
"license": "MIT",
22+
"keywords": [
23+
"axi"
24+
]
25+
}

plugins/axi/plugin.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "axi",
3+
"version": "1.0.0",
4+
"description": "Agent eXperience Interface (AXI) — ergonomic standards for building CLI tools that agents use via shell execution. Use when building, modifying, or reviewing any agent-facing CLI.",
5+
"license": "MIT",
6+
"keywords": [
7+
"axi"
8+
]
9+
}

plugins/axi/skills-lock.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": 1,
3+
"skills": {
4+
"axi": {
5+
"source": "kunchenguid/axi",
6+
"sourceType": "github",
7+
"skillPath": ".agents/skills/axi/SKILL.md",
8+
"computedHash": "e3993d4b3be5c816b83a0957951906d3223dd4e6df2f19869eef6607170b6838"
9+
}
10+
}
11+
}

release-please-config.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,27 @@
995995
"jsonpath": "$.version"
996996
}
997997
]
998+
},
999+
"plugins/axi": {
1000+
"release-type": "simple",
1001+
"component": "axi",
1002+
"extra-files": [
1003+
{
1004+
"type": "json",
1005+
"path": ".claude-plugin/plugin.json",
1006+
"jsonpath": "$.version"
1007+
},
1008+
{
1009+
"type": "json",
1010+
"path": ".codex-plugin/plugin.json",
1011+
"jsonpath": "$.version"
1012+
},
1013+
{
1014+
"type": "json",
1015+
"path": "plugin.json",
1016+
"jsonpath": "$.version"
1017+
}
1018+
]
9981019
}
9991020
},
10001021
"release-type": "node",

0 commit comments

Comments
 (0)