Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Fast delegation of large-context tasks to Gemini CLI via MCP when file size exceeds 100KB or task requires analysis/review.
.claude/skills/williamzujkowski-gemini-cli-delegation-large-context-routing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 27% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 98% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 112% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 114% | 0% |
Trigger Conditions:
Use this skill for fast delegation decisions when:
Do NOT use when:
Timestamp & Environment
NOW_ET = 2025-10-26T01:18:53-04:00 (America/New_York, ISO-8601)Required validations before delegation:
task_description is non-empty stringfile_paths (if provided) resolve to accessible files.env, credentials.json, *.key, *.pemToken Budget: T1≤2000 tokens
Two-step process:
analysis|review|summarize|codebase-review → delegate to Geminidelegation_command for Gemini MCPrecommended_tool: "claude"Primary Routing Logic:
| Condition | Threshold | Action | |-----------|-----------|--------| | File size | >100KB | Delegate to Gemini | | Task type | analysis, review, summarize, codebase-review | Delegate to Gemini | | Sandbox execution | Any code testing | Delegate to Gemini | | Otherwise | Default | Keep in Claude |
Note: Complex multi-file orchestration belongs in a separate orchestration agent, not this skill.
Abort Conditions:
Schema (TypeScript-style):
typescriptinterface DelegationResult { delegation_decision: boolean; // true = delegate to Gemini recommended_tool: "claude" | "gemini-mcp"; delegation_command?: string; // only if delegation_decision = true rationale: string; // max 160 chars, cites threshold security_flags: string[]; // empty if clean; else warnings }
Required fields:
delegation_decision, recommended_tool, rationale, security_flags (always)delegation_command (only if delegation_decision = true)Example 1: Large File Analysis (Delegate)
yaml# Input task_description: "Summarize research paper" file_paths: ["./paper.pdf"] context_size_estimate: 3500 # KB # Output { "delegation_decision": true, "recommended_tool": "gemini-mcp", "delegation_command": "ask gemini to analyze @./paper.pdf and summarize key findings", "rationale": "File size 3.5MB > 100KB threshold", "security_flags": [] }
Example 2: Small File Edit (Keep in Claude)
yaml# Input task_description: "Refactor authentication function" file_paths: ["./auth.py"] context_size_estimate: 45 # KB # Output { "delegation_decision": false, "recommended_tool": "claude", "rationale": "File <100KB and task type 'refactor' suits Claude precision", "security_flags": [] }
Token Budget Enforcement:
Safety Checks:
Determinism:
Primary Sources:
Configuration Templates:
resources/mcp-config-template.json — Claude Desktop MCP setup for gemini-mcp-toolresources/delegation-decision-matrix.md — Static reference table (not computed during skill execution)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 8,009 | 3,027 | -62% | 1 | 1 | 0% | 1,740 | 2,206 | +27% | 0 | 0 | — |
case-02 | fail→pass | 4,813 | 2,701 | -44% | 1 | 1 | 0% | 1,025 | 2,030 | +98% | 0 | 0 | — |
case-03 | fail→pass | 5,248 | 2,706 | -48% | 1 | 1 | 0% | 1,145 | 2,048 | +79% | 0 | 0 | — |
case-04 | fail→pass | 4,715 | 2,889 | -39% | 1 | 1 | 0% | 975 | 2,069 | +112% | 0 | 0 | — |
case-05 | fail→pass | 4,661 | 4,586 | -2% | 1 | 1 | 0% | 894 | 1,917 | +114% | 0 | 0 | — |
case-06 | fail→pass | 12,591 | 12,320 | -2% | 1 | 1 | 0% | 947 | 1,882 | +99% | 0 | 0 | — |
case-07 | fail→pass | 5,708 | 3,778 | -34% | 1 | 1 | 0% | 1,182 | 2,227 | +88% | 0 | 0 | — |
case-08 | fail→pass | 6,958 | 4,523 | -35% | 1 | 1 | 0% | 1,531 | 2,408 | +57% | 0 | 0 | — |
case-09 | fail→pass | 8,789 | 6,977 | -21% | 1 | 1 | 0% | 1,165 | 2,154 | +85% | 0 | 0 | — |
case-10 | fail→pass | 4,451 | 4,164 | -6% | 1 | 1 | 0% | 1,105 | 2,092 | +89% | 0 | 0 | — |
case-11 | fail→fail | 4,815 | 4,215 | -12% | 1 | 1 | 0% | 1,032 | 2,196 | +113% | 0 | 0 | — |
case-12 | fail→fail | 5,167 | 5,691 | +10% | 1 | 1 | 0% | 980 | 2,610 | +166% | 0 | 0 | — |
case-13 | pass→pass | 7,638 | 8,115 | +6% | 1 | 1 | 0% | 966 | 2,692 | +179% | 0 | 0 | — |
case-14 | fail→fail | 10,209 | 9,152 | -10% | 1 | 1 | 0% | 960 | 2,808 | +193% | 0 | 0 | — |
case-15 | fail→pass | 10,976 | 9,081 | -17% | 1 | 1 | 0% | 1,422 | 2,226 | +57% | 0 | 0 | — |
case-16 | fail→pass | 5,592 | 2,880 | -48% | 1 | 1 | 0% | 1,040 | 1,906 | +83% | 0 | 0 | — |
case-17 | fail→pass | 6,146 | 2,830 | -54% | 1 | 1 | 0% | 1,288 | 2,052 | +59% | 0 | 0 | — |
case-18 | fail→pass | 4,187 | 3,467 | -17% | 1 | 1 | 0% | 807 | 1,886 | +134% | 0 | 0 | — |
case-19 | fail→pass | 4,471 | 2,444 | -45% | 1 | 1 | 0% | 1,037 | 1,905 | +84% | 0 | 0 | — |
case-20 | pass→pass | 25,781 | 18,086 | -30% | 1 | 1 | 0% | 5,373 | 5,035 | -6% | 0 | 0 | — |
case-21 | pass→pass | 9,977 | 6,003 | -40% | 1 | 1 | 0% | 2,076 | 2,709 | +30% | 0 | 0 | — |
case-22 | pass→pass | 10,468 | 5,917 | -43% | 1 | 1 | 0% | 2,340 | 2,641 | +13% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +68 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.