clack-cli-patterns

Enforce Clack UX standards for OpenChamber CLI commands and output modes.

7.8k|844|Updated Sep 11, 2025
One-click install
npx skills add https://github.com/openchamber/openchamber --skill clack-cli-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clack-cli-patterns
Source: https://github.com/openchamber/openchamber/tree/main/.opencode/skills/clack-cli-patterns
Command: npx skills add https://github.com/openchamber/openchamber --skill clack-cli-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures your command-line interface (CLI) applications provide a consistent, safe, and user-friendly experience across all operating environments and user interaction modes.

Core Features & Use Cases

  • Mode Parity Enforcement: Guarantees identical behavior in interactive TTY, non-interactive shells, --quiet, and --json modes.
  • Validation First Design: Prioritizes safety and correctness checks before user interaction.
  • Use Case: When developing a new CLI tool for OpenChamber, use this skill to implement robust input validation and ensure that prompts only appear when appropriate, maintaining a seamless experience whether the user is interacting directly or running the command in an automated script.

Quick Start

Use the clack-cli-patterns skill to ensure your CLI prompts are only displayed when stdout is a TTY and the --quiet flag is not set.

Frequently Asked Questions about clack-cli-patterns

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

FAQPage Schema
How do I ensure CLI prompts only appear in interactive TTY shells?

To ensure CLI prompts only appear in interactive TTY shells, implement mode parity checks that suppress prompts when stdout is not a TTY or the --quiet flag is set. Validation should run first to guarantee deterministic behavior.

What is CLI mode parity and why does it matter for terminal commands?

CLI mode parity means a command-line interface behaves identically across interactive TTY, non-interactive shells, --quiet, and --json modes. It matters because it guarantees safe, deterministic execution and prevents failures in automated scripts.

How to handle input validation for CLI tools before showing user prompts?

Handle input validation for CLI tools by adopting a validation-first design that executes safety and correctness checks before any user interaction. This ensures deterministic failure behavior and prevents prompts from blocking automated processes.

Does this CLI validation approach work with --json and --quiet output modes?

Yes, this CLI validation approach enforces strict parity and safety across --json and --quiet output modes. It guarantees consistent behavior whether the user is interacting directly or running the command in an automated script.

What's the best way to build consistent UX for command-line interfaces?

The best way to build consistent UX for command-line interfaces is to enforce strict mode parity and validation-first standards. This ensures safe, deterministic behavior across TTY, non-TTY, --quiet, and --json environments.