Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

System Createcli

ASecurity

**Automated CLI Generation System** Generate production-ready TypeScript CLIs with comprehensive documentation, type safety, error handling, and PAI's CLI-First Architecture principles. ---

393 stars
0 votes
0 copies
16 views
Added 12/19/2025
developmentjavascripttypescriptpythongojavabashnodetestinggitapi

Works with

cliapimcp

Security Analysis

A100/100

Scanned 2/10/2026

$npx -y skills add Microck/ordinary-claude-skills --skill system-createcli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of System Createcli?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for System Createcli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/microck-system-createcli/badge)](https://www.skillsdirectory.com/skills/microck-system-createcli)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: system-createcli
description: 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)
location: user
---

# system-createcli

**Automated CLI Generation System**

Generate production-ready TypeScript CLIs with comprehensive documentation, type safety, error handling, and PAI's CLI-First Architecture principles.

---

## šŸŽÆ WORKFLOW ROUTING (SYSTEM PROMPT)

**When user requests CLI creation, follow this routing:**

### Primary Workflow: Create New CLI
**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

### Extension Workflow: Add Command
**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

### Migration Workflow: Upgrade Complexity Tier
**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)

### Testing Workflow: Add Test Suite
**Triggers:** "add tests to CLI", "test scaffolding", "need CLI tests"
**Route to:** `workflows/add-testing.md`
**Action:** Generate comprehensive test suite

### Distribution Workflow: Setup Publishing
**Triggers:** "publish CLI", "distribute CLI", "make standalone binary"
**Route to:** `workflows/setup-distribution.md`
**Action:** Configure npm publishing or binary distribution

---

## šŸš€ WHEN TO ACTIVATE THIS SKILL

Activate when you see these patterns:

### Direct Requests
- "Create a CLI for [API/service/tool]"
- "Build a command-line interface for X"
- "Make a CLI that does Y"
- "Generate a TypeScript CLI"
- "I need a CLI tool for Z"

### Context Clues
- User describes repetitive API calls → Suggest CLI
- User mentions "I keep typing this command" → Suggest CLI wrapper
- User has bash script doing complex work → Suggest TypeScript CLI replacement
- User working with API that lacks official CLI → Suggest creating one

### Examples
- āœ… "Create a CLI for the GitHub API"
- āœ… "Build a command-line tool to process CSV files"
- āœ… "Make a CLI for my database migrations"
- āœ… "Generate a CLI that wraps this API"
- āœ… "I need a tool like llcli but for Notion API"

---

## šŸ’” CORE CAPABILITIES

### Three-Tier Template System

**Tier 1: llcli-Style (DEFAULT - 80% of use cases)**
- Manual argument parsing (process.argv)
- Zero framework dependencies
- Bun + TypeScript
- Type-safe interfaces
- ~300-400 lines total
- **Perfect for:** API clients, data transformers, simple automation

**When to use Tier 1:**
- āœ… 2-10 commands
- āœ… Simple arguments (flags, values)
- āœ… JSON output
- āœ… No subcommands
- āœ… Fast development

**Tier 2: Commander.js (ESCALATION - 15% of use cases)**
- Framework-based parsing
- Subcommands + nested options
- Auto-generated help
- Plugin-ready
- **Perfect for:** Complex multi-command tools

**When to use Tier 2:**
- āŒ 10+ commands needing grouping
- āŒ Complex nested options
- āŒ Plugin architecture
- āŒ Multiple output formats

**Tier 3: oclif (REFERENCE ONLY - 5% of use cases)**
- Documentation only (no templates)
- Enterprise-grade plugin systems
- **Perfect for:** Heroku CLI, Salesforce CLI scale (rare)

### What Every Generated CLI Includes

**1. Complete Implementation**
- TypeScript source with full type safety
- All commands functional and tested
- Error handling with proper exit codes
- Configuration management

**2. Comprehensive Documentation**
- README.md with philosophy, usage, examples
- QUICKSTART.md for common patterns
- Inline help text (--help)
- API response documentation

**3. Development Setup**
- package.json (Bun configuration)
- tsconfig.json (strict mode)
- .env.example (configuration template)
- File permissions configured

**4. Quality Standards**
- Type-safe throughout
- Deterministic output (JSON)
- Composable (pipes to jq, grep)
- Error messages with context
- Exit code compliance

---

## šŸ—ļø INTEGRATION WITH KAI

### Technology Stack Alignment

Generated CLIs follow PAI's standards:
- āœ… **Runtime:** Bun (NOT Node.js)
- āœ… **Language:** TypeScript (NOT JavaScript or Python)
- āœ… **Package Manager:** Bun (NOT npm/yarn/pnpm)
- āœ… **Testing:** Vitest (when tests added)
- āœ… **Output:** Deterministic JSON (composable)
- āœ… **Documentation:** README + QUICKSTART (llcli pattern)

### Repository Placement

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

### CLI-First Architecture Principles

Every generated CLI follows:
1. **Deterministic** - Same input → Same output
2. **Clean** - Single responsibility
3. **Composable** - JSON output pipes to other tools
4. **Documented** - Comprehensive help and examples
5. **Testable** - Predictable behavior

---

## šŸ“š EXTENDED CONTEXT

**For detailed information, read these files:**

### Workflow Documentation
- `workflows/create-cli.md` - Main CLI generation workflow (decision tree, 10-step process)
- `workflows/add-command.md` - Add commands to existing CLIs
- `workflows/upgrade-tier.md` - Migrate simple → complex
- `workflows/add-testing.md` - Test suite generation
- `workflows/setup-distribution.md` - Publishing configuration

### Reference Documentation
- `framework-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
- `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
- `examples/api-cli/` - API client (reference: llcli)
- `examples/file-processor/` - File operations
- `examples/data-transform/` - Complex CLI (Commander.js)

---

## šŸ“– EXAMPLES

### Example 1: API Client CLI (Tier 1)

**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:**
```bash
ghcli repos --user danielmiessler
ghcli issues create --repo pai --title "Bug fix"
ghcli search "typescript CLI"
ghcli --help
```

---

### Example 2: File Processor (Tier 1)

**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:**
```bash
md2html convert input.md output.html
md2html batch *.md output/
md2html extract-frontmatter post.md
```

---

### Example 3: Data Pipeline (Tier 2)

**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:**
```bash
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
```

---

## āœ… QUALITY STANDARDS

Every generated CLI must pass these gates:

### 1. Compilation
- āœ… TypeScript compiles with zero errors
- āœ… Strict mode enabled
- āœ… No `any` types except justified

### 2. Functionality
- āœ… All commands work as specified
- āœ… Error handling comprehensive
- āœ… Exit codes correct (0 success, 1 error)

### 3. Documentation
- āœ… README explains philosophy and usage
- āœ… QUICKSTART has common examples
- āœ… --help text comprehensive
- āœ… All flags/options documented

### 4. Code Quality
- āœ… Type-safe throughout
- āœ… Clean function separation
- āœ… Error messages actionable
- āœ… Configuration externalized

### 5. Integration
- āœ… Follows PAI tech stack (Bun, TypeScript)
- āœ… CLI-First Architecture principles
- āœ… Deterministic output (JSON)
- āœ… Composable with other tools

---

## šŸŽÆ PHILOSOPHY

### Why This Skill Exists

Daniel repeatedly creates CLIs for APIs and tools. Each time:
1. Starts with bash script
2. Realizes it needs error handling
3. Realizes it needs help text
4. Realizes it needs type safety
5. Rewrites in TypeScript
6. Adds documentation
7. Now has production CLI

**This skill automates steps 1-7.**

### The llcli Pattern

The `llcli` CLI (Limitless.ai API) proves this pattern works:
- 327 lines of TypeScript
- Zero dependencies (no framework)
- Complete error handling
- Comprehensive documentation
- Production-ready immediately

**This skill replicates that success.**

### Design Principles

1. **Start Simple** - Default to Tier 1 (llcli-style)
2. **Escalate When Needed** - Tier 2 only when justified
3. **Complete, Not Scaffold** - Every CLI is production-ready
4. **Documentation First** - README explains "why" not just "how"
5. **Type Safety** - TypeScript strict mode always

---

## šŸ”— RELATED SKILLS

- **development** - For complex feature development (not CLI-specific)
- **system-mcp** - For web scraping CLIs (Bright Data, Apify wrappers)
- **personal-lifelog** - Example of skill using llcli

---

**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.**

Attribution

MicrockMicrock
View sourceSee grades on GitHubMore from Microck →
SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

285172 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10341 votes
View all in development →