tools/agent-facing-clis.md

What this is

Agent-facing CLIs are thin, composable command surfaces designed for agents rather than humans alone. They sit between raw systems and the agent, exposing the smallest useful set of search, read, export, draft, upload, or safe-write operations in a way that fits command-line reasoning.

Design properties

Strong agent-facing CLIs tend to have:

  • explicit verbs
  • stable flags
  • machine-readable output
  • exact reads by stable ID
  • pagination / narrowing controls
  • good --help
  • predictable error behavior
  • clear read vs write boundaries

Why they matter

The gain is not just convenience. The gain is composability.

Agents can:

  • inspect help
  • run a narrow search
  • resolve an ID
  • fetch only the needed object
  • export full payloads to a file
  • chain one command into the next

That is often a better fit than pasting giant raw payloads into the thread.

Pair with skills

A CLI alone is not enough. The companion skill should specify:

  • when to use the CLI
  • which commands to try first
  • how much output to pull back
  • where files land
  • which mutating actions require explicit approval

Example use cases

  • session / archive search
  • Slack or chat retrieval
  • issue evidence retrieval
  • log bundle inspection
  • draft-by-default content workflows
  • file download from plugin- or API-discovered records

Practical rule

Prefer an agent-facing CLI when the same messy source keeps showing up and the agent repeatedly needs search, exact reads, narrowing, export, or bounded writes. Do not build one just to feel organized.