extract-command-router
CommunitySimplify CLI command routing and enhance modularity with a dedicated router module.
Authorruskibeats
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the complexity and lack of modularity in CLI tools with a single file handling registration, routing, and multiple handlers. It helps in isolating the routing logic for better unit testing and maintainability.
Core Features & Use Cases
- Command Routing Refactoring: Extracts routing logic from a CLI handler file to a dedicated router module, improving code readability and maintainability.
- Handler Isolation: Separates handler implementations, making it easier to unit-test individual handlers.
- Contextual Handling: Provides a unified context type for handlers, with options for natural-language intercept fallback.
- Use Case: Ideal for CLI tools or Pi extensions where a single file mixes command registration, routing logic, and handlers, leading to a monolithic and hard-to-maintain codebase.
Quick Start
Use the extract-command-router skill to refactor the command routing in your CLI tool by moving it into a new 'router.ts' file.
Dependency Matrix
Required Modules
None requiredComponents
scripts
💻 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: extract-command-router Download link: https://github.com/ruskibeats/t1d/archive/main.zip#extract-command-router 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 620,000+ vetted skills library on demand.