deno-hono

Build and maintain web applications with Deno and Hono framework. Use when working with: (1) Creating new Deno/Hono projects or adding routes/components, (2) Debugging Hono apps (routing, middleware, context issues), (3) Explaining Hono concepts (JSX, middleware, routing patterns), (4) Working with TypeScript in Deno environment.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "deno-hono" with this command: npx skills add intellicode/skills/intellicode-skills-deno-hono

Deno Hono

Quick Start

deno task dev    # Start dev server with file watching
deno fmt        # Format code
deno lint        # Check for issues

Project Structure

src/
├── index.tsx        # Main entry - all routes defined here
├── components/     # Reusable UI components (LayoutV2, Markdown, etc.)
├── app/            # Page components and content
│   ├── tools/      # Tool implementations (improve-text, is-site-down, etc.)
│   ├── wiki/      # Wiki-style content
│   └── [topics]/  # Content areas (web, react, python, etc.)
└── tools/          # Tool utilities

Routing Pattern

Routes live in src/index.tsx:

import { Hono } from "hono";
import { YourComponent } from "./app/your-component.tsx";

const app = new Hono();

app.get("/path", (c) => c.html(<YourComponent />));

Route with Title

const servePage = (component: Child, title?: string) => (c: Context) =>
  c.html(<LayoutV2 title={title}>{component}</LayoutV2>);

app.get("/about", servePage(<About />, "About"));

GET/POST Pattern for Forms

app.get("/tool", (c) => c.html(<ToolForm />));
app.post("/tool", async (c) => {
  const formData = await c.req.parseBody();
  // process data
  return c.html(<ToolResult data={result} />);
});

Component Structure

Use interface Props for component props:

import { PropsWithChildren } from "hono/jsx";

interface YourComponentProps {
  title?: string;
  items: string[];
}

export function YourComponent(
  { title, items }: YourComponentProps,
) {
  return (
    <div>
      {title && <h1>{title}</h1>}
      <ul>
        {items.map((item) => <li>{item}</li>)}
      </ul>
    </div>
  );
}

Layout Component Pattern

interface LayoutProps extends PropsWithChildren {
  title?: string;
  description?: string;
}

export function Layout({ children, title, description }: LayoutProps) {
  const pageTitle = title ? `${title} // SITE NAME` : "SITE NAME";

  return (
    <html lang="en">
      <head>
        <title>{pageTitle}</title>
        {description && <meta name="description" content={description} />}
        {/* other meta tags */}
      </head>
      <body>{children}</body>
    </html>
  );
}

Middleware

Logger Middleware

app.use("*", async (c, next) => {
  const start = Date.now();
  await next();
  const end = Date.now();
  console.log(`${c.req.method} ${c.req.url} - ${c.res.status} ${end - start}ms`);
});

Error Handling

app.onError((err, c) => {
  console.error(`Error: ${err.message}`);
  return c.html(<ErrorPage message={err.message} />);
});

404 Handler

app.notFound((c) => {
  c.status(404);
  return c.html(<NotFoundPage />);
});

Key Conventions

  • No client-side React - All rendering is server-side
  • CSS - Define outside components using Hono's css helper or Tailwind
  • TypeScript - Use interface for props, not inline types
  • Function declarations - Prefer function over const for components
  • Dependencies - Prefer built-in Deno/web APIs; add deps only for code > 20 lines

Common Issues

  • Route not matching: Check route order - more specific routes must come first
  • Context errors: Ensure c is passed correctly in middleware chain
  • JSX not rendering: Verify hono/jsx is imported and .tsx extension used

References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

Repository SourceNeeds Review
162.6K94.2Kanthropics
Coding

remotion-best-practices

Use this skills whenever you are dealing with Remotion code to obtain the domain-specific knowledge.

Repository SourceNeeds Review
149.3K2.1Kremotion-dev
Coding

azure-ai

Service Use When MCP Tools CLI

Repository SourceNeeds Review
137.2K155microsoft
Coding

azure-deploy

AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE

Repository SourceNeeds Review
136.8K155microsoft