routing-http-api

Trace and map HTTP routes and request handlers in the Madoc TypeScript service.

57|15|Updated Nov 28, 2018
One-click install
npx skills add https://github.com/digirati-co-uk/madoc-platform --skill routing-http-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: routing-http-api
Source: https://github.com/digirati-co-uk/madoc-platform/tree/main/.agents/skills/routing-http-api
Command: npx skills add https://github.com/digirati-co-uk/madoc-platform --skill routing-http-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers quickly locate, trace, and safely modify HTTP routes and request handlers in the Madoc TypeScript service so endpoints can be added or refactored without breaking middleware or permission checks.

Core Features & Use Cases

  • Route mapping and discovery: Identify route entry points, domain groupings, and how route trees are composed.
  • Handler tracing and refactoring: Follow exported handlers through modules to update logic and preserve registration patterns.
  • Middleware and permissions validation: Verify and apply route-level middleware and permission guards consistently.
  • Use Case: When adding an admin API endpoint, use this Skill to find the admin domain route, trace the handler implementation, and ensure the correct auth middleware is applied before exposing the route.

Quick Start

Map the route for the endpoint you are changing by opening services/madoc-ts/src/routes/root.ts, identify the domain folder and exported handler, and follow it through its module to update registration and middleware safely.

Frequently Asked Questions about routing-http-api

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

FAQPage Schema
How do I trace HTTP request handlers in a TypeScript API service?

To trace HTTP request handlers in a TypeScript API service, map the route entry points by opening the root route file, identifying domain groupings, and following exported handlers through their modules to understand route composition and logic.

How do I add a new API endpoint without breaking middleware ordering?

To add an API endpoint without breaking middleware ordering, locate the domain route folder, trace the existing handler registration patterns, and apply the correct route-level middleware and permission guards before exposing the new route.

What is the best way to map route groupings in a TypeScript HTTP service?

Mapping route groupings in a TypeScript HTTP service involves starting at the root route file, identifying domain folders, and following the route tree composition to understand how domain endpoints are structured and registered.

How do I verify permission guards when refactoring HTTP routes?

Verify permission guards when refactoring HTTP routes by tracing the exported handlers through their modules and checking the middleware ordering to ensure route-level authentication and authorization checks remain consistently applied.

Can I refactor request handlers in the Madoc TypeScript service safely?

Yes, you can refactor request handlers in the Madoc TypeScript service by tracing exported handlers through their modules, updating the logic while preserving existing registration patterns and validating route-level middleware.

Why does my API route return a permission error after updating the handler?

An API route returns a permission error after updating the handler if route-level middleware and permission guards are not applied correctly, requiring you to validate middleware ordering and ensure auth checks precede the route.