# Skillit CLI

> Extract CLI command structure from commander/yargs for AI agent skill generation Use when working with agent-skills, cli, commander, documentation, skill-generation, yargs.

- Skill: `pradeepmouli/skillit-cli` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add pradeepmouli/skillit-cli`
- Raw SKILL.md: https://api.skillmd.com/api/skills/pradeepmouli/skillit-cli/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: pradeepmouli (https://skillmd.com/u/pradeepmouli)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/pradeepmouli/skillit-cli

---


# @skillit/cli

Extract CLI command structure from commander/yargs for AI agent skill generation

## When to Use

- Working with agent-skills, cli, commander, documentation, skill-generation, yargs
- You have a Commander program and want structured option/argument extraction with full fidelity
- Runtime introspection is unavailable (no access to the program object)
- The CLI uses a framework other than Commander (yargs, oclif, custom)
- You have both CLI surfaces (from introspection/help) and typed config interfaces (from TypeDoc)
- You want JSDoc @useWhen/@avoidWhen/@never tags to appear on CLI options in the generated skill
- You have a Commander program and want to generate a skill from its command structure
- You have raw --help output and no runtime access to the program object

**Avoid when:**

- Your CLI uses yargs, oclif, or another framework — use parseHelpOutput as a fallback instead
- Your CLI is built with a framework other than Commander — use parseHelpOutput directly instead
- API surface: 4 functions

## NEVER

- NEVER pass both `program` and `helpTexts` — program takes precedence and helpTexts is silently ignored
- NEVER forget to pass configSurfaces when you have typed option interfaces — JSDoc metadata won't be correlated

## Configuration

**CliExtractionOptions** (4 options — see references/config.md)

## Quick Reference

**Commander:** `introspectCommander`
**Fallback:** `parseHelpOutput`
**Correlation:** `correlateFlags`
**Extraction:** `extractCliSkill`

## Links

- [Repository](https://github.com/pradeepmouli/skillit)
- Author: Pradeep Mouli

