new-route

Declare a new portal route with DTOs and OpenAPI bindings.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/weiloon1234/Forge-Starter --skill new-route-weiloon1234
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-route
Source: https://github.com/weiloon1234/Forge-Starter/tree/main/.claude/skills/new-route
Command: npx skills add https://github.com/weiloon1234/Forge-Starter --skill new-route-weiloon1234

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines the process of adding an individual backend REST route OR a frontend SPA route that isn't covered by a broader feature skill. It covers choosing portal + scope + method + auth, writing the handler, declaring request/response DTOs, registering in the portal's mod.rs, and — if applicable — adding the matching frontend SPA route entry + menu item. Do NOT use for: full admin CRUD list/create/edit/delete flow (→ admin-datatable ships all five routes inline); a whole admin page backed by a single show endpoint (→ admin-page covers this end-to-end); sidebar badges with their own REST+WS path (→ admin-badge); auth login/refresh/logout (→ new-portal scaffolds these); datatable generic query/download endpoints (those are registered globally; you don't add per-datatable); WebSocket channels (→ CLAUDE.md "WebSocket" section).

Core Features & Use Cases

  • Single-route scaffolding for backend and/or frontend routes
  • Handles selecting portal, scope, method, auth, DTOs, registration
  • Optional frontend SPA route and menu integration
  • Suitable for endpoints like health checks, webhooks, bulk actions, or small per-resource routes

Quick Start

Start by identifying the exact route to add, then implement the backend handler, DTOs, and OpenAPI bindings, and finally register the route and optional frontend page if needed.

Frequently Asked Questions about new-route

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new backend REST route with DTOs and OpenAPI bindings in Rust?

Adding a backend REST route involves creating request and response DTOs, writing the handler, and registering it in src/portals/<portal>/mod.rs. The skill scaffolds these components with OpenAPI bindings for Rust.

When should I create a single SPA route instead of using a full admin page skill?

Use a single SPA route for endpoints needing a dedicated handler outside broader flows, like health checks, webhooks, or bulk actions. Full admin page skills handle complete CRUD list, create, edit, and delete operations instead.

What's the best way to register a frontend SPA route and menu entry with permissions?

Registering a frontend SPA route requires adding the matching route entry and menu item with appropriate permissions alongside the backend handler. This integrates the frontend path with portal scopes and auth methods.

Does this route scaffolding tool handle WebSocket channels or auth login endpoints?

This route scaffolding tool does not handle WebSocket channels or auth login endpoints. Auth login, refresh, and logout routes are scaffolded by new-portal, while WebSocket channels require separate implementation.

Can I use this to add per-datatable query endpoints for generic downloads?

You cannot use this to add per-datatable query endpoints for generic downloads because those are registered globally. This skill is reserved for individual backend or frontend routes requiring dedicated handlers and DTOs.