# AI CLI Doctor

> Diagnose AI coding CLI installations, PATH issues, and headless command syntax for agent-to-agent delegation.

AI CLI Doctor is a free AI agent skill on Agensi by Rakgorak Rak, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Rakgorak Rak](https://www.agensi.io/creators/superai-rakkyxd)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-11-25
- Security: scan passed (2026-11-25); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/ai-cli-doctor
- Tags: ai-agents, devops, productivity, cli-tool, node-js, dev-environment

## About this skill

"Command not found" is the most common reason one AI agent can't hand work to another. This skill gives your agent a read-only diagnostic that finds every AI coding CLI on the machine, flags the ones hidden from `PATH`, and prints the exact headless command for each.

### What it does
- **CLI Discovery** scans the system for Claude Code, Codex, Antigravity, Gemini CLI, OpenCode, Cursor Agent, GitHub Copilot CLI and Aider.
- **Path Validation** identifies binaries that are installed in per-user folders but missing from `PATH`.
- **Dependency Check** verifies Node.js and Git, which most AI CLIs depend on.
- **Environment Audit** reports which API-key variable names are set, never their values.
- **Delegation Mapping** prints the exact headless (one-shot) command for each installed CLI, ready for agent-to-agent handoffs.

### How it works
1. Your agent runs `node scripts/cli-doctor.mjs` (about two seconds).
2. Add `--json` for machine-readable output in automated workflows.
3. The agent reads the status table: `OK`, `NOT ON PATH`, `MISSING`, or a failed `--version`.
4. It gives you the exact fix for each problem. It never edits `PATH`, installs software or changes shell profiles by itself.

### Frameworks & tools
A single Node.js 18+ file with no dependencies. Works on Windows (including npm `.cmd` shims), macOS and Linux.

### Why this beats prompting it yourself
`which` and `where` only search your current `PATH`. This skill also checks the per-user folders where installers commonly put AI CLIs, catches binaries that exist but fail to run, and hands your agent verified one-shot commands instead of guessed flags.

### Use cases
- Debugging "command not found" errors when invoking AI CLIs.
- Setting up a new development machine for multi-agent workflows.
- Checking readiness before delegating tasks between models.
- Confirming which API-key variables are set (names only).

### Security
Read-only. It runs only `<cli> --version` for each CLI it finds, without a shell. No network access and no file writes.

### Known limitations
Requires Node.js 18+. It reports problems but does not install software or edit `PATH`. CLIs that use a browser sign-in show an empty API-key column, which is normal.

## Requires

- Node.js 18+

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the AI CLI Doctor skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill help with agent-to-agent delegation?

It scans your machine for installed AI coding CLIs, flags any that are installed but hidden from PATH, and prints the exact headless (one-shot) command for each, so one agent can reliably call another. It reports problems; it never edits PATH or installs anything itself.

### Which AI coding CLIs are currently supported by the diagnostic scan?

The doctor supports a wide range of popular tools including Claude Code, Aider, Cursor Agent, GitHub Copilot CLI, Codex, and OpenCode, ensuring your entire AI toolkit is visible and functional.

### Will this skill automatically modify my system's PATH or shell profile?

No, the skill is designed for safety; it performs a read-only audit of your environment and provides specific 'Fix' commands for you to review and run manually to repair your configuration.

### What are the technical requirements to run the AI CLI Doctor?

The skill is built for Node.js environments (v18+) and works across standard development setups where AI CLI tools are typically installed via npm, pip, or direct binaries.

### Why should I use this instead of running basic 'which' or 'where' commands?

Unlike standard commands that only check your active PATH, this tool performs deep file system lookups for hidden npm shims and per-user application folders that agents often fail to locate.

### What do I get?

One read-only Node.js script (scripts/cli-doctor.mjs) and a SKILL.md that tells your agent how to run it, read the result and use the headless command cheat sheet. It's free.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
