skills_all/system-createcli/SKILL.md
Generate production-quality TypeScript CLIs with full documentation, error handling, and best practices. Creates deterministic, type-safe command-line tools following PAI's CLI-First Architecture. USE WHEN user says "create a CLI", "build a command-line tool", "make a CLI for X", or requests CLI generation. (user)
npx skillsauth add activer007/ordinary-claude-skills system-createcliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Automated CLI Generation System
Generate production-ready TypeScript CLIs with comprehensive documentation, type safety, error handling, and PAI's CLI-First Architecture principles.
When user requests CLI creation, follow this routing:
Triggers: "create CLI", "build command-line tool", "make CLI for X", "generate CLI"
Route to: workflows/create-cli.md
Action: Generate complete CLI from requirements
Triggers: "add command to CLI", "extend CLI with", "add feature to existing CLI"
Route to: workflows/add-command.md
Action: Add new command to existing CLI
Triggers: "upgrade CLI", "migrate to Commander", "CLI needs more complexity"
Route to: workflows/upgrade-tier.md
Action: Migrate Tier 1 → Tier 2 (manual → Commander.js)
Triggers: "add tests to CLI", "test scaffolding", "need CLI tests"
Route to: workflows/add-testing.md
Action: Generate comprehensive test suite
Triggers: "publish CLI", "distribute CLI", "make standalone binary"
Route to: workflows/setup-distribution.md
Action: Configure npm publishing or binary distribution
Activate when you see these patterns:
Tier 1: llcli-Style (DEFAULT - 80% of use cases)
When to use Tier 1:
Tier 2: Commander.js (ESCALATION - 15% of use cases)
When to use Tier 2:
Tier 3: oclif (REFERENCE ONLY - 5% of use cases)
1. Complete Implementation
2. Comprehensive Documentation
3. Development Setup
4. Quality Standards
Generated CLIs follow PAI's standards:
Generated CLIs go to:
${PAI_DIR}/bin/[cli-name]/ - Personal CLIs (like llcli)~/Projects/[project-name]/ - Project-specific CLIs~/Projects/PAI/examples/clis/ - Example CLIs (PUBLIC repo)SAFETY: Always verify repository location before git operations
Every generated CLI follows:
For detailed information, read these files:
workflows/create-cli.md - Main CLI generation workflow (decision tree, 10-step process)workflows/add-command.md - Add commands to existing CLIsworkflows/upgrade-tier.md - Migrate simple → complexworkflows/add-testing.md - Test suite generationworkflows/setup-distribution.md - Publishing configurationframework-comparison.md - Manual vs Commander vs oclif (with research)patterns.md - Common CLI patterns (from llcli analysis)testing-strategies.md - CLI testing approaches (Jest, Vitest, Playwright)distribution.md - Publishing strategies (npm, standalone binaries)typescript-patterns.md - Type safety patterns (from tsx, vite, bun research)tools/templates/tier1/ - llcli-style templates (default)tools/templates/tier2/ - Commander.js templates (escalation)tools/generators/ - Generation scripts (TypeScript)tools/validators/ - Quality gates (validation)examples/api-cli/ - API client (reference: llcli)examples/file-processor/ - File operationsexamples/data-transform/ - Complex CLI (Commander.js)User Request: "Create a CLI for the GitHub API that can list repos, create issues, and search code"
Generated Structure:
${PAI_DIR}/bin/ghcli/
├── ghcli.ts # 350 lines, complete implementation
├── package.json # Bun + TypeScript
├── tsconfig.json # Strict mode
├── .env.example # GITHUB_TOKEN=your_token
├── README.md # Full documentation
└── QUICKSTART.md # Common use cases
Usage:
ghcli repos --user danielmiessler
ghcli issues create --repo pai --title "Bug fix"
ghcli search "typescript CLI"
ghcli --help
User Request: "Build a CLI to convert markdown files to HTML with frontmatter extraction"
Generated Structure:
${PAI_DIR}/bin/md2html/
├── md2html.ts
├── package.json
├── README.md
└── QUICKSTART.md
Usage:
md2html convert input.md output.html
md2html batch *.md output/
md2html extract-frontmatter post.md
User Request: "Create a CLI for data transformation with multiple formats, validation, and analysis commands"
Generated Structure:
${PAI_DIR}/bin/data-cli/
├── data-cli.ts # Commander.js with subcommands
├── package.json
├── README.md
└── QUICKSTART.md
Usage:
data-cli convert json csv input.json
data-cli validate schema data.json
data-cli analyze stats data.csv
data-cli transform filter --column=status --value=active
Every generated CLI must pass these gates:
any types except justifiedDaniel repeatedly creates CLIs for APIs and tools. Each time:
This skill automates steps 1-7.
The llcli CLI (Limitless.ai API) proves this pattern works:
This skill replicates that success.
This skill turns "I need a CLI for X" into production-ready tools in minutes, following proven patterns from llcli and PAI's CLI-First Architecture.
tools
Generate typed TypeScript SDKs for AI agents to interact with MCP servers. Converts verbose JSON-RPC curl commands to clean function calls (docs.createDocument() vs curl). Auto-detects MCP tools from server modules, generates TypeScript types and client methods, creates runnable example scripts. Use when: building MCP-enabled applications, need typed programmatic access to MCP tools, want Claude Code to manage apps via scripts, eliminating manual JSON-RPC curl commands, validating MCP inputs/outputs, or creating reusable agent automation.
testing
Generate structured task lists from specs or requirements. IMPORTANT: After completing ANY spec via ExitSpecMode, ALWAYS ask the user: "Would you like me to generate a task list for this spec?" Use when user confirms or explicitly requests task generation from a plan/spec/PRD.
tools
Create compelling story-format summaries using UltraThink to find the best narrative framing. Support multiple formats - 3-part narrative, n-length with inline links, abridged 5-line, or comprehensive via Foundry MCP. USE WHEN user says 'create story explanation', 'narrative summary', 'explain as a story', or wants content in Daniel's conversational first-person voice.
testing
Navigate through the original three-world shamanic technology. Deploy when soul retrieval, power animal guidance, or journey between realms emerges. Deeply respectful of Tungus, Buryat, Yakut, Evenki traditions. Use for consciousness navigation, NOT cultural appropriation.