hono-helper
БесплатноБез исполняемых скриптовНе проверенHono web framework for edge-first, lightweight APIs - routing, middleware, validation, and multi-runtime support When user works with Hono, builds APIs…
от shepherdjerred★ 85 звёзд на GitHubОб этом скилле
Hono Helper Agent
What's New in Hono (2024-2025)
- Multi-runtime: Runs on Bun, Node.js, Deno, Cloudflare Workers, AWS Lambda, Vercel
- RPC mode: End-to-end type safety with
hcclient - Zod OpenAPI: Generate OpenAPI specs from Zod schemas
- Streaming: First-class streaming response support
- JSX middleware: Server-side JSX rendering
- Performance: One of the fastest web frameworks (Bun benchmark leader)
Installation
# For Bun
bun add hono
# For Node.js
npm install hono @hono/node-server
# For Cloudflare Workers
npm install hono
Basic Application
Bun Setup
import { Hono } from "hono";
const app = new Hono();
app.get("/", (c) => c.text("Hello Hono!"));
export default app;
Bun automatically serves the default export on port 3000.
Node.js Setup
import { Hono } from "hono";
import { serve } from "@hono/node-server";
const app = new Hono();
app.get("/", (c) => c.text("Hello Hono!"));
serve({ fetch: app.fetch, port: 3000 });
Routing
HTTP Methods
app.get("/users", (c) => c.json({ users: [] }));
app.post("/users", (c) => c.json({ created: true }));
app.put("/users/:id", (c) => c.json({ updated: true }));
app.patch("/users/:id", (c) => c.json({ patched: true }));
app.delete("/users/:id", (c) => c.json({ deleted: true }));
// All methods
app.all("/any", (c) => c.text("Any method"));
// Multiple methods
app.on(["GET", "POST"], "/multi", (c) => c.text("GET or POST"));
Path Parameters
// Single parameter
app.get("/users/:id", (c) => {
const id = c.req.param("id");
return c.json({ id });
});
// Multiple parameters
app.get("/posts/:postId/comments/:commentId", (c) => {
const { postId, commentId } = c.req.param();
return c.json({ postId, commentId });
});
// Optional parameter
app.get("/articles/:id?", (c) => {
const id = c.req.param("id") ?? "default";
return c.json({ id });
});
Wildcards and Regex
// Wildcard - matches any path segment
app.get("/files/*", (c) => {
const path = c.req.path;
return c.text(`File path: ${path}`);
});
// Regex constraint
app.get("/users/:id{[0-9]+}", (c) => {
const id = c.req.param("id"); // Guaranteed to be numeric
return c.json({ id: Number(id) });
});
Route Grouping
const api = new Hono();
api.get("/users", (c) => c.json({ users: [] }));
api.get("/posts", (c) => c.json({ posts: [] }));
const app = new Hono();
app.route("/api/v1", api);
// Routes: GET /api/v1/users, GET /api/v1/posts
Chained Routes
app
.get("/endpoint", (c) => c.text("GET"))
.post((c) => c.text("POST"))
.put((c) => c.text("PUT"));
Context API
The c (context) object provides request/response utilities:
Request Access
app.get("/info", (c) => {
// URL and path
const url = c.req.url;
const path = c.req.path;
const method = c.req.method;
// Query parameters
const page = c.req.query("page");
const allQueries = c.req.queries("tag"); // Array for repeated params
// Headers
const auth = c.req.header("Authorization");
const allHeaders = c.req.header(); // All headers
return c.json({ url, path, method, page, auth });
});
Body Parsing
app.post("/data", async (c) => {
// JSON body
const json = await c.req.json();
// Form data
const form = await c.req.parseBody();
// Raw text
const text = await c.req.text();
// Array buffer
const buffer = await c.req.arrayBuffer();
return c.json({ received: true });
});
Response Methods
// Text response
app.get("/text", (c) => c.text("Plain text"));
// JSON response
app.get("/json", (c) => c.json({ message: "Hello" }));
// HTML response
app.get("/html", (c) => c.html("<h1>Hello</h1>"));
// Custom status
app.get("/created", (c) => c.json({ id: 1 }, 201));
// Redirect
app.get("/old", (c) => c.redirect("/new"));
app.get("/permanent", (c) => c.redirect("/new", 301));
// Not found
app.get("/missing", (c) => c.notFound());
// Stream response
app.get("/stream", (c) => {
return c.streamText(async (stream) => {
await stream.write("Hello ");
await stream.write("World!");
});
});
Headers and Status
app.get("/custom", (c) => {
// Set response headers
c.header("X-Custom-Header", "value");
c.header("Cache-Control", "max-age=3600");
// Set status
c.status(201);
return c.json({ created: true });
});
// Response with headers inline
app.get("/inline", (c) => {
return c.json({ data: "value" }, 200, { "X-Custom": "header" });
});
Context Variables
// Set variables for downstream handlers
app.use(async (c, next) => {
c.set("userId", "user-123");
c.set("requestTime", Date.now());
await next();
});
app.get("/profile", (c) => {
const userId = c.get("userId");
const requestTime = c.get("requestTime");
return c.json({ userId, requestTime });
});
M
Установить hono-helper в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл hono-helper?
Hono web framework for edge-first, lightweight APIs - routing, middleware, validation, and multi-runtime support When user works with Hono, builds APIs, creates middleware, uses Zod validation with Hono, or mentions hono patterns
Как установить скилл hono-helper?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hono-helper запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic