cloudwerk-routing
SKILL.md
Cloudwerk Routing
File-based routing conventions for Cloudwerk. The app/ directory structure maps directly to URL patterns, with special filenames determining behavior.
When to Apply
Reference these guidelines when:
- Creating new pages or API routes in a Cloudwerk app
- Adding layouts that wrap multiple pages
- Implementing middleware for auth, rate limiting, or request processing
- Using dynamic route segments (
[id],[...slug]) - Loading data with
loader()or handling mutations withaction() - Adding error or not-found boundaries
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Route Files | CRITICAL | files- |
| 2 | Dynamic Parameters | HIGH | params- |
| 3 | Data Loading | HIGH | data- |
Quick Reference
1. Route Files (CRITICAL)
files-page-component- page.tsx conventions for rendering UIfiles-api-route- route.ts conventions for API endpointsfiles-layout- layout.tsx conventions for shared UI wrappersfiles-middleware- middleware.ts conventions for request processingfiles-error-boundary- error.tsx conventions for error handlingfiles-not-found-boundary- not-found.tsx conventions for 404 pages
2. Dynamic Parameters (HIGH)
params-dynamic-segments- [id] syntax for single dynamic segmentsparams-catch-all- [...slug] syntax for catch-all routesparams-route-groups- (group) syntax for layout grouping without URL impact
3. Data Loading (HIGH)
data-loader- loader() function for server-side data fetchingdata-action- action() function for form submissions and mutationsdata-error-control-flow- NotFoundError/RedirectError for flow controldata-context-api- getContext(), get(), set() for request-scoped data
How to Use
Read individual rule files for detailed explanations and code examples:
rules/files-page-component.md
rules/data-loader.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
claude-code6
github-copilot6
codex6
kimi-cli6
gemini-cli6