cli-command

Design and implement Composio CLI commands using Effect and @effect/cli conventions.

30.0k|4.8k|Updated Feb 23, 2024
One-click install
npx skills add https://github.com/ComposioHQ/composio --skill cli-command
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-command
Source: https://github.com/ComposioHQ/composio/tree/main/.agents/skills/cli-command
Command: npx skills add https://github.com/ComposioHQ/composio --skill cli-command

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building or modifying commands in the Composio CLI requires following strict Effect-based patterns, output conventions, configuration rules, and lint-enforced platform boundaries that are easy to get wrong without guidance.

Core Features & Use Cases

  • Command Design Guidance: Covers stdout/stderr separation, flag conventions, help text, error messaging, interactivity rules, and exit codes.
  • Effect Implementation Patterns: Provides wiring patterns for @effect/cli commands, service resolution, and lint-banned Node builtin replacements via @effect/platform.
  • Client Cache Sync Checklist: Ensures changes to composio-clients.ts stay consistent with the cached repository wrapper.
  • Use Case: When adding a new composio subcommand, use this Skill to wire it through the command registry, follow Effect service patterns, and pass the required typecheck and test gates.

Quick Start

Use the cli-command skill to add a new command to the Composio CLI following the Effect and @effect/cli patterns.

Frequently Asked Questions about cli-command

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

FAQPage Schema
How do I add a new command to the Composio CLI?

Create a <name>.cmd.ts file using Command.make from @effect/cli with an Effect.gen body, then register it through src/commands/index.ts or the nearest group entrypoint. Run pnpm typecheck and pnpm --filter @composio/cli test to verify.

How should a CLI handle stdout and stderr output?

Keep stdout for data that scripts capture and stderr for human-readable decoration. Use ui.output() only for script-consumable values, and keep quiet or piped mode clean of decorative output.

Why are node:fs and node:path banned in the Composio CLI source?

The CLI enforces Effect platform boundaries via oxlint, banning Node builtins in src/. Use the Path and FileSystem services from @effect/platform, effect/Config for environment reads, and Either.try for sync fallible operations instead.

How does the Composio CLI read configuration and environment variables?

Runtime config is read via effect/Config from environment variables prefixed with COMPOSIO_, with the prefix stripped on read. Persistent user state lives in ~/.composio/user-config.json, and environment variables override stored values.

When should I not use the cli-command skill?

Do not use it for CLI end-to-end testing work; use the cli-e2e skill instead. The cli-command skill covers command design, implementation, and service changes, not binary behavior verification.