smart-router

Select workflow phases dynamically from JSON configs across repositories.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/zero-rehq/opencode-kit --skill smart-router-zero-rehq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-router
Source: https://github.com/zero-rehq/opencode-kit/tree/main/.opencode/skill/smart-router
Command: npx skills add https://github.com/zero-rehq/opencode-kit --skill smart-router-zero-rehq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve?

Solves cross-repo workflow routing by dynamically selecting phases based on changes.

Core Features & Use Cases

  • Config-driven routing: centralizes decision-making to choose which phases (discovery, contracts, implementation, integration) to run.
  • Parallel and sequential execution: supports executing phases in parallel or in order per dependencies.
  • Subagent orchestration: delegates work to specialized subagents for each phase, coordinating across repos.

Quick Start

Run the router with a sample config, task, and repositories: ./router.sh multi-repo-e2e "Add catalog feature" "cloud_front,signage_service,ftp"

Frequently Asked Questions about smart-router

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

FAQPage Schema
How do I automate cross-repo workflow routing based on code changes?

Cross-repo workflow routing is automated by dynamically selecting execution phases based on repository changes. A config-driven engine uses JSON configurations to define phases and parallelization rules, coordinating specialized subagents across multiple repositories.

What is config-driven phase orchestration for multi-repo tasks?

Config-driven phase orchestration centralizes decision-making to choose which workflow phases, such as discovery or implementation, to run. It coordinates parallel or sequential execution across repositories by delegating work to specialized subagents defined in a JSON configuration.

How do I run parallel and sequential phases across multiple repositories?

Parallel and sequential phases are run using a shell script router that reads JSON-configured parallelization rules and dependencies. This coordinates specialized subagents to execute tasks across specified repositories in the correct order or simultaneously.

Do I need jq to use config-driven routing for multi-repo workflows?

Yes, jq is required as a dependency for the config-driven routing engine. The shell scripts use jq to parse the JSON configurations that define phases, parallelization rules, and subagent orchestration across repositories.

Can I use shell scripts to orchestrate subagents for multi-repo changes?

Yes, shell scripts orchestrate subagents by dynamically selecting phases based on detected changes. The router applies a JSON configuration to delegate work to specialized subagents, coordinating parallel or sequential execution across multiple repositories.

When should I avoid dynamic phase selection for workflow orchestration?

Dynamic phase selection should be avoided for single-repo tasks lacking varying change types. This orchestration engine specifically solves cross-repo workflow routing by dynamically selecting phases based on changes across multiple repositories.