AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

Agent-Friendly CLI Builder

Turns Python CLI scripts into machine-readable NDJSON output behind a --json flag, or scaffolds a full cli_utils package.

Dev & CodingIntermediate★ 410⑂ 60AI score 8/10Last updated: Nov 5, 2026

What it does

  • Scans a Python script for output and exit points and replaces them with structured JSON events (NDJSON).
  • Generates a cli_utils.py with json_log, json_error, die, log, add_json_flag, enable_json, is_json, json_ready.
  • Optionally scaffolds a distributable package: src layout, pyproject.toml, pytest suite, MIT license, GitHub Actions CI.
  • Ships a done-checklist (flag visible in --help, every line parseable, interactive prompts and side effects guarded, no tracebacks leaking to stdout).

Who it's for

  • Python developers whose scripts are invoked by AI agents or automation pipelines.
  • Anyone exposing daemon/monitor status in a machine-readable stream.
  • Maintainers who want to publish a CLI helper library as open source.

Examples

  1. "Make hr_monitor.py agent-friendly" → prints become log()/die(), daemon startup emits {"event": "ready", "port": ...}.
  2. "Create a cli_utils package I can publish" → full package with tests and CI matrix for Python 3.10–3.13.
  3. "Verify my script's JSON output" → greps leftover raw prints, guards them, and walks the verification checklist.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/glebis/claude-skills/HEAD/agent-cli/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI Skill Mart.
Copy the agent-cli folder from the GitHub repo glebis/claude-skills into my ~/.claude/skills/agent-cli/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/glebis/claude-skills.git /tmp/claude-skills && mkdir -p ~/.claude/skills && cp -r /tmp/claude-skills/agent-cli ~/.claude/skills/agent-cli

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/glebis/claude-skills.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r claude-skills/agent-cli ~/.claude/skills/agent-cli
  5. Confirm ~/.claude/skills/agent-cli/SKILL.md exists (and the references/ folder came along).
  6. Restart Claude Code and ask something like "add --json NDJSON output to this script" to trigger the skill.