Index of every page on this site: llms.txt
All skills
composiohq avatar

/cli-command

@85dab73
by Composiocomposiohq/composio31k stars
4,962
Run it yourself

Design, implement, or review Composio CLI commands under ts/packages/cli using Effect, effect/cli, services, output conventions, configuration and environment variables, and local vendor references. Use for CLI command UX, command wiring, service changes, or CLI source edits. Do not use for CLI E2E-only work; use cli-e2e there.

Use this Skill: https://skilld.dev/gh/composiohq/composio/cli-command

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescommand-example.md

≈1.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

A checked command-authoring example

The example declares an optional toolkit filter, resolves the acting user, sends a scoped native Effect request, and writes JSON. It is a teaching command, not the production connection renderer. The production handler also decodes responses and computes permission groups.

The declaration and handler below are compiled by the CLI's test typecheck. The example test substitutes this declaration for connections list, so argv enters the real command tree and runInvocation over TestLive.

Declaration

import { Command, Flag } from 'effect/cli';
import { withCommandMeta } from 'src/invocation/command-identity';
import { listAccounts } from './command-example.handler';

const toolkit = Flag.String('toolkit').pipe(
  Flag.withDescription('Filter by toolkit slug'),
  Flag.optional
);

/** Teaching example, substituted for connections list only by its test. */
export const connectionsCmd$List = Command.make('list', { toolkit }, listAccounts).pipe(
  Command.withDescription('List connected accounts.'),
  withCommandMeta({ requiresLogin: true })
);

Handler

import { Effect, Option } from 'effect';
import { actingUser } from 'src/commands/surface';
import { ComposioClientSingleton } from 'src/services/composio-clients';
import { idempotent } from 'src/services/composio-request';
import { TerminalUI } from 'src/services/terminal-ui';

export type ListParams = { readonly toolkit: Option.Option<string> };

/** Teaching example: lists accounts through the CLI's native Effect client. */
export const listAccounts = ({ toolkit }: ListParams) =>
  Effect.gen(function* () {
    const ui = yield* TerminalUI;
    const factory = yield* ComposioClientSingleton;
    const { userId, project } = yield* actingUser();
    const client = yield* factory.getFor({ orgId: project.orgId, projectId: project.projectId });
    const result = yield* client.connectedAccounts.list(
      {
        user_ids: [userId],
        toolkit_slugs: Option.map(toolkit, slug => [slug]).pipe(Option.getOrUndefined),
      },
      idempotent
    );
    yield* ui.output(JSON.stringify(result.items), { force: true });
  });

ComposioClientSingleton constructs clients from @composio/client/effect. The handler yields a native client operation directly. Its test replaces the connected-account resource's HTTP transport with the existing recording transport. The test records scope arguments separately because its fixed recording client does not prove scoped request headers. It does not replace the resource operation with a function that returns a canned Effect.

What the checks establish

The root command bun run validate:cli-skills runs in Agent Substrate CI. It checks that linked excerpts still match source, compiles standalone Effect examples and the CLI tests, exercises the example, runs existing registration and invocation contracts, and checks Effect diagnostics.

The example asserts the organization and project passed to getFor, optional-filter request mapping, the acting user, JSON stdout, empty stderr, inherited login enforcement, help/version handling, parse failures, skipped hooks, and lifecycle identity. Existing registration and command-identity tests cover nested providers, reused registrations, root/dev command paths, shared flags, and canonical paths after a rejected command token.

These checks certify the recipe and the selected contracts at the tested revision. They do not certify arbitrary prose claims, live backend behavior, or an agent's ability to apply the skill to an unfamiliar request. The routing checks measure description matching, not skill use. Known telemetry defects from the architecture review remain separate fixes.

Evaluate actual skill use

A separate authoring trial measures whether an agent can use the guidance. The trial starts from a fresh worktree and gives the agent the CLI and Effect skills plus a new task. The evaluator keeps its request assertions out of the agent's starting context.

An example task asks for an optional --limit on the teaching command. When absent, the command must preserve the existing request. When present, it must send the parsed integer as the request limit. The agent must keep login enforcement, output streams, and lifecycle reporting intact.

The evaluator checks both argv forms against the recorded HTTP request, then runs bun run validate:cli-skills. The evaluation records the starting revision, prompt, produced diff, and check results. The task is a template for an unseen trial, not a claim that such a trial has run. Reusing a published solution does not establish performance on an unseen task.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    This skill provides a framework for building and managing CLI commands within the Composio ecosystem. It includes features for executing child processes and handling external data inputs from files and terminal streams, which are standard for developer tools but constitute a surface for indirect injection. The documentation promotes security best practices, such as utilizing system keyrings for credentials and validating all user-supplied data against strict schemas.

  • Sockettoday

    No alerts

  • Snyk2d

    Risk: LOW · No issues

Signed by skilld at 85dab73. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 weeks ago

README badge

README badge for composiohq/composio/cli-command