cli-generator_skill

This skill helps you generate AI-friendly Python CLIs using Click, Pydantic, and Rich, following agentic coding patterns for interactive prompts.
  • Python

2

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill kjgarza/marketplace-claude --skill cli-generator

  • SKILL.md12.9 KB

Overview

This skill generates AI-friendly Python command-line interfaces using Click, Pydantic, Rich, and uv. It scaffolds a project layout, Pydantic response models, and conversational terminal output so each CLI interaction becomes a useful prompt for an agent. The output emphasizes actionable next steps and structured responses for agentic coding environments.

How this skill works

The generator creates a project skeleton (pyproject.toml, src package, commands, models, output, and core modules) and adds Click-based command entry points with epilog examples. It generates Pydantic models for structured CommandResult and ErrorDetail payloads and a ConversationalOutput class that prints success, error, and table views following the "Every Output is a Prompt" patterns. Templates include success suggestions, three-part error messages (what/how/next), and limited table rendering to avoid overwhelming agents.

When to use it

  • Starting a new Python CLI that will be used by AI agents or autonomous workflows
  • Standardizing CLI outputs so downstream agents can parse and act on results
  • Building tooling that must suggest exact next-commands after each action
  • Creating CLI commands with validated, machine-readable responses
  • Adding friendly, example-rich --help epilogs for discoverability

Best practices

  • Treat every CLI output as a prompt: include context, structured data, and suggested next commands
  • Use Pydantic models to validate command responses and errors before rendering
  • Follow the three-part error pattern: what went wrong, how to fix, and what's next
  • Limit table columns and rows to keep agent inputs concise and scannable
  • Include concrete examples in command epilog for reproducible agent steps

Example use cases

  • Generate a search command that returns CommandResult with resource IDs and suggestions for view/export
  • Create an auth flow command that prints step-by-step fixes and follow-up auth test commands on failure
  • Scaffold export commands that show available formats and exact commands to run next
  • Produce a tool for batch jobs where each job output includes suggested retry or debug commands
  • Build a developer-facing CLI that agents can inspect and use to chain multi-step workflows

FAQ

Yes. Templates reference Click, Rich, and Pydantic in pyproject.toml; uv is recommended for project initialization.

How are errors represented for agents?

Errors follow a structured ErrorDetail model with what_went_wrong, how_to_fix steps, and whats_next suggestions so agents can decide corrective actions.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational