home / skills / different-ai / agent-bank / 0-finance-cli

0-finance-cli skill

/.opencode/skill/0-finance-cli

This skill keeps the 0 Finance CLI aligned with product capabilities by mirroring features, updating commands, and validating outputs.

npx playbooks add skill different-ai/agent-bank --skill 0-finance-cli

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.8 KB
---
name: 0-finance-cli
description: Keep the 0 Finance CLI aligned with product capabilities.
compatibility: opencode
---

## Purpose

Keep the 0 Finance CLI agent-native: every user-facing capability in 0 Finance
should be mirrored in the CLI. If a feature is added to the product, add the
corresponding CLI command and update docs.

## When to Use

Use this skill whenever modifying the CLI in `packages/cli` (the agent-bank
package) or adding new commands, flags, or authentication flows.

## Workflow

1. Identify the product capability being exposed.
2. Add or update the matching CLI command in `packages/cli/src/index.ts`.
3. Update CLI docs in `packages/docs/cli/` (installation + reference).
4. Update product docs or landing pages if the CLI entrypoint changes.
5. Verify the CLI output examples match actual responses.

## Testing

Run commands from `packages/cli` using either Bun or pnpm:

- `bun --cwd packages/cli run dev -- <command args>`
- `pnpm --filter agent-bank exec tsx src/index.ts <command args>`

## Common Issues

- `pnpm --filter agent-bank dev -- ...` injects a literal `--` argument, which
  Commander treats as end-of-options; use `pnpm --filter agent-bank exec tsx
src/index.ts ...` instead.
- `pnpm exec` prints an extra `undefined` line on non-zero exits; this is a pnpm
  quirk. Use `finance` or Bun for cleaner stderr if needed.

## Documentation Requirements

- Update `packages/docs/cli/reference.mdx` when a command or option changes.
- Update `packages/docs/cli/installation.mdx` when auth or install steps change.
- Keep `packages/docs/index.mdx` quick start in sync with the CLI.

## Completion Criteria

- CLI functionality matches the product capability.
- Docs reflect the latest CLI behavior.
- If the CLI is user-facing, update the landing quick-start copy.

Overview

This skill ensures the 0 Finance CLI stays aligned with product capabilities so the CLI remains an authoritative, agent-native interface. It guides changes to commands, flags, authentication flows, and documentation whenever product features are added or updated. The goal is parity between the public product and the CLI experience.

How this skill works

When a product capability is introduced or changed, the skill maps that capability to a matching CLI command in packages/cli/src/index.ts, updates reference and installation docs, and verifies example outputs. It includes testing commands and notes common pitfalls to ensure reliable, reproducible CLI behavior. Completion is verified by matching functionality and updated user-facing docs.

When to use it

  • Adding new product features that should be exposed to agents via CLI
  • Modifying or extending commands, flags, or auth flows in packages/cli
  • Updating CLI installation or authentication steps
  • Syncing product quick-starts, landing pages, or docs with CLI changes
  • When verifying CLI output examples or fixing command parsing issues

Best practices

  • Add or update the corresponding CLI command immediately when the product changes to avoid drift
  • Update packages/docs/cli/reference.mdx and installation.mdx for any command or auth change
  • Keep packages/docs/index.mdx quick start in sync with CLI entrypoints
  • Test commands locally with Bun or pnpm exec tsx to avoid Commander parsing quirks
  • Verify example outputs in docs match actual CLI responses before publishing

Example use cases

  • Expose a newly released account-management endpoint as a CLI command and add usage examples to reference.mdx
  • Change the auth flow to OAuth: update installation docs and the CLI flags that trigger auth
  • Fix a parsing bug caused by pnpm injecting a literal -- by switching testing instructions to pnpm exec tsx or Bun
  • Update the quick-start on the landing page when the CLI entrypoint or top-level command names change
  • Add a new flag to an existing command and update examples and output screenshots in docs

FAQ

How should I run commands locally for testing?

Use Bun: bun --cwd packages/cli run dev -- <command args> or pnpm --filter agent-bank exec tsx src/index.ts <command args> to avoid Commander treating -- as end-of-options.

What files must I update after changing a command?

Update packages/cli/src/index.ts for code and packages/docs/cli/reference.mdx and installation.mdx for docs. Also sync packages/docs/index.mdx quick start and any landing copy if entrypoints change.