agentleFS
AdvancingTitansAdvancingTitans/cli-creator-skill/skills/cli-creator/SKILL.md

cli-creator

Skill2 starsChanged 5 months agoMITView on GitHub

Use when designing, scaffolding, refactoring, or auditing Python CLI tools or CLI-related skills/templates, including command-first CLIs, configuration-driven tools, performance-oriented utilities, interactive assistants, data pipelines, LLM-enabled command line products, Typer, Click, argparse, uv, packaging, testing, and release workflows.

  • Installs packages

7 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions7 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 7

    1. openai/skills★ 28ksame name
    2. wedsamuel1230/arduino-skills★ 22same name
    3. AymanShams/codex-coding-os★ 1same name
    4. belentani7/manus-ai-skill-pack★ 0same name
    5. Christopher-Schulze/CR-Agent-Skills★ 0same name
    6. psomialbert/tool-smith★ 0same name
    7. tutti-os/skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Show its rules and text

We split this skill into the rules it gives an agent

26 rules. 0 are common, 20 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 20

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not force an assistant architecture onto a command-first tool.

    line 30
  2. Distinctive:

    Prefer the smallest CLI that solves the user job.

    line 34
  3. Distinctive:

    Use the minimal CLI/YAGNI path: if the tool has one or two commands, no persistent state, no network, no plugins, and no credentials, keep …

    line 35
  4. Distinctive:

    Keep names, flags, exit codes, config keys, and output modes stable.

    line 36
  5. Distinctive:

    Keep machine output scriptable with JSON or plain mode.

    line 39
  6. Distinctive:

    Verify that the README command is the installed console script.

    line 40
  7. Very specific:

    Treat interactive and headless modes as separate product paths with shared command contracts.

    line 42
  8. Very specific:

    Put dangerous capabilities behind a reviewable permission model: filesystem writes, shell execution, plugin loading, credential access, …

    line 43
  9. Very specific:

    Keep --help and machine modes import-light.

    line 44
  10. Distinctive:

    Read only the references needed for the task:

    line 48
  11. Distinctive:

    Do not duplicate those references here.

    line 55
  12. Distinctive:

    Use arguments for required domain objects.

    line 83
  13. Distinctive:

    Use options for modifiers, output modes, and optional behavior.

    line 84
  14. Distinctive:

    Avoid surprising network or mutation in commands that sound read-only.

    line 87
  15. Distinctive:

    Always verify the command surface, installation path, and wheel path when they matter:

    line 91
  16. Distinctive:

    Use this compact pack when applicable:

    line 102
  17. Distinctive:

    When auditing an existing CLI or CLI-related skill/template:

    line 117
  18. Very specific:

    Read references/technical-best-practices.md when the audit touches implementation details, packaging, security, cross-platform behavior, …

    line 124
  19. Very specific:

    Run help: root --help and command-level help.

    line 129
  20. Distinctive:

    Check configuration precedence: flags, env, project config, user config, defaults.

    line 132
  21. Distinctive:

    Check security: secrets, shell execution, path handling, unsafe config/plugins, telemetry, subprocess timeouts, dependency supply chain.

    line 133
  22. Distinctive:

    Check performance: startup imports, network timeouts, cache behavior, file discovery.

    line 134
  23. Very specific:

    Check automation: exit codes, JSON output, stdin/stdout/stderr separation, non-TTY behavior.

    line 135
  24. Distinctive:

    Check packaging: Python version, dependencies, scripts, wheels, README commands.

    line 136
  25. Distinctive:

    Keep this skill as a router.

    line 161
  26. Distinctive:

    Keep the command examples, audit headings, and verification pack in sync with the package release.

    line 162

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CLI Creator

Router for building and auditing production-grade Python CLI tools and CLI-related skills/templates. Use it to decide CLI shape, keep the command surface small, preserve installability, and enforce review outputs. This skill stays lightweight: read only the references you need.

When To Use

  • New Python CLI or command tree.
  • CLI refactor, simplification, or packaging cleanup.
  • CLI review/audit, including UX, config, errors, cache, and release flow.
  • Agent skill, scaffold, or template that behaves like a CLI package.
  • Verification of install, wheel, or console-script behavior.

CLI Type Selection

TypeBias
Command-first utilityThin router, strict exit codes, JSON/plain output.
Configuration-driven toolConfig discovery, precedence, reproducibility.
Interactive assistantFlow/state machine, prompts, recovery.
Hybrid CLISmall command tree plus reusable orchestration.
Performance-heavy CLILazy imports, bounded IO, cache/progress.
Plugin/extensible CLIStable extension contract and registry.
Agent/assistant CLIOne command registry feeding parser, slash commands, help, prompts, headless mode, and permissions.

Do not force an assistant architecture onto a command-first tool. Do not force a single-script shape onto a growing product.

Core Rules

  • Prefer the smallest CLI that solves the user job.
  • Use the minimal CLI/YAGNI path: if the tool has one or two commands, no persistent state, no network, no plugins, and no credentials, keep it tiny; do not add Rich, Pydantic, platformdirs, cache layers, doctor, or plugin registries unless they solve an immediate problem.
  • Keep names, flags, exit codes, config keys, and output modes stable.
  • Make defaults useful and safe.
  • Separate routing, domain logic, IO, config, persistence, rendering, and integrations.
  • Keep machine output scriptable with JSON or plain mode.
  • Verify that the README command is the installed console script.
  • For assistant, slash-command, or plugin CLIs, keep one command descriptor contract. Include name, aliases, description, visibility, enabled state, source, execution kind, non-interactive support, permission requirements, and lazy loader.
  • Treat interactive and headless modes as separate product paths with shared command contracts. A command that renders a TUI picker should not silently appear in --print, CI, or remote/bridge mode unless it has a non-interactive implementation.
  • Put dangerous capabilities behind a reviewable permission model: filesystem writes, shell execution, plugin loading, credential access, remote mutation, and generated artifact sends should have clear allow/deny/ask rules and safe failure behavior.
  • Keep --help and machine modes import-light. Lazy-load heavy UI, analytics, provider SDKs, plugin registries, and report renderers inside the command body.

Reference-Loading Rules

Read only the references needed for the task:

  • Creation or refactor: references/creation-playbook.md.
  • Review or audit: references/review-rubric.md and references/pitfalls-and-solutions.md.
  • Implementation details, packaging, security, cross-platform behavior, Rich output, cache, or LLM providers: references/technical-best-practices.md.
  • For skill/package maintenance, consult workspace-root governance folders skill-ir/, evals/, scripts/, reports/, and registry/ when they exist. These are maintainer-side routing aids, not bundled inside an installed skill copy.

Do not duplicate those references here. Load them only when the current task needs them.

New CLI Or Skill Creation Flow

  1. Determine the product shape: who runs it, what pressure it is under, and what must be cached, remembered, or forgotten.
  2. Design the command surface with a few stable commands and real examples.
  3. Choose the smallest stack that fits.
    • Typer or Click for most CLIs.
    • argparse only for tiny stdlib-friendly tools.
  4. Pick the smallest architecture that will survive the next two releases.
  5. Implement the product loop: input, validation, execution, rendering, persistence, exit code, recovery hint.
  6. Verify before shipping.

Command Surface Examples

my-cli run
my-cli init
my-cli config show
my-cli doctor
my-cli cache clear
my-cli check PATH
my-cli fetch QUERY --json
my-cli export ID --output result.md

Rules:

  • Use arguments for required domain objects.
  • Use options for modifiers, output modes, and optional behavior.
  • Provide --json or --format json for automation.
  • Provide --quiet, --verbose, and --debug consistently.
  • Avoid surprising network or mutation in commands that sound read-only.

Verification Expectations

Always verify the command surface, installation path, and wheel path when they matter:

  • --help for the root command and each top-level command.
  • Clean install into a new environment.
  • Missing config or first-run path when the tool has config.
  • Invalid config or error path when the tool validates input.
  • Success path plus JSON/scriptable mode when supported.
  • Cache refresh and cache clear when the tool has cache.
  • Packaging metadata and console script.
  • Wheel install from outside the repository when you want install confidence.

Use this compact pack when applicable:

uv venv /tmp/cli-audit
. /tmp/cli-audit/bin/activate
uv pip install -e .
cli-creator-skill --help
cli-creator-skill install
uv build
uv pip install dist/*.whl
python -m pytest

Review Workflow

When auditing an existing CLI or CLI-related skill/template:

Before reviewing, read:

  • references/review-rubric.md
  • references/pitfalls-and-solutions.md

Read references/technical-best-practices.md when the audit touches implementation details, packaging, security, cross-platform behavior, Rich output, caching, or LLM providers.

Then:

  1. Inspect repository shape: package layout, command entry points, config files, tests, docs, CI.
  2. Run help: root --help and command-level help.
  3. Trace one successful command from callback to domain service to renderer.
  4. Trace one failure path and inspect error quality.
  5. Check configuration precedence: flags, env, project config, user config, defaults.
  6. Check security: secrets, shell execution, path handling, unsafe config/plugins, telemetry, subprocess timeouts, dependency supply chain.
  7. Check performance: startup imports, network timeouts, cache behavior, file discovery.
  8. Check automation: exit codes, JSON output, stdin/stdout/stderr separation, non-TTY behavior.
  9. Check packaging: Python version, dependencies, scripts, wheels, README commands.
  10. Score every rubric area with references/review-rubric.md.
  11. Return findings first, then prioritized fixes.

Required Audit Output

Audit output must include these sections, in this order:

**Findings**

**Scores**

| Area | Score | Notes |
|---|---:|---|

**Repair Order**

**Test Gaps**

**Verification Commands**

Maintenance Notes

  • Keep this skill as a router; put implementation detail in the four references.
  • Keep the command examples, audit headings, and verification pack in sync with the package release.
  • For maintainer-side governance, use the workspace-root skill-ir/, evals/, scripts/, reports/, and registry/ folders when present; do not pretend they are part of the installed skill.

What This Skill Helps With

  • Designing a new Python CLI from scratch.
  • Reviewing an existing CLI for UX, packaging, errors, model setup, caching, and maintainability.
  • Structuring Typer, Click, argparse, or hybrid applications.
  • Building natural multi-turn CLI flows without making users feel like they are filling out a form.
  • Adding diagnostics, cache, profile memory, and first-run setup flows when they are actually needed.
  • Reviewing CLI-related skills and templates for trigger clarity, reference completeness, command templates, output contracts, and maintenance strategy.

Design Basis

This skill distills maintainer experience and official documentation patterns for Python packaging, Typer, Click, Rich, uv, Ruff, Pydantic, and LLM provider integration. It does not vendor code or instructions from unofficial third-party repositories.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.