Overview
This section is for Audience B — people building AI coding agents that drive
a2acli (Claude Code, OpenCode, Cursor, Copilot CLI, Gemini CLI, and other
skill- or plugin-aware runtimes). It explains the two packaging formats the
repository ships, the one invariant that underpins both, and the rules an agent
must follow to invoke a2acli deterministically.
If you run a2acli yourself from a terminal, you want the
Direct-usage tutorial instead.
Agent Skills and the Agent Plugin
Section titled “Agent Skills and the Agent Plugin”The repository ships the same capability in two overlapping formats. Both teach
an agent how to use a2acli; neither ships the tool itself.
An Agent Skill
Section titled “An Agent Skill”An Agent Skill is an agentskills.io-compliant
package — a SKILL.md file plus optional progressive-disclosure resources
(references/, scripts/, assets/) — that teaches an agent to perform a
specialized task deterministically. Skills load in three stages:
- Startup index — the agent reads each skill’s
name+description(~100 tokens per skill) to know when it applies. - Activation — when a prompt matches, the agent loads the full
SKILL.mdbody. - On-demand resources — the agent reads
references/,scripts/, orassets/only as it needs them.
The repository ships three skills under skills/: a2acli, a2a-expose,
and a2a-conformance. See the Skills reference
for what each does and what it ships.
The Agent Plugin
Section titled “The Agent Plugin”An Agent Plugin is an Agent Plugins Specification v1.0.0
package: a plugin.json manifest that bundles agent-facing pieces — skills and,
optionally, MCP servers — into one installable unit for a plugin-aware client.
The a2acli plugin is skills-only (it carries no MCP server, which is valid
under the spec). It is available two ways:
- The repository root itself is the canonical plugin package: the root
plugin.json(namea2acli, targeting Agent Plugins spec1.0.0) plus the fullskills/tree — all three skills with theirreferences/,scripts/, andassets/. agent-plugin/is a second, self-contained, official-shaped package that mirrorsa2aproject/a2a-cli’s layout: its ownplugin.jsonplus a singleskills/a2acli/SKILL.md, which is a deliberately thin pointer back to the canonical root skill.
The binary is installed separately
Section titled “The binary is installed separately”Both packages teach; neither bundles the tool. Agent Plugins packages the
agent-facing pieces (skills and MCP servers), not tool binaries, so the
a2acli binary is never shipped inside a skill or plugin. It must be
installed on PATH independently — via Homebrew
(brew install ghchinoy/tap/a2acli), a prebuilt release, install.sh, or
go install.
Because of this, every skill starts with a preflight: run a2acli version
before doing anything else, and if it is missing, install it or fail cleanly —
never guess.
a2acli versionSee Installation for every install method.
Determinism rules for agents
Section titled “Determinism rules for agents”An agent driving a2acli in a non-interactive environment must follow these
rules. They come straight from the canonical a2acli skill’s “Critical Rules”
block.
- Always pass
--output json(or-n). This disables the interactive Bubble Tea TUI and emits a single machine-readable JSON document (JSONL when--streamis used). On failure the spec error envelope is printed on stdout ({"error": {"code": "A2ACLI_ERR_…", "message": "…", "hint": "…", "a2aCode": …}}) while diagnostics go to stderr. Without this flag the CLI degrades in non-TTY contexts. sendblocks by default. It waits until the task reaches a terminal state and returns a single JSON document — no flag needed. Pass--streamonly when you want to observe the live JSONL event stream (SPEC §11.3).- Check
status.statein the output to determine the outcome:TASK_STATE_COMPLETEDfor success,TASK_STATE_FAILEDfor failure. - Read exit codes:
0success,2usage error,1any other failure. These are stable across flat verbs and their noun-verb aliases.