wrap-api-as-plugin
Part of the tinkabot agent preset.
name: wrap-api-as-plugin
description: >-
Use when wrapping an HTTP API, OpenAPI/spec, or "wrap X" into a Cursor/Agent
Plugin (MCP + skills). Prefer before scaffolding files.
Wrap an API as a plugin
Data shape first
Name the domain type before any files. One line, e.g. FxQuote = { amount, base, date, rates } or PokemonSummary = { id, name, height, weight, types }.
Organize tools around that shape, not around whatever the upstream JSON dumps.
Choose format
Docs: https://cursor.com/docs/plugins and https://cursor.com/docs/reference/plugins
Scaffold (smallest)
plugin.json with name, description, version, author.
- If MCP:
mcp.json with matching Agent Plugins $schema, stdio server, cwd: "${PLUGIN_ROOT}", command/args to the server entry.
- One thin skill whose description says when to call the tools. Never invent API data in the skill.
- Public no-auth HTTP: zero-dep stdio MCP (hand-rolled JSON-RPC +
fetch) until an SDK earns its install.
- Auth APIs: declare plugin
variables for secrets; put only ${VAR} placeholders in mcp.json. Never commit keys.
Repo work
Non-trivial repo edits go to a CloudAgent. Do not clone product monorepos onto the agent machine for scaffolding.
Prove + publish
Run prove-plugin-local. When the owner wants it listed, run publish-cursor-plugin: ask once if they work at the company/service — yes (or they insist) → Marketplace, no/unsure → cursor.directory. Trust the answer; the approve gate still blocks submit.
Do not
- Submit anywhere without an explicit owner ask + approve gate
- Paste secrets into chat
- Build host-product Slack bot accounts
1---2name: wrap-api-as-plugin3description: "Use when wrapping an HTTP API, OpenAPI/spec, or \"wrap X\" into a Cursor/Agent Plugin (MCP + skills). Prefer before scaffolding files."4metadata:5 source: https://skillmd.com/skills/brokep/wrap-api-as-plugin6---78# wrap-api-as-plugin910Part of the tinkabot agent preset.1112---13name: wrap-api-as-plugin14description: >-15 Use when wrapping an HTTP API, OpenAPI/spec, or "wrap X" into a Cursor/Agent16 Plugin (MCP + skills). Prefer before scaffolding files.17---18# Wrap an API as a plugin1920## Data shape first2122Name the domain type before any files. One line, e.g. `FxQuote = { amount, base, date, rates }` or `PokemonSummary = { id, name, height, weight, types }`.23Organize tools around that shape, not around whatever the upstream JSON dumps.2425## Choose format2627- **Default: Agent Plugin** at repo root: `plugin.json` (`$schema` https://agent-plugins.org/schemas/1.0.0/plugin.schema.json), optional `mcp.json`, `skills/<name>/SKILL.md`.28- **Cursor Plugin** (`.cursor-plugin/plugin.json`) only when you need rules, hooks, agents, or commands.2930Docs: https://cursor.com/docs/plugins and https://cursor.com/docs/reference/plugins3132## Scaffold (smallest)33341. `plugin.json` with `name`, `description`, `version`, `author`.352. If MCP: `mcp.json` with matching Agent Plugins `$schema`, stdio server, `cwd: "${PLUGIN_ROOT}"`, `command`/`args` to the server entry.363. One thin skill whose description says **when** to call the tools. Never invent API data in the skill.374. Public no-auth HTTP: zero-dep stdio MCP (hand-rolled JSON-RPC + `fetch`) until an SDK earns its install.385. Auth APIs: declare plugin `variables` for secrets; put only `${VAR}` placeholders in `mcp.json`. Never commit keys.3940## Repo work4142Non-trivial repo edits go to a CloudAgent. Do not clone product monorepos onto the agent machine for scaffolding.4344## Prove + publish4546Run prove-plugin-local. When the owner wants it listed, run publish-cursor-plugin: ask once if they work at the company/service — yes (or they insist) → Marketplace, no/unsure → cursor.directory. Trust the answer; the approve gate still blocks submit.4748## Do not4950- Submit anywhere without an explicit owner ask + approve gate51- Paste secrets into chat52- Build host-product Slack bot accounts