[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F0MWQE7BF21VSXP3J97CFW":3,"skill-same:01M7F0MWQE7BF21VSXP3J97CFW":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7F0MWQE7BF21VSXP3J97CFW","hono",null,"Use when building Hono web applications or when the user asks about Hono APIs, routing, middleware, JSX, validation, testing, or streaming. TRIGGER when code imports from 'hono' or 'hono\u002F*', or user mentions Hono. Use `npx hono request` to test endpoints.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fhono\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: hono\ndescription: Use when building Hono web applications or when the user asks about Hono APIs, routing, middleware, JSX, validation, testing, or streaming. TRIGGER when code imports from 'hono' or 'hono\u002F*', or user mentions Hono. Use `npx hono request` to test endpoints.\n---\n\n# Hono Skill\n\nBuild Hono web applications. This skill provides inline API knowledge for AI. Use `npx hono request` to test endpoints. If the `hono-docs` MCP server is configured, prefer its tools for the latest documentation over the inline reference.\n\n## Hono CLI Usage\n\n### Request Testing\n\nTest endpoints without starting an HTTP server. Uses `app.request()` internally.\n\n```bash\n# GET request\nnpx hono request [file] -P \u002Fpath\n\n# POST request with JSON body\nnpx hono request [file] -X POST -P \u002Fapi\u002Fusers -d '{\"name\": \"test\"}'\n```\n\n**Note:** Do not pass credentials directly in CLI arguments. Use environment variables for sensitive values. `hono request` does not support Cloudflare Workers bindings (KV, D1, R2, etc.). When bindings are required, use `workers-fetch` instead:\n\n```bash\nnpx workers-fetch \u002Fpath\nnpx workers-fetch -X POST -H \"Content-Type:application\u002Fjson\" -d '{\"name\":\"test\"}' \u002Fapi\u002Fusers\n```\n\n---\n\n## Hono API Reference\n\n### App Constructor\n\n```ts\nimport { Hono } from 'hono'\n\nconst app = new Hono()\n\n\u002F\u002F With TypeScript generics\ntype Env = {\n  Bindings: { DATABASE: D1Database; KV: KVNamespace }\n  Variables: { user: User }\n}\nconst app = new Hono\u003CEnv>()\n```\n\n### Routing Methods\n\n```ts\napp.get('\u002Fpath', handler)\napp.post('\u002Fpath', handler)\napp.put('\u002Fpath', handler)\napp.delete('\u002Fpath', handler)\napp.patch('\u002Fpath', handler)\napp.options('\u002Fpath', handler)\napp.all('\u002Fpath', handler) \u002F\u002F all HTTP methods\napp.on('PURGE', '\u002Fpath', handler) \u002F\u002F custom method\napp.on(['PUT', 'DELETE'], '\u002Fpath', handler) \u002F\u002F multiple methods\n```\n\n### Routing Patterns\n\n```ts\n\u002F\u002F Path parameters\napp.get('\u002Fuser\u002F:name', (c) => {\n  const name = c.req.param('name')\n  return c.json({ name })\n})\n\n\u002F\u002F Multiple params\napp.get('\u002Fposts\u002F:id\u002Fcomments\u002F:commentId', (c) => {\n  const { id, commentId } = c.req.param()\n})\n\n\u002F\u002F Optional parameters\napp.get('\u002Fapi\u002Fanimal\u002F:type?', (c) => c.text('Animal!'))\n\n\u002F\u002F Wildcards\napp.get('\u002Fwild\u002F*\u002Fcard', (c) => c.text('Wildcard'))\n\n\u002F\u002F Regexp constraints\napp.get('\u002Fpost\u002F:date{[0-9]+}\u002F:title{[a-z]+}', (c) => {\n  const { date, title } = c.req.param()\n})\n\n\u002F\u002F Chained routes\napp\n  .get('\u002Fendpoint', (c) => c.text('GET'))\n  .post((c) => c.text('POST'))\n  .delete((c) => c.text('DELETE'))\n```\n\n### Route Grouping\n\n```ts\n\u002F\u002F Using route()\nconst api = new Hono()\napi.get('\u002Fusers', (c) => c.json([]))\n\nconst app = new Hono()\napp.route('\u002Fapi', api) \u002F\u002F mounts at \u002Fapi\u002Fusers\n\n\u002F\u002F Using basePath()\nconst app = new Hono().basePath('\u002Fapi')\napp.get('\u002Fusers', (c) => c.json([])) \u002F\u002F GET \u002Fapi\u002Fusers\n```\n\n### Error Handling\n\n```ts\napp.notFound((c) => c.json({ message: 'Not Found' }, 404))\n\napp.onError((err, c) => {\n  console.error(err)\n  return c.json({ message: 'Internal Server Error' }, 500)\n})\n```\n\n---\n\n## Context (c)\n\n### Response Methods\n\n```ts\nc.text('Hello') \u002F\u002F text\u002Fplain\nc.json({ message: 'Hello' }) \u002F\u002F application\u002Fjson\nc.html('\u003Ch1>Hello\u003C\u002Fh1>') \u002F\u002F text\u002Fhtml\nc.redirect('\u002Fnew-path') \u002F\u002F 302 redirect\nc.redirect('\u002Fnew-path', 301) \u002F\u002F 301 redirect\nc.body('raw body', 200, headers) \u002F\u002F raw response\nc.notFound() \u002F\u002F 404 response\n```\n\n### Headers & Status\n\n```ts\nc.status(201)\nc.header('X-Custom', 'value')\nc.header('Cache-Control', 'no-store')\n```\n\n### Variables (request-scoped data)\n\n```ts\n\u002F\u002F In middleware\nc.set('user', { id: 1, name: 'Alice' })\n\n\u002F\u002F In handler\nconst user = c.get('user')\n\u002F\u002F or\nconst user = c.var.user\n```\n\n### Environment (Cloudflare Workers)\n\n```ts\nconst value = await c.env.KV.get('key')\nconst db = c.env.DATABASE\nc.executionCtx.waitUntil(promise)\n```\n\n### Renderer\n\n```ts\napp.use(async (c, next) => {\n  c.setRenderer((content) =>\n    c.html(\n      \u003Chtml>\u003Cbody>{content}\u003C\u002Fbody>\u003C\u002Fhtml>\n    )\n  )\n  await next()\n})\n\napp.get('\u002F', (c) => c.render(\u003Ch1>Hello\u003C\u002Fh1>))\n```\n\n---\n\n## HonoRequest (c.req)\n\n```ts\nc.req.param('id') \u002F\u002F path parameter\nc.req.param() \u002F\u002F all path params as object\nc.req.query('page') \u002F\u002F query string parameter\nc.req.query() \u002F\u002F all query params as object\nc.req.queries('tags') \u002F\u002F multiple values: ?tags=A&tags=B → ['A', 'B']\nc.req.header('Authorization') \u002F\u002F request header\nc.req.header() \u002F\u002F all headers (keys are lowercase)\n\n\u002F\u002F Body parsing\nawait c.req.json() \u002F\u002F parse JSON body\nawait c.req.text() \u002F\u002F parse text body\nawait c.req.formData() \u002F\u002F parse as FormData\nawait c.req.parseBody() \u002F\u002F parse multipart\u002Fform-data or urlencoded\nawait c.req.arrayBuffer() \u002F\u002F parse as ArrayBuffer\nawait c.req.blob() \u002F\u002F parse as Blob\n\n\u002F\u002F Validated data (used with validator middleware)\nc.req.valid('json')\nc.req.valid('query')\nc.req.valid('form')\nc.req.valid('param')\n\n\u002F\u002F Properties\nc.req.url \u002F\u002F full URL string\nc.req.path \u002F\u002F pathname\nc.req.method \u002F\u002F HTTP method\nc.req.raw \u002F\u002F underlying Request object\n```\n\n---\n\n## Middleware\n\n### Using Built-in Middleware\n\n```ts\nimport { cors } from 'hono\u002Fcors'\nimport { logger } from 'hono\u002Flogger'\nimport { basicAuth } from 'hono\u002Fbasic-auth'\nimport { prettyJSON } from 'hono\u002Fpretty-json'\nimport { secureHeaders } from 'hono\u002Fsecure-headers'\nimport { etag } from 'hono\u002Fetag'\nimport { compress } from 'hono\u002Fcompress'\nimport { poweredBy } from 'hono\u002Fpowered-by'\nimport { timing } from 'hono\u002Ftiming'\nimport { cache } from 'hono\u002Fcache'\nimport { bearerAuth } from 'hono\u002Fbearer-auth'\nimport { jwt } from 'hono\u002Fjwt'\nimport { csrf } from 'hono\u002Fcsrf'\nimport { ipRestriction } from 'hono\u002Fip-restriction'\nimport { bodyLimit } from 'hono\u002Fbody-limit'\nimport { requestId } from 'hono\u002Frequest-id'\nimport { methodOverride } from 'hono\u002Fmethod-override'\nimport { trailingSlash, trimTrailingSlash } from 'hono\u002Ftrailing-slash'\n\n\u002F\u002F Registration\napp.use(logger()) \u002F\u002F all routes\napp.use('\u002Fapi\u002F*', cors()) \u002F\u002F specific path\napp.post('\u002Fapi\u002F*', basicAuth({ username: 'admin', password: 'secret' }))\n```\n\n### Custom Middleware\n\n```ts\n\u002F\u002F Inline\napp.use(async (c, next) => {\n  const start = Date.now()\n  await next()\n  const elapsed = Date.now() - start\n  c.res.headers.set('X-Response-Time', `${elapsed}ms`)\n})\n\n\u002F\u002F Reusable with createMiddleware\nimport { createMiddleware } from 'hono\u002Ffactory'\n\nconst auth = createMiddleware(async (c, next) => {\n  const token = c.req.header('Authorization')\n  if (!token) return c.json({ error: 'Unauthorized' }, 401)\n  await next()\n})\n\napp.use('\u002Fapi\u002F*', auth)\n```\n\n### Middleware Execution Order\n\nMiddleware executes in registration order. `await next()` calls the next middleware\u002Fhandler, and code after `next()` runs on the way back:\n\n```\nRequest → mw1 before → mw2 before → handler → mw2 after → mw1 after → Response\n```\n\n```ts\napp.use(async (c, next) => {\n  \u002F\u002F before handler\n  await next()\n  \u002F\u002F after handler\n})\n```\n\n---\n\n## Validation\n\nValidation targets: `json`, `form`, `query`, `header`, `param`, `cookie`.\n\n### Zod Validator\n\n```ts\nimport { zValidator } from '@hono\u002Fzod-validator'\nimport { z } from 'zod'\n\nconst schema = z.object({\n  title: z.string().min(1),\n  body: z.string()\n})\n\napp.post('\u002Fposts', zValidator('json', schema), (c) => {\n  const data = c.req.valid('json') \u002F\u002F fully typed\n  return c.json(data, 201)\n})\n```\n\n### Valibot \u002F Standard Schema Validator\n\n```ts\nimport { sValidator } from '@hono\u002Fstandard-validator'\nimport * as v from 'valibot'\n\nconst schema = v.object({ name: v.string(), age: v.number() })\n\napp.post('\u002Fusers', sValidator('json', schema), (c) => {\n  const data = c.req.valid('json')\n  return c.json(data, 201)\n})\n```\n\n---\n\n## JSX\n\n### Setup\n\nIn `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"hono\u002Fjsx\"\n  }\n}\n```\n\nOr use pragma: `\u002F** @jsxImportSource hono\u002Fjsx *\u002F`\n\n**Important:** Files using JSX must have a `.tsx` extension. Rename `.ts` to `.tsx` or the compiler will fail.\n\n### Components\n\n```tsx\nimport type { PropsWithChildren } from 'hono\u002Fjsx'\n\nconst Layout = (props: PropsWithChildren) => (\n  \u003Chtml>\n    \u003Chead>\n      \u003Ctitle>My App\u003C\u002Ftitle>\n    \u003C\u002Fhead>\n    \u003Cbody>{props.children}\u003C\u002Fbody>\n  \u003C\u002Fhtml>\n)\n\nconst UserCard = ({ name }: { name: string }) => (\n  \u003Cdiv class=\"card\">\n    \u003Ch2>{name}\u003C\u002Fh2>\n  \u003C\u002Fdiv>\n)\n\napp.get('\u002F', (c) => {\n  return c.html(\n    \u003CLayout>\n      \u003CUserCard name=\"Alice\" \u002F>\n    \u003C\u002FLayout>\n  )\n})\n```\n\n### jsxRenderer Middleware\n\nUse `jsxRenderer` middleware for layouts. See `npx hono docs \u002Fdocs\u002Fmiddleware\u002Fbuiltin\u002Fjsx-renderer` for details.\n\n### Async Components\n\n```tsx\nconst UserList = async () => {\n  const users = await fetchUsers()\n  return (\n    \u003Cul>\n      {users.map((u) => (\n        \u003Cli>{u.name}\u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  )\n}\n```\n\n### Fragments\n\n```tsx\nconst Items = () => (\n  \u003C>\n    \u003Cli>Item 1\u003C\u002Fli>\n    \u003Cli>Item 2\u003C\u002Fli>\n  \u003C\u002F>\n)\n```\n\n---\n\n## Streaming\n\n```ts\nimport { stream, streamText, streamSSE } from 'hono\u002Fstreaming'\n\n\u002F\u002F Basic stream\napp.get('\u002Fstream', (c) => {\n  return stream(c, async (stream) => {\n    stream.onAbort(() => console.log('Aborted'))\n    await stream.write(new Uint8Array([0x48, 0x65]))\n    await stream.pipe(readableStream)\n  })\n})\n\n\u002F\u002F Text stream\napp.get('\u002Fstream-text', (c) => {\n  return streamText(c, async (stream) => {\n    await stream.writeln('Hello')\n    await stream.sleep(1000)\n    await stream.write('World')\n  })\n})\n\n\u002F\u002F Server-Sent Events\napp.get('\u002Fsse', (c) => {\n  return streamSSE(c, async (stream) => {\n    let id = 0\n    while (true) {\n      await stream.writeSSE({\n        data: JSON.stringify({ time: new Date().toISOString() }),\n        event: 'time-update',\n        id: String(id++)\n      })\n      await stream.sleep(1000)\n    }\n  })\n})\n```\n\n---\n\n## Testing with app.request()\n\nTest endpoints without starting an HTTP server:\n\n```ts\n\u002F\u002F GET\nconst res = await app.request('\u002Fposts')\nexpect(res.status).toBe(200)\nexpect(await res.json()).toEqual({ posts: [] })\n\n\u002F\u002F POST with JSON\nconst res = await app.request('\u002Fposts', {\n  method: 'POST',\n  body: JSON.stringify({ title: 'Hello' }),\n  headers: { 'Content-Type': 'application\u002Fjson' }\n})\n\n\u002F\u002F POST with FormData\nconst formData = new FormData()\nformData.append('name', 'Alice')\nconst res = await app.request('\u002Fusers', { method: 'POST', body: formData })\n\n\u002F\u002F With mock env (Cloudflare Workers bindings)\nconst res = await app.request('\u002Fapi\u002Fdata', {}, { KV: mockKV, DATABASE: mockDB })\n\n\u002F\u002F Using Request object\nconst req = new Request('http:\u002F\u002Flocalhost\u002Fapi', { method: 'DELETE' })\nconst res = await app.request(req)\n```\n\n---\n\n## Hono Client (RPC)\n\nType-safe API client using shared types between server and client.\n\n**IMPORTANT: Routes MUST be chained for type inference to work. Without chaining, the client cannot infer route types.**\n\n```ts\n\u002F\u002F Server: routes MUST be chained to preserve types\nconst route = app\n  .post('\u002Fposts', zValidator('json', schema), (c) => {\n    return c.json({ ok: true }, 201)\n  })\n  .get('\u002Fposts', (c) => {\n    return c.json({ posts: [] })\n  })\nexport type AppType = typeof route\n\n\u002F\u002F Client: use hc() with the exported type\nimport { hc } from 'hono\u002Fclient'\nimport type { AppType } from '.\u002Fserver'\n\nconst client = hc\u003CAppType>('http:\u002F\u002Flocalhost:8787\u002F')\nconst res = await client.posts.$post({ json: { title: 'Hello' } })\nconst data = await res.json() \u002F\u002F fully typed\n```\n\nType utilities:\n\n```ts\nimport type { InferRequestType, InferResponseType } from 'hono\u002Fclient'\n\ntype ReqType = InferRequestType\u003Ctypeof client.posts.$post>\ntype ResType = InferResponseType\u003Ctypeof client.posts.$post, 200>\n```\n\n---\n\n## Helpers\n\nHelpers are utility functions imported from `hono\u002F\u003Chelper-name>`:\n\n```ts\nimport { getConnInfo } from 'hono\u002Fconninfo'\nimport { getCookie, setCookie, deleteCookie } from 'hono\u002Fcookie'\nimport { css, Style } from 'hono\u002Fcss'\nimport { createFactory } from 'hono\u002Ffactory'\nimport { html, raw } from 'hono\u002Fhtml'\nimport { stream, streamText, streamSSE } from 'hono\u002Fstreaming'\nimport { testClient } from 'hono\u002Ftesting'\nimport { upgradeWebSocket } from 'hono\u002Fcloudflare-workers' \u002F\u002F or other adapter\n```\n\nAvailable helpers: Accepts, Adapter, ConnInfo, Cookie, css, Dev, Factory, html, JWT, Proxy, Route, SSG, Streaming, Testing, WebSocket.\n\nFor details, use `npx hono docs \u002Fdocs\u002Fhelpers\u002F\u003Chelper-name>`.\n\n### Factory\n\nUse `createFactory` to define `Env` once and share it across app, middleware, and handlers:\n\n```ts\nimport { createFactory } from 'hono\u002Ffactory'\n\nconst factory = createFactory\u003CEnv>()\n\n\u002F\u002F Create app (Env type is inherited)\nconst app = factory.createApp()\n\n\u002F\u002F Create middleware (Env type is inherited, no need to pass generics)\nconst mw = factory.createMiddleware(async (c, next) => {\n  await next()\n})\n\n\u002F\u002F Create handlers separately (preserves type inference)\nconst handlers = factory.createHandlers(logger(), (c) => c.json({ message: 'Hello' }))\napp.get('\u002Fapi', ...handlers)\n```\n\n---\n\n## Best Practices\n\n- Write handlers inline in route definitions for proper type inference of path params.\n- Use `app.route()` to organize large apps by feature, not Rails-style controllers.\n- Use `createFactory()` to share Env type across app, middleware, and handlers.\n- Use `c.set()`\u002F`c.get()` to pass data between middleware and handlers.\n- Chain validators for multiple request parts (param + query + json).\n- Export app type for RPC: `export type AppType = typeof routes`\n- Use `app.request()` for testing — no server startup needed.\n\n## Adapters\n\nHono runs on multiple runtimes. The default export works for Cloudflare Workers, Deno, and Bun. For Node.js, use the Node adapter:\n\n```ts\n\u002F\u002F Cloudflare Workers \u002F Deno \u002F Bun\nexport default app\n\n\u002F\u002F Node.js\nimport { serve } from '@hono\u002Fnode-server'\nserve(app)\n```\n","# Hono Skill\n\nBuild Hono web applications. This skill provides inline API knowledge for AI. Use `npx hono request` to test endpoints. If the `hono-docs` MCP server is configured, prefer its tools for the latest documentation over the inline reference.\n\n## Hono CLI Usage\n\n### Request Testing\n\nTest endpoints without starting an HTTP server. Uses `app.request()` internally.\n\n```bash\n# GET request\nnpx hono request [file] -P \u002Fpath\n\n# POST request with JSON body\nnpx hono request [file] -X POST -P \u002Fapi\u002Fusers -d '{\"name\": \"test\"}'\n```\n\n**Note:** Do not pass credentials directly in CLI arguments. Use environment variables for sensitive values. `hono request` does not support Cloudflare Workers bindings (KV, D1, R2, etc.). When bindings are required, use `workers-fetch` instead:\n\n```bash\nnpx workers-fetch \u002Fpath\nnpx workers-fetch -X POST -H \"Content-Type:application\u002Fjson\" -d '{\"name\":\"test\"}' \u002Fapi\u002Fusers\n```\n\n---\n\n## Hono API Reference\n\n### App Constructor\n\n```ts\nimport { Hono } from 'hono'\n\nconst app = new Hono()\n\n\u002F\u002F With TypeScript generics\ntype Env = {\n  Bindings: { DATABASE: D1Database; KV: KVNamespace }\n  Variables: { user: User }\n}\nconst app = new Hono\u003CEnv>()\n```\n\n### Routing Methods\n\n```ts\napp.get('\u002Fpath', handler)\napp.post('\u002Fpath', handler)\napp.put('\u002Fpath', handler)\napp.delete('\u002Fpath', handler)\napp.patch('\u002Fpath', handler)\napp.options('\u002Fpath', handler)\napp.all('\u002Fpath', handler) \u002F\u002F all HTTP methods\napp.on('PURGE', '\u002Fpath', handler) \u002F\u002F custom method\napp.on(['PUT', 'DELETE'], '\u002Fpath', handler) \u002F\u002F multiple methods\n```\n\n### Routing Patterns\n\n```ts\n\u002F\u002F Path parameters\napp.get('\u002Fuser\u002F:name', (c) => {\n  const name = c.req.param('name')\n  return c.json({ name })\n})\n\n\u002F\u002F Multiple params\napp.get('\u002Fposts\u002F:id\u002Fcomments\u002F:commentId', (c) => {\n  const { id, commentId } = c.req.param()\n})\n\n\u002F\u002F Optional parameters\napp.get('\u002Fapi\u002Fanimal\u002F:type?', (c) => c.text('Animal!'))\n\n\u002F\u002F Wildcards\napp.get('\u002Fwild\u002F*\u002Fcard', (c) => c.text('Wildcard'))\n\n\u002F\u002F Regexp constraints\napp.get('\u002Fpost\u002F:date{[0-9]+}\u002F:title{[a-z]+}', (c) => {\n  const { date, title } = c.req.param()\n})\n\n\u002F\u002F Chained routes\napp\n  .get('\u002Fendpoint', (c) => c.text('GET'))\n  .post((c) => c.text('POST'))\n  .delete((c) => c.text('DELETE'))\n```\n\n### Route Grouping\n\n```ts\n\u002F\u002F Using route()\nconst api = new Hono()\napi.get('\u002Fusers', (c) => c.json([]))\n\nconst app = new Hono()\napp.route('\u002Fapi', api) \u002F\u002F mounts at \u002Fapi\u002Fusers\n\n\u002F\u002F Using basePath()\nconst app = new Hono().basePath('\u002Fapi')\napp.get('\u002Fusers', (c) => c.json([])) \u002F\u002F GET \u002Fapi\u002Fusers\n```\n\n### Error Handling\n\n```ts\napp.notFound((c) => c.json({ message: 'Not Found' }, 404))\n\napp.onError((err, c) => {\n  console.error(err)\n  return c.json({ message: 'Internal Server Error' }, 500)\n})\n```\n\n---\n\n## Context (c)\n\n### Response Methods\n\n```ts\nc.text('Hello') \u002F\u002F text\u002Fplain\nc.json({ message: 'Hello' }) \u002F\u002F application\u002Fjson\nc.html('\u003Ch1>Hello\u003C\u002Fh1>') \u002F\u002F text\u002Fhtml\nc.redirect('\u002Fnew-path') \u002F\u002F 302 redirect\nc.redirect('\u002Fnew-path', 301) \u002F\u002F 301 redirect\nc.body('raw body', 200, headers) \u002F\u002F raw response\nc.notFound() \u002F\u002F 404 response\n```\n\n### Headers & Status\n\n```ts\nc.status(201)\nc.header('X-Custom', 'value')\nc.header('Cache-Control', 'no-store')\n```\n\n### Variables (request-scoped data)\n\n```ts\n\u002F\u002F In middleware\nc.set('user', { id: 1, name: 'Alice' })\n\n\u002F\u002F In handler\nconst user = c.get('user')\n\u002F\u002F or\nconst user = c.var.user\n```\n\n### Environment (Cloudflare Workers)\n\n```ts\nconst value = await c.env.KV.get('key')\nconst db = c.env.DATABASE\nc.executionCtx.waitUntil(promise)\n```\n\n### Renderer\n\n```ts\napp.use(async (c, next) => {\n  c.setRenderer((content) =>\n    c.html(\n      \u003Chtml>\u003Cbody>{content}\u003C\u002Fbody>\u003C\u002Fhtml>\n    )\n  )\n  await next()\n})\n\napp.get('\u002F', (c) => c.render(\u003Ch1>Hello\u003C\u002Fh1>))\n```\n\n---\n\n## HonoRequest (c.req)\n\n```ts\nc.req.param('id') \u002F\u002F path parameter\nc.req.param() \u002F\u002F all path params as object\nc.req.query('page') \u002F\u002F query string parameter\nc.req.query() \u002F\u002F all query params as object\nc.req.queries('tags') \u002F\u002F multiple values: ?tags=A&tags=B → ['A', 'B']\nc.req.header('Authorization') \u002F\u002F request header\nc.req.header() \u002F\u002F all headers (keys are lowercase)\n\n\u002F\u002F Body parsing\nawait c.req.json() \u002F\u002F parse JSON body\nawait c.req.text() \u002F\u002F parse text body\nawait c.req.formData() \u002F\u002F parse as FormData\nawait c.req.parseBody() \u002F\u002F parse multipart\u002Fform-data or urlencoded\nawait c.req.arrayBuffer() \u002F\u002F parse as ArrayBuffer\nawait c.req.blob() \u002F\u002F parse as Blob\n\n\u002F\u002F Validated data (used with validator middleware)\nc.req.valid('json')\nc.req.valid('query')\nc.req.valid('form')\nc.req.valid('param')\n\n\u002F\u002F Properties\nc.req.url \u002F\u002F full URL string\nc.req.path \u002F\u002F pathname\nc.req.method \u002F\u002F HTTP method\nc.req.raw \u002F\u002F underlying Request object\n```\n\n---\n\n## Middleware\n\n### Using Built-in Middleware\n\n```ts\nimport { cors } from 'hono\u002Fcors'\nimport { logger } from 'hono\u002Flogger'\nimport { basicAuth } from 'hono\u002Fbasic-auth'\nimport { prettyJSON } from 'hono\u002Fpretty-json'\nimport { secureHeaders } from 'hono\u002Fsecure-headers'\nimport { etag } from 'hono\u002Fetag'\nimport { compress } from 'hono\u002Fcompress'\nimport { poweredBy } from 'hono\u002Fpowered-by'\nimport { timing } from 'hono\u002Ftiming'\nimport { cache } from 'hono\u002Fcache'\nimport { bearerAuth } from 'hono\u002Fbearer-auth'\nimport { jwt } from 'hono\u002Fjwt'\nimport { csrf } from 'hono\u002Fcsrf'\nimport { ipRestriction } from 'hono\u002Fip-restriction'\nimport { bodyLimit } from 'hono\u002Fbody-limit'\nimport { requestId } from 'hono\u002Frequest-id'\nimport { methodOverride } from 'hono\u002Fmethod-override'\nimport { trailingSlash, trimTrailingSlash } from 'hono\u002Ftrailing-slash'\n\n\u002F\u002F Registration\napp.use(logger()) \u002F\u002F all routes\napp.use('\u002Fapi\u002F*', cors()) \u002F\u002F specific path\napp.post('\u002Fapi\u002F*', basicAuth({ username: 'admin', password: 'secret' }))\n```\n\n### Custom Middleware\n\n```ts\n\u002F\u002F Inline\napp.use(async (c, next) => {\n  const start = Date.now()\n  await next()\n  const elapsed = Date.now() - start\n  c.res.headers.set('X-Response-Time', `${elapsed}ms`)\n})\n\n\u002F\u002F Reusable with createMiddleware\nimport { createMiddleware } from 'hono\u002Ffactory'\n\nconst auth = createMiddleware(async (c, next) => {\n  const token = c.req.header('Authorization')\n  if (!token) return c.json({ error: 'Unauthorized' }, 401)\n  await next()\n})\n\napp.use('\u002Fapi\u002F*', auth)\n```\n\n### Middleware Execution Order\n\nMiddleware executes in registration order. `await next()` calls the next middleware\u002Fhandler, and code after `next()` runs on the way back:\n\n```\nRequest → mw1 before → mw2 before → handler → mw2 after → mw1 after → Response\n```\n\n```ts\napp.use(async (c, next) => {\n  \u002F\u002F before handler\n  await next()\n  \u002F\u002F after handler\n})\n```\n\n---\n\n## Validation\n\nValidation targets: `json`, `form`, `query`, `header`, `param`, `cookie`.\n\n### Zod Validator\n\n```ts\nimport { zValidator } from '@hono\u002Fzod-validator'\nimport { z } from 'zod'\n\nconst schema = z.object({\n  title: z.string().min(1),\n  body: z.string()\n})\n\napp.post('\u002Fposts', zValidator('json', schema), (c) => {\n  const data = c.req.valid('json') \u002F\u002F fully typed\n  return c.json(data, 201)\n})\n```\n\n### Valibot \u002F Standard Schema Validator\n\n```ts\nimport { sValidator } from '@hono\u002Fstandard-validator'\nimport * as v from 'valibot'\n\nconst schema = v.object({ name: v.string(), age: v.number() })\n\napp.post('\u002Fusers', sValidator('json', schema), (c) => {\n  const data = c.req.valid('json')\n  return c.json(data, 201)\n})\n```\n\n---\n\n## JSX\n\n### Setup\n\nIn `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"hono\u002Fjsx\"\n  }\n}\n```\n\nOr use pragma: `\u002F** @jsxImportSource hono\u002Fjsx *\u002F`\n\n**Important:** Files using JSX must have a `.tsx` extension. Rename `.ts` to `.tsx` or the compiler will fail.\n\n### Components\n\n```tsx\nimport type { PropsWithChildren } from 'hono\u002Fjsx'\n\nconst Layout = (props: PropsWithChildren) => (\n  \u003Chtml>\n    \u003Chead>\n      \u003Ctitle>My App\u003C\u002Ftitle>\n    \u003C\u002Fhead>\n    \u003Cbody>{props.children}\u003C\u002Fbody>\n  \u003C\u002Fhtml>\n)\n\nconst UserCard = ({ name }: { name: string }) => (\n  \u003Cdiv class=\"card\">\n    \u003Ch2>{name}\u003C\u002Fh2>\n  \u003C\u002Fdiv>\n)\n\napp.get('\u002F', (c) => {\n  return c.html(\n    \u003CLayout>\n      \u003CUserCard name=\"Alice\" \u002F>\n    \u003C\u002FLayout>\n  )\n})\n```\n\n### jsxRenderer Middleware\n\nUse `jsxRenderer` middleware for layouts. See `npx hono docs \u002Fdocs\u002Fmiddleware\u002Fbuiltin\u002Fjsx-renderer` for details.\n\n### Async Components\n\n```tsx\nconst UserList = async () => {\n  const users = await fetchUsers()\n  return (\n    \u003Cul>\n      {users.map((u) => (\n        \u003Cli>{u.name}\u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  )\n}\n```\n\n### Fragments\n\n```tsx\nconst Items = () => (\n  \u003C>\n    \u003Cli>Item 1\u003C\u002Fli>\n    \u003Cli>Item 2\u003C\u002Fli>\n  \u003C\u002F>\n)\n```\n\n---\n\n## Streaming\n\n```ts\nimport { stream, streamText, streamSSE } from 'hono\u002Fstreaming'\n\n\u002F\u002F Basic stream\napp.get('\u002Fstream', (c) => {\n  return stream(c, async (stream) => {\n    stream.onAbort(() => console.log('Aborted'))\n    await stream.write(new Uint8Array([0x48, 0x65]))\n    await stream.pipe(readableStream)\n  })\n})\n\n\u002F\u002F Text stream\napp.get('\u002Fstream-text', (c) => {\n  return streamText(c, async (stream) => {\n    await stream.writeln('Hello')\n    await stream.sleep(1000)\n    await stream.write('World')\n  })\n})\n\n\u002F\u002F Server-Sent Events\napp.get('\u002Fsse', (c) => {\n  return streamSSE(c, async (stream) => {\n    let id = 0\n    while (true) {\n      await stream.writeSSE({\n        data: JSON.stringify({ time: new Date().toISOString() }),\n        event: 'time-update',\n        id: String(id++)\n      })\n      await stream.sleep(1000)\n    }\n  })\n})\n```\n\n---\n\n## Testing with app.request()\n\nTest endpoints without starting an HTTP server:\n\n```ts\n\u002F\u002F GET\nconst res = await app.request('\u002Fposts')\nexpect(res.status).toBe(200)\nexpect(await res.json()).toEqual({ posts: [] })\n\n\u002F\u002F POST with JSON\nconst res = await app.request('\u002Fposts', {\n  method: 'POST',\n  body: JSON.stringify({ title: 'Hello' }),\n  headers: { 'Content-Type': 'application\u002Fjson' }\n})\n\n\u002F\u002F POST with FormData\nconst formData = new FormData()\nformData.append('name', 'Alice')\nconst res = await app.request('\u002Fusers', { method: 'POST', body: formData })\n\n\u002F\u002F With mock env (Cloudflare Workers bindings)\nconst res = await app.request('\u002Fapi\u002Fdata', {}, { KV: mockKV, DATABASE: mockDB })\n\n\u002F\u002F Using Request object\nconst req = new Request('http:\u002F\u002Flocalhost\u002Fapi', { method: 'DELETE' })\nconst res = await app.request(req)\n```\n\n---\n\n## Hono Client (RPC)\n\nType-safe API client using shared types between server and client.\n\n**IMPORTANT: Routes MUST be chained for type inference to work. Without chaining, the client cannot infer route types.**\n\n```ts\n\u002F\u002F Server: routes MUST be chained to preserve types\nconst route = app\n  .post('\u002Fposts', zValidator('json', schema), (c) => {\n    return c.json({ ok: true }, 201)\n  })\n  .get('\u002Fposts', (c) => {\n    return c.json({ posts: [] })\n  })\nexport type AppType = typeof route\n\n\u002F\u002F Client: use hc() with the exported type\nimport { hc } from 'hono\u002Fclient'\nimport type { AppType } from '.\u002Fserver'\n\nconst client = hc\u003CAppType>('http:\u002F\u002Flocalhost:8787\u002F')\nconst res = await client.posts.$post({ json: { title: 'Hello' } })\nconst data = await res.json() \u002F\u002F fully typed\n```\n\nType utilities:\n\n```ts\nimport type { InferRequestType, InferResponseType } from 'hono\u002Fclient'\n\ntype ReqType = InferRequestType\u003Ctypeof client.posts.$post>\ntype ResType = InferResponseType\u003Ctypeof client.posts.$post, 200>\n```\n\n---\n\n## Helpers\n\nHelpers are utility functions imported from `hono\u002F\u003Chelper-name>`:\n\n```ts\nimport { getConnInfo } from 'hono\u002Fconninfo'\nimport { getCookie, setCookie, deleteCookie } from 'hono\u002Fcookie'\nimport { css, Style } from 'hono\u002Fcss'\nimport { createFactory } from 'hono\u002Ffactory'\nimport { html, raw } from 'hono\u002Fhtml'\nimport { stream, streamText, streamSSE } from 'hono\u002Fstreaming'\nimport { testClient } from 'hono\u002Ftesting'\nimport { upgradeWebSocket } from 'hono\u002Fcloudflare-workers' \u002F\u002F or other adapter\n```\n\nAvailable helpers: Accepts, Adapter, ConnInfo, Cookie, css, Dev, Factory, html, JWT, Proxy, Route, SSG, Streaming, Testing, WebSocket.\n\nFor details, use `npx hono docs \u002Fdocs\u002Fhelpers\u002F\u003Chelper-name>`.\n\n### Factory\n\nUse `createFactory` to define `Env` once and share it across app, middleware, and handlers:\n\n```ts\nimport { createFactory } from 'hono\u002Ffactory'\n\nconst factory = createFactory\u003CEnv>()\n\n\u002F\u002F Create app (Env type is inherited)\nconst app = factory.createApp()\n\n\u002F\u002F Create middleware (Env type is inherited, no need to pass generics)\nconst mw = factory.createMiddleware(async (c, next) => {\n  await next()\n})\n\n\u002F\u002F Create handlers separately (preserves type inference)\nconst handlers = factory.createHandlers(logger(), (c) => c.json({ message: 'Hello' }))\napp.get('\u002Fapi', ...handlers)\n```\n\n---\n\n## Best Practices\n\n- Write handlers inline in route definitions for proper type inference of path params.\n- Use `app.route()` to organize large apps by feature, not Rails-style controllers.\n- Use `createFactory()` to share Env type across app, middleware, and handlers.\n- Use `c.set()`\u002F`c.get()` to pass data between middleware and handlers.\n- Chain validators for multiple request parts (param + query + json).\n- Export app type for RPC: `export type AppType = typeof routes`\n- Use `app.request()` for testing — no server startup needed.\n\n## Adapters\n\nHono runs on multiple runtimes. The default export works for Cloudflare Workers, Deno, and Bun. For Node.js, use the Node adapter:\n\n```ts\n\u002F\u002F Cloudflare Workers \u002F Deno \u002F Bun\nexport default app\n\n\u002F\u002F Node.js\nimport { serve } from '@hono\u002Fnode-server'\nserve(app)\n```\n",{"name":5,"description":7},"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fhono",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill hono",{"tool":38,"command":39},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill hono",{"tool":41,"command":42},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill hono","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fhono\u002FSKILL.md",true,[],[47,54,59,66,73,80],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":55,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]