cli-design

Design agent-first CLIs with HATEOAS JSON responses and self-documenting command trees.

61|3|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/joelhooks/joelclaw --skill cli-design-joelhooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-design
Source: https://github.com/joelhooks/joelclaw/tree/main/.agents/skills/cli-design
Command: npx skills add https://github.com/joelhooks/joelclaw --skill cli-design-joelhooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a robust framework and set of principles for designing and building command-line interfaces (CLIs) that are optimized for agent interaction, ensuring structured, predictable, and actionable output.

Core Features & Use Cases

  • Agent-First Design: Prioritizes machine-readable JSON output with HATEOAS-style next_actions for seamless agent integration.
  • Self-Documenting Commands: The root command provides a complete, discoverable tree of all available commands and their usage.
  • Context-Protected Output: Ensures that large outputs are truncated and provide pointers to full data, respecting agent context windows.
  • Error Handling: Standardized error responses include machine-readable codes and human-readable fixes.
  • Use Case: When developing a new CLI tool or enhancing an existing one (like joelclaw, slog, or igs) to be easily consumable by AI agents, ensuring consistent and predictable interactions.

Quick Start

Use the cli-design skill to build a new CLI tool with agent-friendly output.

Frequently Asked Questions about cli-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a CLI for AI agent interaction?

Designing a CLI for AI agent interaction requires structured JSON output, HATEOAS-style next_actions for discoverability, and context-protecting truncation to respect context windows. This framework provides the principles to build self-documenting command trees optimized for machine consumption.

What are HATEOAS JSON responses in command-line interfaces?

HATEOAS JSON responses in command-line interfaces provide machine-readable next_actions links within the output, allowing agents to discover available commands dynamically. This structured approach ensures seamless agent integration by making the command tree self-documenting and predictable.

How do I handle large CLI outputs without exceeding agent context windows?

Handling large CLI outputs without exceeding agent context windows requires context-protecting output that truncates data and provides pointers to full information. This approach ensures agents receive actionable summaries without being overwhelmed by excessive payload sizes.

Can I add agent-friendly commands to an existing CLI tool?

Yes, you can add agent-friendly commands to an existing CLI tool by applying principles for structured JSON output, discoverable command trees, and standardized error responses. This framework supports enhancing current tools to ensure consistent and predictable agent interactions.

What is the best way to structure CLI error responses for AI agents?

The best way to structure CLI error responses for AI agents is to include both machine-readable error codes and human-readable fixes. This standardized format allows agents to programmatically handle failures while providing actionable guidance for resolution.

Why does my CLI tool fail when parsed by automated agents?

Your CLI tool may fail when parsed by automated agents if it lacks structured JSON output, relies on unstructured text, or omits discoverable command trees. Redesigning it with agent-first principles ensures predictable, actionable responses optimized for machine interaction.