add-a-capability

Installation
SKILL.md

Add a capability

Define the shared contract once. Implement its handler where the data and infrastructure live. Do not write separate business logic for each interface.

1. Define the contract

Put cross-process contracts in packages/core/src/contracts.ts and import defineContract from @rat-stack/capability/contract.

  1. Define the input, output, and expected failure schemas.
  2. Give the contract a stable name and short description.
  3. Use Schema.Struct for the input.
  4. Set honest annotations such as readOnly, idempotent, destructive, and openWorld.
  5. Set needsApproval: true when the action needs approval. implement adds the Approval requirement and ApprovalDenied failure; the handler itself declares only the contract's failures.
Installs
9
GitHub Stars
81
First Seen
12 days ago
add-a-capability — joelhooks/rat-stack