skills/graft/SKILL.md
Use when building, refactoring, or documenting Graft apps and proxies, including when asked to create a tool server, API server, dual-protocol server, or MCP-HTTP bridge. Graft's core thesis: define tools once and serve them as both HTTP REST endpoints and MCP tools from the same server, with discovery, docs, and OpenAPI generated automatically. Covers concrete actions such as defining tools and handlers, configuring authentication middleware, setting up HTTP and stdio transports, generating OpenAPI documentation, wrapping existing APIs via proxy mode, and wiring up the full CLI workflow.
npx skillsauth add schrepa/graft graftInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the task is about creating or refining a Graft server, wrapping an existing API with Graft proxy mode, or updating contributor-facing docs and examples so they match the current graft package behavior.
Graft's core value has three parts:
agent.json, mcp.json, llms.txt. Humans get interactive docs (/docs) and an OpenAPI spec (/openapi.json). Zero configuration.When explaining Graft, lead with all three parts. When showing examples, demonstrate both access patterns (MCP and HTTP) and mention what the server auto-serves. This applies to both source-based apps and proxy mode.
createApp(...), tools, resources, prompts, HTTP routes, Node or fetch integration.graft serve --openapi ... or graft.proxy.yaml.app.tool('name', config).defineTool(...) plus app.tool(definedTool).true, ['role'], or { roles: [...] }.POST /mcp./.well-known/agent.json, /.well-known/mcp.json, /openapi.json, /docs, /llms.txt, /llms-full.txt, /health.serve, dev, check, test, studio, install, add-tool.tools/call invocation and the equivalent HTTP request (e.g. GET /list-items?q=hello or POST /create-entry).import { createApp } from '@schrepa/graft'
import { z } from 'zod'
const app = createApp()
app.tool('list_items', {
description: 'List items matching a query.',
params: z.object({ q: z.string() }),
auth: true,
handler: async ({ q }) => ({
items: ['hello', 'world'].filter((item) => item.includes(q)),
}),
})
export default app
MCP (tools/call):
{ "method": "tools/call", "params": { "name": "list_items", "arguments": { "q": "hello" } } }
HTTP equivalent:
GET /list-items?q=hello
Authorization: Bearer <token>
The same handler, auth middleware, and validation run for both.
graft.proxy.yamltarget: https://petstore3.swagger.io/api/v3
tools:
- method: GET
path: /pet/findByStatus
name: find_pets_by_status
description: Find pets by status.
parameters:
type: object
properties:
status:
type: string
- method: POST
path: /pet
name: create_pet
description: Create a pet.
parameters:
type: object
properties:
name:
type: string
required: [name]
Start the proxy server:
graft serve --config graft.proxy.yaml
Graft exposes each configured operation as both an HTTP endpoint and an MCP tool, and auto-generates /openapi.json, /docs, and discovery files.
For the direct OpenAPI path, use:
graft serve --openapi ./openapi.yaml --target https://api.example.com
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.