Skip to content
Productivity
Skill

/CreateCLI

Generates production-ready TypeScript CLIs via a 3-tier template system (manual arg parsing, Commander.js, oclif), each shipping full implementation, docs, package.json, strict config, JSON output, and exit-code compliance. USE WHEN create CLI, build CLI, command-line tool, wrap

From plugin
lifeos
19k56 skills8 agents7 commands
Install
$ npx -y skills add danielmiessler/personal_ai_infrastructure --skill CreateCLI --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/CreateCLI

Context preview

The summary Claude sees to decide when to auto-load this skill.

Generates production-ready TypeScript CLIs via a 3-tier template system (manual arg parsing, Commander.js, oclif), each shipping full implementation, docs, package.json, strict config, JSON output, and exit-code compliance. USE WHEN create CLI, build CLI, command-line tool, wrap

SKILL.md

CreateCLI.SKILL.md
name: CreateCLI
version: 1.1.25
description: "Generates production-ready TypeScript CLIs via a 3-tier template system (manual arg parsing, Commander.js, oclif), each shipping full implementation, docs, package.json, strict config, JSON output, and exit-code compliance. USE WHEN create CLI, build CLI, command-line tool, wrap API, add command, upgrade tier, TypeScript CLI. NOT FOR LifeOS skill scaffolding (use CreateSkill)."

Customization

**Before executing, check for user customizations at:** `~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/CreateCLI/`

If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.

🚨 MANDATORY: Voice Notification (REQUIRED BEFORE ANY ACTION)

**You MUST send this notification BEFORE doing anything else when this skill is invoked.**

1. **Send voice notification**:

   curl -s -X POST http://localhost:31337/notify \
     -H "Content-Type: application/json" \
     -d '{"message": "Running the WORKFLOWNAME workflow in the CreateCLI skill to ACTION"}' \
     > /dev/null 2>&1 &

2. **Output text notification**:

   Running the **WorkflowName** workflow in the **CreateCLI** skill to ACTION...

**This is not optional. Execute this curl command immediately upon skill invocation.**

CreateCLI

What It Does

Generates production-ready TypeScript CLIs. Every CLI ships with full implementation, README and QUICKSTART, a Bun package.json, strict tsconfig, JSON output, and correct exit codes. A three-tier template system picks the right complexity: Tier 1 manual arg parsing with zero deps (most cases), Tier 2 Commander.js for subcommands, Tier 3 oclif as a reference for enterprise scale.

The Problem

People build the same CLI from scratch over and over. It starts as a bash script, then needs error handling, then help text, then type safety, and ends up rewritten in TypeScript with docs bolted on at the end. Each round repeats the same boilerplate and the same mistakes. This skill takes that whole arc and produces a clean, typed, documented CLI in one pass, at the tier the job actually needs.

How It Works

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

---

Workflow Routing

Route to the appropriate workflow based on the request.

**When executing a workflow, output this notification directly:**

Running the **WorkflowName** workflow in the **CreateCLI** skill to ACTION...

| Workflow | Trigger | File | |----------|---------|------| | CreateCli | Create a new CLI tool from scratch | `Workflows/CreateCli.md` | | AddCommand | Add a new command to existing CLI | `Workflows/AddCommand.md` | | UpgradeTier | Upgrade CLI to higher tier | `Workflows/UpgradeTier.md` |

---

🚀 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 LifeOS

Technology Stack Alignment

Generated CLIs follow LifeOS 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:

  • `~/.claude/LIFEOS/TOOLS/[cli-name]/` - Personal CLIs (like llcli)
  • `~/Projects/[project-name]/` - Project-specific CLIs
  • `${PROJECTS_DIR}/LIFEOS/Ex
Read more
Ships withlifeos

⛰️ The Life Operating System — an intent engineering platform that moves you from your current state to your ideal state, in life and work.

Get the whole plugin

Other skills on lifeos.