AI agents usually learn a new ability from a skill, which is a Markdown file of instructions the agent reads before it starts work. When written instructions are the wrong tool for a task, I prefer to build an opinionated command-line interface (CLI): a tool that accepts only well-formed input and says exactly what is wrong with anything else. The agent's skill then just points to that tool. This document covers when this approach fits, why it works, and how I build and improve the CLI over time.
Build a CLI when one wrong call is a failure. This usually means the agent acts on something outside itself, such as querying a database, calling an API, or deploying code. A single unescaped quote breaks the request, even in a toy project, so code should own correctness.
Write a skill made only of instructions when the result is judged on quality. Examples include rewriting in a style, reviewing a draft, or guiding a