cli-agent-implement

Implement CLI Agent Spec requirements tier-by-tier with schema generation and audits.

5|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/cli-agent-spec/cli-agent-spec --skill cli-agent-implement-cli-agent-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-agent-implement
Source: https://github.com/cli-agent-spec/cli-agent-spec/tree/main/skills/cli-agent-implement
Command: npx skills add https://github.com/cli-agent-spec/cli-agent-spec --skill cli-agent-implement-cli-agent-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement the CLI Agent Spec in a framework or tool so AI agents can call your CLI reliably, without hangs, mis-parsing, or unsafe retries.

Core Features & Use Cases

  • Step 0 naming convention audit: Reviews command verbs, flags, and Unix mechanics against the spec’s guidance, then produces an advisory report
  • Schema type generation workflow: Generates language-specific schema types from references/schemas/ and validates critical invariants after generation
  • Tier-by-tier requirement implementation: Walks through implementing REQ-F first, then REQ-C, then REQ-O, using acceptance criteria and wire-format examples as fixtures
  • Requirement-by-requirement verification: Ensures each acceptance criterion is satisfied and JSON output matches the wire format exactly

Quick Start

Have an AI read references/IMPLEMENTING.md, then apply Step 0 to audit the existing command tree before implementing the REQ-F tier foundation.

Frequently Asked Questions about cli-agent-implement

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

FAQPage Schema
How do I implement a CLI framework for agent-safe orchestration?

To implement a CLI for agent-safe orchestration, apply the CLI Agent Spec by auditing naming conventions, generating schema types, and enforcing requirements tier-by-tier across REQ-F, REQ-C, and REQ-O. This prevents agent hangs, mis-parsing, and unsafe retries.

What is the best way to guarantee correct JSON response envelopes and exit codes in a CLI tool?

The best way to guarantee correct JSON response envelopes and exit codes is to verify each acceptance criterion tier-by-tier, using requirement files as test fixtures to ensure wire-format JSON and exit code declarations match the specification exactly.

How do I generate and validate schema types from references for a CLI specification?

To generate and validate schema types from references, follow the schema type generation workflow to produce language-specific types from the schemas directory, then validate critical invariants to ensure strict structured outputs for agent communication.

When do I need to audit command verbs and flags for AI agent compatibility?

You need to audit command verbs and flags for AI agent compatibility during Step 0, before implementing the REQ-F tier foundation. This reviews Unix mechanics against the spec’s guidance to produce an advisory report for safe CLI orchestration.

Does implementing CLI agent spec requirements require specific framework dependencies?

Implementing CLI agent spec requirements does not require specific framework dependencies. It guides implementing the specification within your existing CLI framework or tool by applying acceptance criteria as test fixtures for structured outputs.