coldbox-routing-development

Configure ColdBox Router.cfc routes with constraints and named routes.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill coldbox-routing-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coldbox-routing-development
Source: https://github.com/ColdBox/skills/tree/main/coldbox/routing-development
Command: npx skills add https://github.com/ColdBox/skills --skill coldbox-routing-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill simplifies URL-to-handler mapping in ColdBox applications, reducing routing errors, duplicated boilerplate, and mismatched route/link definitions by providing clear patterns for resources, groups, constraints, and named routes.

Core Features & Use Cases

  • RESTful resource generation: Use resources() to generate standard CRUD routes for common models.
  • Route groups & API versioning: Group routes with shared prefixes, namespaces, and middleware to organize web and API endpoints.
  • Constraints & HTTP verb enforcement: Apply regex constraints for numeric IDs, UUIDs, and slugs and restrict routes to specific HTTP methods.
  • Named routes & link building: Define named routes to reliably generate URLs in handlers and templates.
  • Use Case: Mount a module-based API with versioned groups and resources to separate web and API routing while enforcing parameter constraints.

Quick Start

Open your config/Router.cfc, enable full rewrites, add a named route and a resources("users") call to generate standard CRUD routes.

Frequently Asked Questions about coldbox-routing-development

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

FAQPage Schema
How do I configure RESTful resource routes in a ColdBox application?

To configure RESTful resource routes in a ColdBox application, call resources("modelName") in your config/Router.cfc file. This function automatically generates standard CRUD routes that map HTTP verbs directly to corresponding handler actions.

What is the best way to group API routes with shared prefixes and middleware in ColdBox?

The best way to group API routes with shared prefixes and middleware in ColdBox is using route groups. Route groups allow you to organize web and API endpoints by applying shared namespaces, URL prefixes, and middleware to nested route definitions.

How do I enforce numeric or UUID constraints on ColdBox route parameters?

You enforce numeric or UUID constraints on ColdBox route parameters by applying regex pattern constraints within your Router.cfc. This restricts matching routes to specific formats like numeric IDs, UUIDs, or slugs, ensuring invalid URL structures are rejected.

Can I generate reliable URLs in ColdBox templates using named routes?

Yes, you can generate reliable URLs in ColdBox templates using named routes. By defining named routes in Router.cfc, you can use buildLink-compatible references to generate URLs across handlers and templates without hardcoding paths.

How do I restrict ColdBox routes to specific HTTP methods?

You restrict ColdBox routes to specific HTTP methods by enforcing HTTP verbs during route definition in Router.cfc. This ensures routes only respond to designated methods like GET, POST, PUT, or DELETE, returning errors for unsupported verbs.

Does ColdBox routing support mounting module-based APIs with versioned groups?

Yes, ColdBox routing supports mounting module-based APIs with versioned groups. You can organize web and API routing separately by combining module routing with versioned route groups, shared prefixes, and resource definitions.