
V3 Cli Modernization
Refactor a bloated agent CLI into modular commands with interactive prompts and deeper hooks lifecycle integration for claude-flow v3.
Overview
V3 CLI Modernization is an agent skill for the Build phase that modernizes claude-flow v3’s CLI with modular commands, interactive prompts, enhanced hooks, and workflow automation.
Install
npx skills add https://github.com/ruvnet/ruflo --skill v3-cli-modernizationWhat is this skill?
- Targets breaking monolithic CLI files (e.g. 108KB index.ts, 68KB enterprise.ts) into focused modules under 500 lines per
- Adds context-aware interactive prompts instead of basic command parsing only
- Deepens hooks integration across CLI lifecycle beyond pre/post execution
- Documents parallel Task workflow for analysis, decomposition, prompts, and hooks enhancement
- Aims at intelligent workflow automation to replace manual command chaining
- Current pain points cite index.ts at roughly 108KB and enterprise.ts at roughly 68KB monolithic modules
- Target architecture specifies under 500 lines per command module
Adoption & trust: 628 installs on skills.sh; 58.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent orchestration CLI has grown into huge single files with weak interactivity and hooks that only barely wrap commands.
Who is it for?
Indie maintainers of claude-flow v3 who need to split monolithic CLI TypeScript and deepen hooks without rewriting the whole product blind.
Skip if: Builders who only need generic SSH or deploy scripts, or teams that are not touching claude-flow’s CLI or hooks codebase.
When should I use this skill?
Modernizing claude-flow v3 CLI with interactive prompts, command decomposition, hooks enhancement, and workflow automation.
What do I get? / Deliverables
You get a modular v3 CLI design with sub-500-line command modules, smarter prompts, and lifecycle hooks wired for automated workflows instead of manual chaining.
- Modular CLI command structure with focused modules
- Interactive prompt flows and enhanced hooks integration plan or implementation
- Documented parallel Task breakdown for analysis and rollout
Recommended Skills
Journey fit
Canonical shelf is Build because the skill targets structuring and implementing the claude-flow v3 CLI and hooks—not production ops or marketing. Fits agent-tooling: command decomposition, Task-driven parallel implementation, and hooks tied to agent workflow execution.
How it compares
Use for structured claude-flow v3 CLI refactors—not as a substitute for general-purpose terminal or DevOps SSH skills.
Common Questions / FAQ
Who is v3 cli modernization for?
Solo and indie developers extending claude-flow v3 who own the CLI and hooks layer and want smaller modules plus better operator UX.
When should I use v3 cli modernization?
During Build agent-tooling when you are analyzing CLI architecture, decomposing commands, adding interactive prompts, or integrating hooks across the command lifecycle for v3.
Is v3 cli modernization safe to install?
Treat it as procedural guidance that may drive filesystem and shell changes in your repo; review the Security Audits panel on this Prism page and inspect Task/shell steps before running on production machines.
SKILL.md
READMESKILL.md - V3 Cli Modernization
# V3 CLI Modernization ## What This Skill Does Modernizes claude-flow v3 CLI with interactive prompts, intelligent command decomposition, enhanced hooks integration, performance optimization, and comprehensive workflow automation capabilities. ## Quick Start ```bash # Initialize CLI modernization analysis Task("CLI architecture", "Analyze current CLI structure and identify optimization opportunities", "cli-hooks-developer") # Modernization implementation (parallel) Task("Command decomposition", "Break down large CLI files into focused modules", "cli-hooks-developer") Task("Interactive prompts", "Implement intelligent interactive CLI experience", "cli-hooks-developer") Task("Hooks enhancement", "Deep integrate hooks with CLI lifecycle", "cli-hooks-developer") ``` ## CLI Architecture Modernization ### Current State Analysis ``` Current CLI Issues: ├── index.ts: 108KB monolithic file ├── enterprise.ts: 68KB feature module ├── Limited interactivity: Basic command parsing ├── Hooks integration: Basic pre$post execution └── No intelligent workflows: Manual command chaining Target Architecture: ├── Modular Commands: <500 lines per command ├── Interactive Prompts: Smart context-aware UX ├── Enhanced Hooks: Deep lifecycle integration ├── Workflow Automation: Intelligent command orchestration └── Performance: <200ms command response time ``` ### Modular Command Architecture ```typescript // src$cli$core$command-registry.ts interface CommandModule { name: string; description: string; category: CommandCategory; handler: CommandHandler; middleware: MiddlewareStack; permissions: Permission[]; examples: CommandExample[]; } export class ModularCommandRegistry { private commands = new Map<string, CommandModule>(); private categories = new Map<CommandCategory, CommandModule[]>(); private aliases = new Map<string, string>(); registerCommand(command: CommandModule): void { this.commands.set(command.name, command); // Register in category index if (!this.categories.has(command.category)) { this.categories.set(command.category, []); } this.categories.get(command.category)!.push(command); } async executeCommand(name: string, args: string[]): Promise<CommandResult> { const command = this.resolveCommand(name); if (!command) { throw new CommandNotFoundError(name, this.getSuggestions(name)); } // Execute middleware stack const context = await this.buildExecutionContext(command, args); const result = await command.middleware.execute(context); return result; } private resolveCommand(name: string): CommandModule | undefined { // Try exact match first if (this.commands.has(name)) { return this.commands.get(name); } // Try alias const aliasTarget = this.aliases.get(name); if (aliasTarget) { return this.commands.get(aliasTarget); } // Try fuzzy match return this.findFuzzyMatch(name); } } ``` ## Command Decomposition Strategy ### Swarm Commands Module ```typescript // src$cli$commands$swarm$swarm.command.ts @Command({ name: 'swarm', description: 'Swarm coordination and management', category: 'orchestration' }) export class SwarmCommand { constructor( private swarmCoordinator: UnifiedSwarmCoordinator, private promptService: InteractivePromptService ) {} @SubCommand('init') @Option('--topology', 'Swarm topology (mesh|hierarchical|adaptive)', 'hierarchical') @Option('--agents', 'Number of agents to spawn', 5) @Option('--interactive', 'Interactive agent configuration', false) async init( @Arg('projectName') projectName: string, options: SwarmInitOptions ): Promise<CommandResult> { if (options.interactive) { return this.int