ai-infrastructure-hugg…
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
CLI code review patterns. Use when reviewing CLI applications built with Commander.js, @clack/prompts, picocolors. Covers exit codes, signal handling, error messages, user experience, testing adequacy.
$ npx -y skills add agents-inc/skills --skill meta-reviewing-cli-reviewing --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/meta-reviewing-cli-reviewingContext preview
The summary Claude sees to decide when to auto-load this skill.
CLI code review patterns. Use when reviewing CLI applications built with Commander.js, @clack/prompts, picocolors. Covers exit codes, signal handling, error messages, user experience, testing adequacy.
name: meta-reviewing-cli-reviewing description: CLI code review patterns. Use when reviewing CLI applications built with Commander.js, @clack/prompts, picocolors. Covers exit codes, signal handling, error messages, user experience, testing adequacy.
> **Quick Guide:** When reviewing CLI code, verify SIGINT handling, p.isCancel() checks, exit code constants, parseAsync() usage, and user feedback (spinners, clear errors). Check config hierarchy, help text quality, and dry-run support. Distinguish severity (Must Fix vs Should Fix vs Nice to Have) and explain WHY each issue matters.
---
<critical_requirements>
> **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants)
**(You MUST verify SIGINT (Ctrl+C) handling exists in CLI entry point)**
**(You MUST verify p.isCancel() is called after EVERY @clack/prompts call)**
**(You MUST verify exit codes use named constants - flag ANY magic numbers in process.exit())**
**(You MUST verify parseAsync() is used for async actions, not parse())**
**(You MUST verify spinners are stopped before any console output or error handling)**
</critical_requirements>
---
**Auto-detection:** review CLI, check CLI code, CLI PR review, Commander.js review, @clack/prompts review, CLI quality, CLI error handling review, exit codes review
**When to use:**
**When NOT to use:**
**Key patterns covered:**
**Detailed Resources:**
---
<philosophy>
**CLI UX is critical.** Unlike web apps with visual feedback, CLI tools communicate entirely through text. Poor error messages, missing progress indicators, or unexpected exits destroy user trust. Review with empathy for the end user.
**When reviewing CLI code:**
**When NOT to be harsh:**
**Core principles:**
</philosophy>
---
<patterns>
Use this comprehensive checklist for every CLI code review.
## CLI Entry Point Review **Signal Handling:** - [ ] SIGINT handler exists in entry point - [ ] SIGINT calls process.exit with EXIT_CODES.CANCELLED - [ ] Other relevant signals handled (SIGTERM for containers) **Command Registration:** - [ ] Commands imported and registered cleanly - [ ] parseAsync() used (not parse()) for async actions - [ ] Global error handler with catch() on main() - [ ] configureOutput() used for colored errors - [ ] showHelpAfterError(true) enabled **Global Options:** - [ ] --dry-run supported for destructive operations - [ ] --verbose supported for debug output - [ ] --help generates useful output - [ ] --version displays correct version
**Why this matters:** Entry point issues affect every command. Missing SIGINT handling leaves users unable to cancel, missing parseAsync swallows errors silently.
---
Verify all exit paths use named constants.
## Exit Codes Review **Named Constants:** - [ ] Exit codes defined as named constants (e.g., EXIT_CODES object) - [ ] All exit codes have JSDoc descriptions - [ ] Uses `as const` for type inference **Usage Audit:** - [ ] No magic numbers in process.exit() calls - [ ] Correct exit code for each scenario: - Success: EXIT_CODES.SUCCESS (0) - General error: EXIT_CODES.ERROR (1) - Invalid args: EXIT_CODES.INVALID_ARGS (2) - User cancelled: EXIT_CODES.CANCELLED - Validation failed: EXIT_CODES.VALIDATION_ERROR
// Must Fix: Magic number exit code process.exit(1); // What does 1 mean? // Good: Named constant process.exit(EXIT_CODES.VALIDATION_ERROR);
**Why this matters:** Magic exit codes are unmaintainable. Scripts that depend on your CLI need predictable, documented exit codes.
---
Every @clack/prompts call must check for cancellation.
// Must Fix: Missing isCancel check
const name = await p.text({ message: "Name:" });
// User presses Ctrl+C - name is Symbol, code continues with garbage
// Good: Proper cancellation handling
const name = await p.text({ message: "Name:" });
if (p.isCancel(name)) {
p.cancel("Setup cancelled");
process.exit(The official skills marketplace for Agents Inc. 150+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?
Repo: agents-inc/skills
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production…
Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client patterns
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and…
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation,…