/dev-flow:product-to-agent-skillfrom dev-flow
Generates a distributable SKILL.md for a product's API so coding agents can drive it. Reads Next.js route handlers, OpenAPI specs, or agent tools and produces auth, loop, endpoint reference, error shapes, and common-mistakes tables.
Ships in dev-flow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every product this repo builds may end up with an API. An API that only its own frontend calls is an implementation detail. An API that somebody else's coding agent could drive is a distribution channel, and it needs one artefact to be usable: a skill file that tells that agent how the product works.
This skill writes that file, in the product's repo, for the product's users.
⚠️ The output belongs to the product, never to dev-flow. It lands in
<product-repo>/skills/, it ships and versions with that product, and its
audience is whoever installs the product's own repo. It is not added to this
repo's 45, not copied into ~/.claude/skills/, and not listed in install.sh.
dev-flow builds it and then has nothing more to do with it — the same way it
builds an app/ it does not own.
The reference implementation of the shape is
sleekdotdesign/agent-skills
(MIT, read 2026-09-03, re-read 2026-11-05): a design service published its whole operating manual as
an agent skill and became drivable from Claude Code, Cursor and Codex without
shipping an SDK for any of them. references/anatomy.md is what that taught us,
section by section.
Re-read 2026-11-05 — and it has restructured, which is itself the lesson. On 2026-09-03 it was one 563-line
SKILL.md, and this paragraph said so. Today that file is 118 lines, and the material moved into siblings beside it:designing.md,endpoints.md,implementing.mdandstyling/(three files, one per styling system). About 60 KB in total, so nothing was cut — it was split. The repo is alive and MIT: ★596, pushed 2026-10-05.They converged on progressive disclosure, which is the shape this repo already uses: a short SKILL.md that routes, with the weight in
references/. So the example did not drift away fromanatomy.md— it moved toward it, and the sentence worth carrying forward is not "one long file" but "the whole operating manual, published, in whatever number of files it takes".
app/api/, an OpenAPI spec, a public eve agent, an MCP
server.dev-flow raises it at feature_complete → deployed, once there is a
deployed origin to put in the file.Refuse when the surface is internal-only — a route handler that exists to serve one page is not a product an agent can drive, and a skill describing it would be a lie with a nice table in it.
This skill writes a runbook — a SKILL.md a user installs so their coding agent can drive your
HTTP API. module-add mcp does the other thing: it makes the product an MCP server, so a client
discovers the tools itself and never reads anything.
| this skill | module-add mcp | |
|---|---|---|
| The agent learns the API by | reading a file you wrote | asking the server |
| Works with | any agent, any client, today | MCP clients |
| Costs | one markdown file | an OAuth server, discovery documents, a tool surface |
| Reach for it | almost always — it is the cheap one | when your users live inside a coding agent |
They compose. Ship the runbook first; add MCP when the audience justifies the auth surface.
The default is not a preference, it is an asymmetry: a runbook is one file, written in an hour, that works with every agent today. MCP never replaces it. It is added when specific things are true, and two of these five are enough to pay for it.
1. The users already live in a terminal. Technical teams, data teams, DevOps. If your typical user opens a coding agent every morning, that is where the product should be reachable. If they open Chrome, it is not.
2. You already have an OAuth server. This is the biggest cost multiplier, and it is binary. With
better-auth plus users and organisations already standing, MCP is a plugin and a route. Without it
you are building an authorization server to expose three endpoints — and that is out of proportion to
what you get. A product with only API keys should ship the runbook.
3. There are many operations. Five endpoints fit in a markdown file an agent reads whole. Fifty do not: the context window fills with documentation instead of work. MCP serves them on demand, one schema at a time. The practical threshold is around 15–20 operations.
4. Something can destroy data. If an agent can delete a dataset, revoke an access, cancel an
order, MCP's tool annotations (destructiveHint) make the host stop and ask — by protocol. A
runbook can only write the warning in a sentence and hope it was read as one. This is the single
signal that can justify MCP on its own.
5. The surface is stable. MCP is a contract you maintain: change a tool and clients feel it. A runbook can say plainly "this part moves, re-check it". If the API changes weekly, MCP is ballast.
The mature configuration is both, because the runbook is also the MCP server's documentation. It explains the domain — what a dataset is, why assets get assigned, which order of operations makes sense — and MCP supplies the typed calls. Tools carry schemas; they do not carry why.
So when a product ends up with both, the runbook is not redundant: it stops being an endpoint reference and becomes the part a schema cannot express.
Follows the dev-flow contract — see references/contracts.md. Key facts:
meta.json#stack for the framework, the deployed origin, and whether
stack.agent = "eve" (an eve agent's tools are a callable surface too).skills/<slug>/SKILL.md, plus a README
row and the install line. Never writes to ~/.claude/skills/ and never touches
this repo's own skills.meta.json#stack.agent_skill = "<slug>" and appends history.phase. Horizontal, on demand.<product-repo>/
skills/
<slug>/
SKILL.md ← the runbook
README.md ← one row + the install line
And the install line the product's users will run:
npx skills add <owner>/<repo>
That is the skills CLI (verified at
[email protected]); it writes to .agents/skills/ in the caller's working
directory.
Read it out of the product rather than interviewing:
| Source | Where | What you get |
|---|---|---|
| Next.js route handlers | app/api/**/route.ts | paths, methods, request/response shapes from the code |
| OpenAPI | openapi.json, /api/*/spec.json | the whole contract, typed |
| eve agent | agent/tools/*.ts | tool names, inputSchema, what each returns |
| MCP server | its manifest | tools and their schemas |
Then cut it down. A skill is a runbook, not a dump: the endpoints an agent needs to do the job, in the order it needs them. An endpoint nobody would call from an agent does not earn a section.
The question that decides whether the skill is writable: starting from nothing, how does a caller obtain the id it needs to act? Search returns prose; mutations need an id. If nothing carries one from the first call to the second, the runbook has a hole in the middle and no amount of endpoint documentation fills it.
Trace it end to end, for real, before writing. On the first product this skill ran against, the assistant's reply named the item and its price and no identifier at all — the ids were one event earlier in the stream, inside a fenced tool result. The file had already claimed otherwise.
meta.json about the productstack is what somebody recorded, not what is true. Check each claim you are
about to repeat: stack.auth = "better-auth" on that same product, with
better-auth absent from package.json and referenced nowhere in the code. A
skill that repeats a false security claim is worse than one that omits it.
In order of preference:
POST /device/start
→ show the user a URL and a code → poll → the key arrives once. The agent
never sees a raw credential the user had to paste.<PRODUCT>_API_KEY" — the fallback, not the design.Declare it in the generated frontmatter, so a reader knows before installing:
compatibility: Requires <PRODUCT>_API_KEY. Network access limited to https://<host> only.
metadata:
requires-env: <PRODUCT>_API_KEY
allowed-hosts: https://<host>
If the product charges, the price goes in the skill, next to the first step that leads to a payment page. A payment step must never arrive as a surprise — state the free tier, what it covers, and what sustained use costs.
Do not write the auth section from the code's intent. Test it:
If either lands, the skill is a draft and its first section is the blocker table. Publishing an agent-skill publishes the URL it drives — a file that documents an open door is an invitation with instructions.
The middle of the file is the sequence an agent performs to get a result: create the thing, act on it, wait for it, show the user what happened. Sleek's version is three steps and each one carries the rule that stops an agent getting it wrong — send the whole intent as one message, poll with a give-up, and never call the run done until the user has seen every screen it produced.
Long operations need: the polling schedule, the give-up, the "one at a time" rule if the product has one, and an idempotency key for safe re-sends.
Endpoints with real request/response bodies. Error shapes. Pagination. And a common-mistakes table — the single highest-value section, and the one that must be earned: every row is something that actually went wrong while driving this product, not something you imagined might.
Drive the product through the generated file, following it literally, and fix what the file failed to say. A skill nobody has executed is a guess — the first run of this skill corrected its own output four times before it passed.
Three checks that each caught something real:
null, or a value, and the three mean different things: on that
product a margin was absent on a stock change, null when the cost was not
recorded, and a figure otherwise. The file described the middle case only,
which would have had a caller announce "unknown margin" over a restock.curl -N exit non-zero, which looks like a failure and is not one. Say
which event means stop, and say who closes the connection.Then wire distribution: the README row, the install line, and a note that the file must be updated when the API changes — an agent-skill that has drifted from its product is worse than none, because it fails with confidence.
references/anatomy.md — the section-by-section anatomy, taken from a
published agent-skill that works, with the rules each section encodes.references/contracts.md — the .workflow/ dev-flow contract (vendored).What SKILL.md sets; muted values are Claude Code's defaults
57 skills in this plugin
/animated-iconsAdd a Motion-animated icon to a Next.js app from a shadcn registry instead of hand-animating an SVG. Two registries, picked from the project's icon set: **heroicons-animated** (316 icons, `shadcn add @heroicons-animated/<name>`) and **hugeicons-animated** (165 icons, `shadcn add @hugeicons-animated/<name>`, which also installs a shared `lib/use-icon-animation.ts`). Both MIT, both on the `motion` runtime, both copied into your repo as source. This skill owns the install plus the two things the raw components lack: a `prefers-reduced-motion` guard and timing aligned to the project motion tokens (`lib/motion/`). Use when the user says "animated icon", "animate this icon", "make the bell/heart/menu icon animate on hover", "aggiungi un'icona animata", or wants an icon micro-interaction. Refuses outside Next.js web — for React Native use `rn-animations-gestures`. Not for: static icons, a whole motion system (`transitions`), or installing the runtime itself (`module-add motion`)./app-securityCheck whether an app's own code can be attacked before it ships — vulnerable dependencies, secrets in the code and in git history, Next.js authorization gaps (Server Actions and route handlers without a session check, queries by id with no owner filter — IDOR), data over-exposure, secrets in public env vars, raw SQL — then read the flagged code against an OWASP checklist, with an opt-in dynamic level (Strix) that proves exploits against the app running locally. The fifth pre-deploy gate, beside compliance-audit, vercel-doctor, shadscan and launch-audit; reports and routes, never blocks. Triggers: "security review", "è sicura l'app?", "controllo di sicurezza prima del deploy", "IDOR", "secrets in the repo", "pentest". Not for: GDPR and legal (compliance-audit), UI quality (shadscan), cost (vercel-doctor), launch readiness (launch-audit), a review of one branch diff (Claude Code's /security-review), third-party registry code (registry-intake)./app-verificationGive a project a manual for proving its features on the real app, written once and kept true: `.claude/skills/verify-<app>/` with how to launch it until it is usable, a read-only doctor check, how to drive it with the repo's real selectors, what counts as proof and where it goes, how to stop only what it started — plus one feature file per PRD story, seeded from the wireframe screen inventory, and a headless-Chrome render probe (overflow, wrapped headings, text hidden under reduced motion). Two modes: create (scaffold, fill from the code, prove it live once, record `meta.json#verification`) and maintain (re-read every feature from source, drive them all live, fix the manual, report real regressions). Web, Expo and eve. Triggers: "verify the app", "prova che funziona", "verification skill", "come si avvia l'app per provarla", "maintain the verify skill", "il manuale di verifica è aggiornato?". Not for: writing tests (write-tests), UI audits (shadscan), security (app-security), deploying (vercel-deploy)./compliance-auditRun a GDPR + EU AI Act compliance audit on an existing dev-flow project (web / mobile / eve agent) and remediate what it finds. Two modes: Audit (scan the codebase and `meta.json#stack` against a 11-point risk register — DSAR, consent/cookies, EU data residency, retention and PII-scrubbing, AI-transparency Art.50, high-risk Annex III, sub-processors — into a report with severity, evidence and article mapping) and Remediate (apply the safe mechanical mitigations, flag the ones needing a legal decision, never deciding legal basis or high-risk for the user). A pre-deploy gate; run it any time. Triggers: "audit GDPR", "compliance check", "AI Act", "siamo conformi?", "DSAR / cancellazione account / cookie consent / data residency". Not for: the other pre-deploy gates (vercel-doctor, shadscan, launch-audit, app-security), legal advice or DPIA sign-off (a DPO confirms), building features, or writing the PRD (use prd-from-idea)./composition-patterns-guideUse when refactoring React or React Native components that suffer from boolean prop proliferation, missing compound structure, prop drilling, or unclear ownership of state. Codifies the 7 Vercel composition-patterns rules for our web + RN stack — composition or explicit variants over boolean props, compound components with shared context, state lifted into providers, children over render props, React 19 (no forwardRef) — plus our colocation rules (Rule of Three, L0/L1/L2, `_components/`). Triggers on: "refactor this component", "questo componente ha troppi prop booleani", "rendi questo componente più componibile", "compound component", "context provider per X", "design del componente". Not for: scaffolding new components (use design-md-to-app, screenshot-to-page, rn-add-screen), or moving components up the hierarchy (use promote-component)./coss-uiSet up or extend a Next.js web app with Coss/UI — the official Cal.com design system, built on Base UI + Tailwind CSS v4 and installed through the shadcn CLI via the namespaced `@coss/*` registry. Two modes: Init (`shadcn init @coss/style` on a new project) and Add (pull `@coss/ui` primitives, single `@coss/<name>` components, or particles into an existing one). Sets `meta.json#stack.ui = "coss"`. Triggers: "usa Coss/UI", "coss.com/ui", "Cal.com design system", "aggiungi un componente Coss", "init @coss/style", "scaffold con Coss UI", or dev-flow routing when `stack.ui = "coss"`. Requires Tailwind CSS v4 and carries a mixed MIT/AGPLv3 license. Not for: writing the DESIGN.md (use figma-to-design-md / image-to-design-md), the generic Next.js scaffold (design-md-to-app owns it), backend modules (module-add), or React Native (RN uses NativeWind, not Coss).npx claudepluginhub lukedj78/dev-flow --plugin dev-flow