plugins/vercel/skills/micro/SKILL.md
Expert guidance for micro — asynchronous HTTP microservices framework by Vercel. Use when building lightweight HTTP servers, API endpoints, or microservices using the micro library.
npx skillsauth add openai/plugins microInstall 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.
You are an expert in micro, Vercel's lightweight framework for building asynchronous HTTP microservices in Node.js. micro makes it easy to write single-purpose HTTP endpoints with minimal boilerplate.
npm install micro
Create a module that exports a request handler:
// index.ts
import { serve } from 'micro'
const handler = (req: Request) => {
return new Response('Hello, World!')
}
serve(handler)
Or use the classic API:
import { IncomingMessage, ServerResponse } from 'http'
export default (req: IncomingMessage, res: ServerResponse) => {
res.end('Hello, World!')
}
Run with:
npx micro
json(req) — Parse JSON Bodyimport { json } from 'micro'
export default async (req: IncomingMessage, res: ServerResponse) => {
const body = await json(req)
return { received: body }
}
text(req) — Parse Text Bodyimport { text } from 'micro'
export default async (req: IncomingMessage, res: ServerResponse) => {
const body = await text(req)
return `You said: ${body}`
}
buffer(req) — Parse Raw Bodyimport { buffer } from 'micro'
export default async (req: IncomingMessage, res: ServerResponse) => {
const raw = await buffer(req)
return `Received ${raw.length} bytes`
}
send(res, statusCode, data) — Send Responseimport { send } from 'micro'
export default (req: IncomingMessage, res: ServerResponse) => {
send(res, 200, { status: 'ok' })
}
createError(statusCode, message) — HTTP Errorsimport { createError } from 'micro'
export default (req: IncomingMessage, res: ServerResponse) => {
if (!req.headers.authorization) {
throw createError(401, 'Unauthorized')
}
return { authorized: true }
}
micro-dev provides hot-reloading for development:
npm install --save-dev micro-dev
# Run in dev mode
npx micro-dev index.js
Chain multiple handlers with function composition:
import { IncomingMessage, ServerResponse } from 'http'
const cors = (fn: Function) => async (req: IncomingMessage, res: ServerResponse) => {
res.setHeader('Access-Control-Allow-Origin', '*')
return fn(req, res)
}
const handler = async (req: IncomingMessage, res: ServerResponse) => {
return { hello: 'world' }
}
export default cors(handler)
{
"main": "index.js",
"scripts": {
"start": "micro",
"dev": "micro-dev"
},
"dependencies": {
"micro": "^10.0.0"
},
"devDependencies": {
"micro-dev": "^3.0.0"
}
}
createError() for proper status codesmicro-router for multi-route servicesjson(), text(), or buffer() to parse request bodiestools
Top-level workflow skill for USD performance diagnosis and optimization. Use for slow loading, high memory, low FPS, or 'optimize my scene' requests; delegates auth/runtime setup to Phase 0 owners.
data-ai
Use when the user mentions MagicPath, designs, UI components, themes, canvas selections, or repo-to-canvas UI work; run magicpath-ai to search, inspect, install, or author components.
documentation
Use as the top-level router for Omniverse Realtime Viewer USD app requests and focused viewer reference documents.
tools
Turn Notion specs into implementation plans, tasks, and progress tracking; use when implementing PRDs/feature specs and creating Notion plans + tasks from them.