agentleFS
M0xooM0xoo/wisp/.claude/skills/add-command/SKILL.md

add-command

Skill0 starsChanged 17 days agoMITView on GitHub

Use when adding or changing something a user, agent, channel or peer can make wisp do (a command, an HTTP route or an MCP tool) in wisp v2.

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Add a command

  1. Declare it in the owner plugin's api/ (id owner.verb, typed args and result) and in its manifest's contributes.commands.
  2. Implement it in host/ with ctx.command({ id, parse, run }). parse validates unknown input and throws invalid with a field path. run writes only through store.tx (one transaction, the change feed records it) and returns plain JSON.
  3. Permissions are default deny. Name the command in every capability set that should reach it (packages/kernel/src/capabilities.ts): user:full, agent:session, agent:capped (a task a channel started below Full auto), apikey, box. npm run check fails if no set names it.
  4. It must be able to refuse: if another plugin may want to veto it, run an interceptor hook (before:<verb>) before writing, and document the hook in api/.
  5. Client side: defineCommand({ id, optimistic }), where optimistic is the patch it applies at once, or 'none' with a reason. The UI rolls back with a toast on reject.
  6. An HTTP route or MCP tool is a thin adapter over the command. Add the route to OpenAPI (the check fails without it) and MCP tools to the agent-protocol goldens.
  7. Tests: the decider/handler (no mocks), the permission refusal, idempotency (same mid twice runs once). Then .agents/bin/monoflow verify --affected.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.