.agents/skills/cli-developer/SKILL.md
Expert guidance for designing and implementing CLI tools. Use command structure modeled after kubectl for consistency and familiarity.
npx skillsauth add em-jones/staccato-toolkit cli-developerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides guidance for designing and implementing command-line interfaces (CLIs) that follow established patterns from widely-used tools like kubectl.
Modern CLIs should be progressive: commands and features become available based on the current system state. This adapts the interface to user permissions, installed plugins, and feature availability—providing a streamlined, contextual experience.
Key Benefits:
# Basic user sees core commands
td help
# output:
# COMMANDS:
# get Retrieve a resource
# list List resources
# describe Show details
# Admin user sees additional commands
td help
# output:
# COMMANDS:
# get Retrieve a resource
# list List resources
# describe Show details
# create Create a new resource
# update Modify a resource
# delete Remove a resource
# admin Administrative operations
# With observability plugin installed:
td help
# output:
# COMMANDS:
# ...
# observe Observability and monitoring (plugin)
# metrics View resource metrics (plugin)
All CLI commands should follow the kubectl verb-resource pattern to provide a familiar, predictable interface:
<command> <verb> <resource> [options] [arguments]
Examples:
td get change my-feature
td list issues --status open
td create proposal --name "add-auth"
td delete task abc123
td update config --key value
td describe resource-type resource-name
Standard verbs (following kubectl conventions):
get — Retrieve a single resourcelist — Retrieve multiple resourcescreate — Create a new resourceupdate — Modify an existing resourcedelete — Remove a resourcedescribe — Show detailed information about a resourceapply — Create or update a resource declarativelypatch — Apply partial updates to a resourceResources are entities your CLI manages (e.g., change, issue, task, proposal):
td get change
td list issues
td describe task
Standard flag patterns:
--output / -o — Output format (json, yaml, table)--filter / -f — Filter results--sort — Sort by field--limit — Limit number of results--namespace / -n — Scoped namespace--verbose / -v — Increase verbosity--dry-run — Preview without executingCommands visibility based on context:
RBAC/Permissions — Hide commands user lacks permission to execute
# User without admin role won't see delete/create/update in help
td help
Installed Plugins — Show only commands from loaded plugins
# Observability plugin adds commands only if installed
td observe metrics
td observe traces
Feature Flags — Enable/disable commands based on environment
# Experimental features hidden unless enabled
export TD_ENABLE_EXPERIMENTAL=true
td help # Now includes experimental commands
Implementation pattern:
// Pseudo-code for progressive command registration
func registerCommands(cli *CLI) {
cli.Register(coreVerbs...) // Always available: get, list, describe
if user.HasPermission("create") {
cli.Register(createCmd)
}
if user.HasPermission("update") {
cli.Register(updateCmd)
}
if user.HasPermission("admin") {
cli.Register(adminCmd)
}
for _, plugin := range loadedPlugins {
cli.Register(plugin.Commands()...)
}
}
// Help respects user's verbosity preference
func (c *Command) Help(verbosity int) string {
help := c.BasicUsage()
if verbosity >= 1 {
help += "\n" + c.DetailedDescription()
help += "\n" + c.AllOptions()
help += "\n" + c.Examples()
}
if verbosity >= 2 {
help += "\n" + c.AdvancedUsage()
help += "\n" + c.Troubleshooting()
help += "\n" + c.RelatedCommands()
}
return help
}
# Good: verb, resource, name, options
td get change my-feature --output json
# Avoid: inconsistent ordering
td get --output json change my-feature
Group related commands under subcommands:
td config get key
td config set key value
td config list
td session list
td session switch id
Always support multiple output formats:
td list issues # Default: human-readable table
td list issues --output json # JSON for parsing
td list issues --output yaml # YAML for editing
td list issues -o table # Explicit table format
# Error message format
<command>: <error message>
<command>: <suggestion for fix>
Every command must provide help with configurable verbosity:
td help # General help (default verbosity)
td help -v # Verbose help with detailed explanations
td help -vv # Very verbose: includes examples, advanced options, troubleshooting
td help change # Help for specific resource
td get --help # Help for specific command
td get -h # Short form
# Help with different verbosity levels
td get --help # Basic: usage, synopsis, common options
td get --help -v # Verbose: detailed descriptions, all options
td get --help -vv # Very verbose: examples, tips, related commands
Help output structure:
-v): Full descriptions, all flags, examples-vv): Everything + advanced usage, troubleshooting, related commandsHelp should include:
# Filter by field
td list issues --filter status=open
# Multiple filters (AND)
td list issues --filter status=open --filter priority=high
# Use structured output with jq for complex filtering
td list issues --output json | jq '.[] | select(.status == "open")'
# Limit results
td list issues --limit 10
# Offset for pagination
td list issues --offset 20 --limit 10
Resources can be identified by:
td get change my-featuretd get change abc123td get changes --selector app=platformOffer both modes:
# Imperative: direct commands
td create issue --title "Bug" --description "..."
# Declarative: from file
td apply -f issue.yaml
Core functionality:
Progressive feature system:
Help and documentation:
--help for all commands-v, -vv)-v and above)-vv)Standard flags and output:
--output flag with json, yaml, table formats<command> version--version flagConfiguration:
~/.config/<command>/config.yaml)jq for JSON parsing, yq for YAML--debug / --verbose flags for troubleshooting~/.config/<command>/config.yaml)tools
<!--VITE PLUS START--> # Using Vite+, the Unified Toolchain for the Web This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`. ## Vite+ Workflow `vp` is a global binary that handles the full development lifecycle. Run `vp help` to pr
development
Guide for building performant data tables. Uses tanstack-table for table logic (sorting, filtering, pagination) and tanstack-virtual for rendering large datasets efficiently.
development
Expert guidance for building observable, expressive, and fault-tolerant TypeScript applications using the effect-ts/effect ecosystem. Covers Effect<A, E, R> type, error management, dependency injection via Layers, observability (logging, metrics, tracing), concurrency with Fibers, retry/scheduling, Schema validation, Streams, and Sinks.
tools
Complete E2E (end-to-end) and integration testing skill for TypeScript/NestJS projects using Jest, real infrastructure via Docker, and GWT pattern. ALWAYS use this skill when user needs to: **SETUP** - Initialize or configure E2E testing infrastructure: - Set up E2E testing for a new project - Configure docker-compose for testing (Kafka, PostgreSQL, MongoDB, Redis) - Create jest-e2e.config.ts or E2E Jest configuration - Set up test helpers for database, Kafka, or Redis - Configure .env.e2e environment variables - Create test/e2e directory structure **WRITE** - Create or add E2E/integration tests: - Write, create, add, or generate e2e tests or integration tests - Test API endpoints, workflows, or complete features end-to-end - Test with real databases, message brokers, or external services - Test Kafka consumers/producers, event-driven workflows - Working on any file ending in .e2e-spec.ts or in test/e2e/ directory - Use GWT (Given-When-Then) pattern for tests **REVIEW** - Audit or evaluate E2E tests: - Review existing E2E tests for quality - Check test isolation and cleanup patterns - Audit GWT pattern compliance - Evaluate assertion quality and specificity - Check for anti-patterns (multiple WHEN actions, conditional assertions) **RUN** - Execute or analyze E2E test results: - Run E2E tests - Start/stop Docker infrastructure for testing - Analyze E2E test results - Verify Docker services are healthy - Interpret test output and failures **DEBUG** - Fix failing or flaky E2E tests: - Fix failing E2E tests - Debug flaky tests or test isolation issues - Troubleshoot connection errors (database, Kafka, Redis) - Fix timeout issues or async operation failures - Diagnose race conditions or state leakage - Debug Kafka message consumption issues **OPTIMIZE** - Improve E2E test performance: - Speed up slow E2E tests - Optimize Docker infrastructure startup - Replace fixed waits with smart polling - Reduce beforeEach cleanup time - Improve test parallelization where safe Keywords: e2e, end-to-end, integration test, e2e-spec.ts, test/e2e, Jest, supertest, NestJS, Kafka, Redpanda, PostgreSQL, MongoDB, Redis, docker-compose, GWT pattern, Given-When-Then, real infrastructure, test isolation, flaky test, MSW, nock, waitForMessages, fix e2e, debug e2e, run e2e, review e2e, optimize e2e, setup e2e