Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

deno-frontend

verified

Use when building web UIs with Fresh 2.x framework, using Preact components, or adding Tailwind CSS styling in Deno. Covers Fresh handlers, routes, createDefine, PageProps, context patterns, islands, and TypeScript types. Essential for Fresh 2.x vs 1.x differences.

View on GitHub

Marketplace

denoland-skills

denoland/skills

Plugin

deno-skills

Repository
Verified Org

denoland/skills
13stars

skills/deno-frontend/SKILL.md

Last Verified

February 5, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/denoland/skills/blob/main/skills/deno-frontend/SKILL.md -a claude-code --skill deno-frontend

Installation paths:

Claude
.claude/skills/deno-frontend/
Powered by add-skill CLI

Instructions

# Deno Frontend Development

## Overview

This skill covers frontend development in Deno using Fresh 2.x (Deno's web framework), Preact (a lightweight React alternative), and Tailwind CSS. Fresh uses "island architecture" where pages render on the server and only interactive parts ship JavaScript to the browser.

## When to Use This Skill

- Creating a new Fresh web application
- Building interactive UI components (islands)
- Adding server-rendered pages and routes
- Integrating Tailwind CSS for styling
- Choosing between islands (client-side) vs components (server-only)
- Working with Preact hooks and signals

Apply these practices when building web applications in Deno.

## CRITICAL: Fresh 2.x vs 1.x

**Always use Fresh 2.x patterns.** Fresh 1.x is deprecated. Key differences:

| Fresh 1.x (Deprecated) | Fresh 2.x (Current) |
|------------------------|---------------------|
| `$fresh/server.ts` imports | `import { App } from "fresh"` |
| `fresh.gen.ts` manifest file | No manifest file needed |
| `dev.ts` entry point | `vite.config.ts` for dev |
| `fresh.config.ts` | Config via `new App()` |
| `handler(req, ctx)` two params | `handler(ctx)` single param |
| Separate `_404.tsx`/`_500.tsx` | Unified `_error.tsx` |

**NEVER use these outdated imports:**
```typescript
// ❌ WRONG - Fresh 1.x patterns
import { Handlers, PageProps } from "$fresh/server.ts";
import { Head } from "$fresh/runtime.ts";
import manifest from "./fresh.gen.ts";

// ❌ WRONG - Alpha versions (outdated)
import { App } from "jsr:@fresh/core@2.0.0-alpha.1";

// ✅ CORRECT - Fresh 2.x stable
import { App, staticFiles } from "fresh";
import { define } from "./utils/state.ts"; // Project-local define helpers
```

## Fresh Framework

Reference: https://fresh.deno.dev/docs

Fresh is Deno's web framework. It uses **island architecture** - pages are rendered on the server, and only interactive parts ("islands") get JavaScript on the client.

### Creating a Fresh Project

```bash
deno run -Ar jsr:@fresh/init
c

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
17537 chars