Gemini 4 Model Router

    by Youssef Fellah

    1

    Routes tasks from a Gemini 4 Neon orchestrator to direct execution or a multi-model swarm (Hydrogen, Neon, Carbon, Argon) with explicit effort pinning.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+23 more

    Gemini 4 Model Router

    Example session with this skill installed

    I need to refactor the entire auth module for better security and also add basic unit tests to 12 utility files. How should we handle this?

    • Read your context and instructions
    • Compiled the gemini 4 model

    1. Codebase Inspection

    Read auth-gateway/src/session.ts, shared/middleware/auth.ts, and the service manifest across all 14 services. Confirmed shared middleware is imported by 14 independent repositories/modules with distinct route guards and test suites.

    2. Tier 0 Bypass Gate

    Bypass rejected: this spans 14 services, combines architectural risk (auth migration), parallel test generation, and a security audit. Routing via swarm using the

    Architect -> Execute pattern.

    3. Routing Plan

    StageRoleTierModel & EffortWorkspaceScope
    1jwt-architectTier 3 (Heavy Reasoning)Carbon (high)inheritProduce JWT claim schema, key rotation design, and migration contract
    2auth-coreTier 2 (Core Engineering)Neon (high)shareImplement shared JWT verification middleware and gateway issuance
    3svc-tests-1..4Tier 1 (Fast Fan-out)Hydrogen (medium)shareMigrate route guards and add unit tests across the 14 services in parallel
    4sec-auditorTier 4 (Domain Specialist)Argon (high)inheritAudit JWT signature verification, alg-none/key-confusion vectors, and expiration handling

    4. Execution & Escalation

    • Called swarm(action="models", all=true) to resolve exact model IDs and titled the swarm jwt-auth-migration.
    • Spawned jwt-architect first; once the spec was approved, fanned out auth-core and sharded svc-tests workers with explicit file ownership and npm test verification commands.
    • When svc-tests-3 hit a subtle async race condition in token refresh mocks, escalated it in place with swarm(action="model", name="svc-tests-3", model="<neon-high>") to preserve context instead of restarting.
    • Ran sec-auditor on the merged branch, resolved two findings (strict aud/iss validation and clock-skew cap), verified all 14 test suites passed, and terminated workers cleanly.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Model Router is an orchestration skill for Gemini 4 Neon that evaluates incoming engineering tasks and routes each piece of work to the optimal execution tier, model, effort level, and workspace mode.

    Why use Model Router

    • Eliminates unnecessary multi-agent overhead: Enforces a strict Tier 0 Bypass Gate so single-file edits, quick fixes, and tightly coupled tasks stay directly in Neon instead of paying swarm cold-start costs.
    • Right-sizes model capability and quota: Dispatches parallel mechanical work to Hydrogen, core engineering to Neon, deep architectural planning or deadlock resolution to Carbon, and security/long-document/compliance analysis to Argon.
    • Inspects before routing: Requires reading actual files, diffs, or stack traces before choosing a tier so complexity is measured against real code rather than guessed from a short prompt.
    • Escalates in place: Upgrades stalled workers to a stronger model without killing them or losing their conversation history, avoiding redundant codebase re-reads.

    Routing Tiers

    TierTask ProfileExecution ModeModel & EffortWorkspace
    0. BypassQuick fix, single-file edit, Q&A, tightly coupled workDirect (no swarm)Neon (current session)None
    1. Fast Fan-outParallel mechanical edits, test suites, lint/QA sweeps, scaffoldingswarm (tasks or n)Hydrogen (low / medium)share (writers) / inherit (verifiers)
    2. Core EngineeringIndependent parallel features, multi-module refactors, standard debuggingswarmNeon (medium / high)share
    3. Heavy ReasoningDeep architecture, massive migrations, hard root-cause bugsswarm (Architect / Escalation)Carbon (high / xhigh)inherit (planning) / share (edits)
    4. Domain SpecialistSecurity/cyber audits, threat modeling, long-doc/legal/financial synthesisswarmArgon (medium / high)inherit (read-only)

    Included Patterns

    • Architect -> Execute: Spawns a Carbon (high) architect in inherit mode to produce a concrete spec before fanning out implementation to Neon or Hydrogen workers in share workspaces.
    • Self-contained Worker Briefs: Enforces explicit file/module ownership, constraints, objective verification commands, and concrete definitions of done.
    • Safe Cleanup: Ensures all share/branch workspace changes are reviewed, merged, and verified before terminating workers.

    Requires Gemini 4 environment and swarm tool access. Worker efficiency depends on the quality of the generated brief. Cold-start costs may apply for very short tasks.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    • Free with an Agensi account

    Requires

    Nothing to install.

    Permissions

    Read Files
    Listed3 days ago

    What's inside

    Frequently Asked Questions

    This skill automates task delegation by analyzing request complexity and routing work to the most cost-effective model tier, preventing expensive models from being wasted on simple boilerplate.

    The Model Router is specifically designed for Gemini 4 Neon environments and requires the 'swarm' toolset to be active for agent spawning and workspace management.

    The skill uses an 'In-place escalation' feature that allows a task to be moved to a higher-reasoning model, like Carbon, while fully preserving the existing conversation history and technical context.

    Your purchase includes the routing engine configuration, specialized tier-mapping logic, and the pre-configured architectural patterns for 'Architect-Execute' workflows.

    Yes, you can manually define 'bypass gates' for simple, single-file edits or specify Argon models for domain-specific tasks like security audits and financial reviews.

    New in Agents & Orchestration

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Free