coding-agents
Agent CLI Standards: Taming Machine-Facing Command Lines
Learn how agent-cli-standards shapes stable, LLM-safe CLI contracts for agents driving native apps via argv sentinels and thin bridges.
Where this fits
You've built an AI agent that needs to control a desktop application, but instead of parsing screenshots or emulating clicks, you gave it a CLI. Now you're debugging why the agent misreads error messages, leaks sensitive paths into transcripts, or chokes on third-party text. The agent-cli-standards skill from the ai-job-hunter-app repo codifies exactly these edge cases: how to design a machine-facing CLI where the output is a strict contract, not a human-friendly UI. It's for developers adding or changing agent CLI verbs, especially under extension_bridge/agent_cli.rs or agent_read.rs.
Why agents benefit
- LLM-safe output: Every command returns a stable, machine-readable format (JSON-like) that fits directly into context, reducing hallucination from ambiguous text.
- Injection resistance: The skill mandates prompt-fencing for any third-party content (like file contents or web text), preventing prompt injection through command output.
- Deterministic exits: Standard exit codes and throttling ensure the agent can retry or abort predictably, avoiding infinite loops or silent failures.
- Privacy by design: Paths and sensitive data are stripped from error messages, protecting transcripts that might be shared in bug reports.
- Destructive-command operability: Clear rules for confirmation or dry-run modes let agents safely handle irreversible operations without human oversight.
Practical scenarios
Adding a new agent verb for file search
You need to extend the CLI with ajh-tauri agent search. Without standards, you might output raw file paths with timestamps. With the skill, you project an allowlist of safe fields, escape any file content snippets, and return a fixed schema with exit codes for no-results vs. errors.
Reviewing a bridge change that touches output parsing
A teammate refactors agent_read.rs and accidentally includes a stack trace in an error message. The skill's critic contract flags this as a privacy leak and a parsing hazard. You catch it before the agent starts misbehaving in production.
Handling a third-party API response inside a CLI command
Your CLI fetches a remote status. The skill's prompt-fencing rule tells you to wrap that text in delimiters and never let it influence the command's control flow. The agent sees data, not instructions.
Add it to your agent workflow
Install the skill directly into your agent's skill directory:
npx skills add saeedkolivand/ai-job-hunter-app --skill agent-cli-standards
Then, when you're about to modify any agent CLI surface, load it alongside your author or review contracts. For a quick check, run the skill's rules against your current agent_cli.rs to see if your output contract is already stable.
Compare before adopting
Before committing, compare this skill with your existing CLI conventions. Look at the repo's maintenance freshness (last commit, open issues), the quality of the ADR-linked decisions, and whether alternatives like clig or your own internal standards cover the same ground. The skill is opinionated — it assumes a Rust bridge and a specific binary mode, so verify it fits your stack.
Why it is worth tracking
With 54 stars and an active author, this skill addresses a real gap: most agent frameworks focus on tool use, not on the CLI surface that connects agents to native apps. The standards align with broader security and reliability patterns (allowlists, exit codes, throttling) that any agent-facing CLI should adopt. Evaluate it when you're building or refactoring an agent's command-line interface, or when you want a concrete checklist to audit your current one. For more context, see the skill's listing on OpenAgentSkill: https://www.openagentskill.com/skills/saeedkolivand-agent-cli-standards.
Featured Skill
agent-cli-standards
Skill by saeedkolivand