add-route-constraint
CommunitySecurely validate route parameters.
AuthorEmmanuelkwaa
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill enhances API security and robustness by validating string path parameters directly at the routing layer, preventing invalid inputs from reaching controller logic.
Core Features & Use Cases
- Input Validation: Ensures path parameters conform to a specified pattern and length.
- Reduced Boilerplate: Eliminates the need for manual validation within controller actions.
- Automatic 404 Responses: Non-matching routes are automatically rejected with a 404 status code.
- Use Case: Protect your API endpoints by ensuring that an
idparameter in a route like/items/{id:myConstraint}only accepts alphanumeric characters, periods, underscores, and hyphens, up to 100 characters.
Quick Start
Add a route constraint named 'myConstraint' that validates string path parameters against a pattern of alphanumeric characters, periods, underscores, and hyphens, with a maximum length of 100 characters.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: add-route-constraint Download link: https://github.com/Emmanuelkwaa/NetRockTemplate/archive/main.zip#add-route-constraint Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.