Agent CLI
Convert Python CLIs to agent-consumable --json NDJSON with a shared helper library
Test report
- Verdict
- Tested · Works
- Score
- Tested
- Jul 31, 2026
- Environment
- Claude Code 2.x (agent harness)
- Upstream re-checked
- Aug 10, 2026 · 6c786e1
Fetched SKILL.md and both referenced files (best-practices.md and evals.json both HTTP 200). Wrote a human-only argparse CLI, then produced a BASELINE conversion (naive inline json.dumps with ad-hoc keys, no timestamps, an as_json param threaded through every function) and a SKILL conversion (copied the reference cli_utils.py verbatim and applied the Step 1-4 patterns). Both ran. Concrete difference: skill output emits a uniform envelope {"event","ts",...} on every line with ISO timestamps and a proper {"event":"error"} on the error path plus exit 1, whereas baseline lines carry inconsistent shapes ("status"/"attempt"/"error") and no timestamps; I confirmed every skill JSON line parses as NDJSON, human mode is auto-preserved via the global flag, and --json appears in --help. I also ran the skill's own provided pytest assertions for json_log and die against cli_utils.py — both passed. No security smells (no curl|sh, base64, or eval).
Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works
- Installs cleanly 5/5
- Triggers reliably 5/5
- Output vs. baseline 8/10
- Docs & honesty 5/5
What Agent CLI does
Adds an agent-friendly --json NDJSON output mode to Python CLI scripts, converting print statements into structured, timestamped JSON events behind a single mode flag, or scaffolds a distributable cli_utils package with tests and CI. Triggers when the user wants machine-readable CLI output for AI agents, asks to add a --json flag, mentions NDJSON or structured CLI output, or wants to build a CLI helper library. Ships a reference cli_utils.py implementation, step-by-step conversion patterns, and a completion checklist.
How to install Agent CLI
git clone --depth 1 https://github.com/glebis/claude-skills.git /tmp/agent-cli-src
mkdir -p ~/.claude/skills
cp -R /tmp/agent-cli-src/agent-cli ~/.claude/skills/agent-cli
# SKILL.md is self-contained Python; no external deps to install.
# References bundled: references/best-practices.md, evals/evals.json
# Package-scaffold mode (Mode B) generates a project that needs pytest>=8 to run its test suite.
Skills live in ~/.claude/skills/ (global) or .claude/skills/
(per-project). Restart Claude Code after installing.
Commands — how to trigger Agent CLI
-
/agent-cliConvert Python CLIs to agent-consumable --json NDJSON with a shared helper library
It also activates on plain-language prompts like these:
-
Add a --json flag to this Python script -
Convert these print statements to structured JSON -
Scaffold a cli_utils package for this project
Frequently asked questions
- Is the Agent CLI skill free?
- Yes. The skill itself is free from glebis/claude-skills. SkillProof publishes the install command and an independent test verdict at no cost.
- Does Agent CLI work with Claude Code?
- We tested it with Claude Code 2.x (agent harness) on Jul 31, 2026. Verdict: Tested · Works. Fetched SKILL.md and both referenced files (best-practices.md and evals.json both HTTP 200). Wrote a human-only argparse CLI, then produced a BASELINE conversion (naive inline json.dumps with ad-hoc keys, no timestamps, an as_json param threaded through every function) and a SKILL conversion (copied the reference cli_utils.py verbatim and applied the Step 1-4 patterns). Both ran. Concrete difference: skill output emits a uniform envelope {"event","ts",...} on every line with ISO timestamps and a proper {"event":"error"} on the error path plus exit 1, whereas baseline lines carry inconsistent shapes ("status"/"attempt"/"error") and no timestamps; I confirmed every skill JSON line parses as NDJSON, human mode is auto-preserved via the global flag, and --json appears in --help. I also ran the skill's own provided pytest assertions for json_log and die against cli_utils.py — both passed. No security smells (no curl|sh, base64, or eval).
- What is the Agent CLI SkillProof Score?
- 9.2/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 8/10, docs & honesty 5/5.
- How do I install Agent CLI?
- Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
- Can I use Agent CLI with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
- The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.