CLI-First Tooling Instructions

Guidance for preferring compact local CLI tools over MCP servers when they provide the same capability with less context and lower AI cost.

AuthorNeexoCore
Apply to**/*.{ps1,sh,bash,zsh,fish,bat,cmd,json,yml,yaml,md}
Updated
climcpcost

Overview

Agents should prefer local CLI tools when they are available and suitable for the task. A CLI can usually explain itself through --help, expose focused subcommands, and return compact output.

Rule

Use a CLI first when:

  • the task is narrow and command-based
  • the CLI is already installed
  • --help or help <command> gives enough guidance
  • the output can be filtered or scoped

Use MCP when:

  • the task needs richer remote API access
  • the agent benefits from structured tool calls
  • the task spans several resources or systems
  • the CLI is missing important capabilities

Installation

If an approved Neexo Windows AI toolbelt CLI is missing, install it with winget, verify it with --version, and continue. Ask before installing other tools or modifying PowerShell profile files.

Example: use GitHub CLI (gh) for routine issue, PR, repository, and workflow operations. Use GitHub MCP when persistent GitHub API tooling or richer agent-managed operations are needed.

Preferred Commands

Need Prefer Example
Find files rg --files or fd rg --files content plugins
Search text rg rg "copilot plugin" docs content
Inspect JSON jq jq '.plugins[].name' .github/plugin/marketplace.json
Inspect YAML yq yq '.includes.instructions' content/plugins/neexo-guardrails.md
GitHub routine work gh gh pr view --json title,files,reviews
AST-aware code search sg sg -p 'useEffect($$$)' website/src
Repo size overview tokei tokei website/src content

Output Rules

  • Scope commands to the smallest folder or file set that can answer the question.
  • Filter large output with --json, --fields, Select-Object, jq, or rg -n.
  • Prefer read-only commands before commands that write files, open browser sessions, or call remote APIs.
  • For interactive commands, answer one prompt at a time and never route secrets through chat.

Raw content

Copy this into your project — e.g. .instructions.md, .agent.md, or SKILL.md

## Overview

Agents should prefer local CLI tools when they are available and suitable for the task. A CLI can usually explain itself through `--help`, expose focused subcommands, and return compact output.

## Rule

Use a CLI first when:

- the task is narrow and command-based
- the CLI is already installed
- `--help` or `help <command>` gives enough guidance
- the output can be filtered or scoped

Use MCP when:

- the task needs richer remote API access
- the agent benefits from structured tool calls
- the task spans several resources or systems
- the CLI is missing important capabilities

## Installation

If an approved Neexo Windows AI toolbelt CLI is missing, install it with `winget`, verify it with `--version`, and continue. Ask before installing other tools or modifying PowerShell profile files.

Example: use GitHub CLI (`gh`) for routine issue, PR, repository, and workflow operations. Use GitHub MCP when persistent GitHub API tooling or richer agent-managed operations are needed.

## Preferred Commands

| Need | Prefer | Example |
|---|---|---|
| Find files | `rg --files` or `fd` | `rg --files content plugins` |
| Search text | `rg` | `rg "copilot plugin" docs content` |
| Inspect JSON | `jq` | `jq '.plugins[].name' .github/plugin/marketplace.json` |
| Inspect YAML | `yq` | `yq '.includes.instructions' content/plugins/neexo-guardrails.md` |
| GitHub routine work | `gh` | `gh pr view --json title,files,reviews` |
| AST-aware code search | `sg` | `sg -p 'useEffect($$$)' website/src` |
| Repo size overview | `tokei` | `tokei website/src content` |

## Output Rules

- Scope commands to the smallest folder or file set that can answer the question.
- Filter large output with `--json`, `--fields`, `Select-Object`, `jq`, or `rg -n`.
- Prefer read-only commands before commands that write files, open browser sessions, or call remote APIs.
- For interactive commands, answer one prompt at a time and never route secrets through chat.