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

/agent-cli

@22dc792
by Dave Ebbelaardaveebbelaar/bama1.9k stars
238
Run it yourself

Optional command line and MCP server for a macOS app, so Claude Code, Codex, and scripts can drive it (list, add, change, search, act) through the running app. Use when the user wants agents to work with their app or its data, asks for a CLI, an MCP server, or automation for the app, or says "Claude should be able to use my app".

Use this Skill: https://skilld.dev/gh/daveebbelaar/bama/agent-cli

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

teach-agents.md

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

Teach agents to drive the app

Agents learn a CLI from three places: a short skill that says when and how to use it, <cli> help, and the errors. Write the skill; the CLI does the rest.

Contents

  • The app's agent skill
  • Where to put it
  • Permissions
  • MCP registration

The app's agent skill

Save as .claude/skills/<cli>/SKILL.md in the app's repo. Replace the angle brackets. Keep it under 60 lines: list the five commands used most, and point at help for the rest.

---
name: <cli>
description: Drive the <App> app on this Mac from the shell with the `<cli>` command: <the main jobs, like "list, add, complete, and search tasks">. Use when the user asks about their <things> or wants to change them, or names <App>.
---

# <App>

`<cli>` runs commands in the <App> app. Changes show in its window at once.
If the app is closed, the command opens it in the background.

## Rules

- Always add `--json` and read the JSON. Exit 0 is ok; otherwise read
  `error.code` and `error.message`, and do what the message says.
- Find ids with `<cli> <noun> list` or `--search`. An id is 8 characters.
- Destructive commands (<delete, send>) only report what they would do.
  Show the user that report and ask before you run it again with `--yes`.
- To try something without real data, add `APP_STORE=/tmp/<cli>-test.store`
  in front of the command.

## Main commands

| Command | Does |
| --- | --- |
| `<cli> status --json` | Is the app running, what is open, counts |
| `<cli> <noun> list [--search T] [--limit N] --json` | Find things |
| `<cli> <noun> add --title T --json` | Add one |
| `<cli> <noun> update <id> [--field value] --json` | Change one |
| `<cli> open <page>` | Show a page in the window |

Everything else: `<cli> help`, and `<cli> help <command>` for its options.

Where to put it

Place Who sees it
.claude/skills/<cli>/SKILL.md in the app's repo Agents working on the app's code
~/.claude/skills/<cli>/SKILL.md Claude Code in any folder: "add milk to my tasks" works everywhere
~/.codex/skills/<cli>/SKILL.md (or AGENTS.md) Codex

Copy the same file to each place the user wants. Update all of them when a command changes.

Permissions

Claude Code asks before each Bash command. Allow the read commands for the user, in .claude/settings.json or ~/.claude/settings.json:

{ "permissions": { "allow": ["Bash(<cli> status:*)", "Bash(<cli> help:*)", "Bash(<cli> <noun> list:*)", "Bash(<cli> <noun> show:*)"] } }

Leave write and destructive commands out, so the user approves each one. Ask the user before changing their settings.

MCP registration

Only when the user wants MCP (Claude Desktop, or one prompt per tool). Always the full path to the binary inside the app: MCP clients do not read the shell's PATH.

claude mcp add --scope user <cli> -- ~/Applications/<App>.app/Contents/MacOS/<App> mcp
claude mcp list            # shows <cli> as connected
codex mcp add <cli> -- ~/Applications/<App>.app/Contents/MacOS/<App> mcp

Claude Desktop, in ~/Library/Application Support/Claude/claude_desktop_config.json:

{ "mcpServers": { "<cli>": { "command": "/Users/<you>/Applications/<App>.app/Contents/MacOS/<App>", "args": ["mcp"] } } }

Restart Claude Desktop after editing. Its logs are in ~/Library/Logs/Claude/mcp-server-<cli>.log.

Tools are named like the commands with _ for spaces (items_add), carry readOnlyHint and destructiveHint, and take the same options as the CLI.

Source: SKILL.md on GitHub

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 alerts17d3 checks · Risk SAFE
  • Gen Agent Trust Hub18d

    This skill provides a development framework for macOS app developers to add agent-controlled CLI and MCP capabilities to their apps. It uses local Unix domain sockets for secure inter-process communication and includes scripts to automate the integration process.

  • Socket17d

    No alerts

  • Snyk18d

    Risk: LOW · No issues

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

Last checked against GitHub 2 weeks ago.

Activeupdated last month
argument-hint
<cli-name, like tasks or mail>

README badge

README badge for daveebbelaar/bama/agent-cli