cloudwerk-handlers
SKILL.md
Cloudwerk Handlers
Handler, middleware, and component patterns for Cloudwerk applications. Covers the signature conventions for route handlers, middleware, and page/layout components, plus how to use Cloudflare bindings and response helpers.
When to Apply
Reference these guidelines when:
- Writing API route handlers (GET, POST, PUT, DELETE)
- Creating middleware for authentication, rate limiting, or logging
- Building page or layout components with data loading
- Accessing Cloudflare bindings (D1, KV, R2)
- Using response helpers like
json(),redirect() - Creating client-side interactive components with
'use client'
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Handler Patterns | CRITICAL | handler- |
| 2 | Middleware Patterns | HIGH | middleware- |
| 3 | Component Patterns | HIGH | component- |
Quick Reference
1. Handler Patterns (CRITICAL)
handler-signature- CloudwerkHandler function pattern and paramshandler-response-helpers- json(), redirect(), notFoundResponse() helpershandler-bindings- getBinding(), DB, KV, R2 access patterns
2. Middleware Patterns (HIGH)
middleware-signature- (request, next) => Response patternmiddleware-data-sharing- set()/get() via context for passing datamiddleware-vs-hono- Differences from Hono middleware
3. Component Patterns (HIGH)
component-page-props- PageProps interface and loader datacomponent-layout-props- LayoutProps interface with childrencomponent-client-directive- 'use client' for interactive componentscomponent-hono-vs-react- class vs className and renderer differences
How to Use
Read individual rule files for detailed explanations and code examples:
rules/handler-signature.md
rules/middleware-signature.md
Each rule file contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references
Weekly Installs
6
Repository
squirrelsoft-de…loudwerkFirst Seen
Feb 22, 2026
Security Audits
Installed on
opencode6
gemini-cli6
claude-code6
github-copilot6
codex6
kimi-cli6