stacks-routes

Define and register route files with URL prefixes and middleware in Stacks applications.

2|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/bughq/bughq --skill stacks-routes-bughq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-routes
Source: https://github.com/bughq/bughq/tree/main/.claude/skills/stacks-routes
Command: npx skills add https://github.com/bughq/bughq --skill stacks-routes-bughq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexity of managing route definitions, URL prefixes, and middleware groups in a Stacks application, ensuring consistent and organized API structures.

Core Features & Use Cases

  • Route Registry Management: Centralizes the mapping of route files to URL prefixes within app/Routes.ts.
  • Flexible Handler Support: Supports Action strings, controller methods, and inline functions for route handling.
  • Use Case: When building a new feature module, use this Skill to define a new route file in the routes/ directory and register it in the application registry with appropriate middleware and prefixes.

Quick Start

Use the stacks-routes skill to register a new route file named users.ts with an admin prefix and auth middleware.

Frequently Asked Questions about stacks-routes

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

FAQPage Schema
How do I organize route files and URL prefixes in a Stacks application?

To organize route files in a Stacks application, centralize the mapping of route files to URL prefixes within the app/Routes.ts registry, ensuring consistent API architecture and clean route management.

Can I use controller methods and inline functions as route handlers in Stacks?

Yes, Stacks routing supports flexible handler implementations, allowing you to define route handlers using Action strings, controller methods, or inline functions while maintaining standard project structure.

How do I register a new route file with middleware and prefixes in Stacks?

To register a new route file in Stacks, define the file in the routes/ directory and map it in the application registry with appropriate middleware groups and URL prefixes to ensure proper API structure.

What is the best way to manage middleware groups for API routes in a Stacks framework?

The best way to manage middleware groups in the Stacks framework is to centralize their registration alongside route files and URL prefixes in the route registry, ensuring consistent application architecture.

Does the Stacks framework support inline functions for API route handling?

Yes, the Stacks framework supports inline functions for API route handling, alongside Action strings and controller methods, providing flexible options for implementing route logic within your project.