agentsclimarketplace

Llm orchestration

Skill sairam0424/MindForge/.mindforge/skills/llm-orchestration

MindForge: The Enterprise Agentic Framework for Claude Code & Antigravity. High-performance autonomous execution, wave-parallelism, and multi-tier governance for production-grade AI engineering.

Install
npx -y skills add sairam0424/MindForge --skill llm-orchestration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.0 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

LLM Orchestration & Routing

When this skill activates

This skill activates when building systems that route requests across multiple LLMs, cascade from cheap to expensive models, implement fallback strategies, or manage context window limits. It applies to production AI systems where cost, latency, and reliability must be optimized across a fleet of models.

Mandatory actions when this skill is active

Before writing any code

  1. Map task to model capabilities — Identify which tasks require which model capabilities: reasoning (Opus/GPT-4), speed (Haiku/GPT-3.5), cost-efficiency (Haiku/GPT-3.5), context length (Claude 200K, GPT-4 128K), multimodal (GPT-4V, Claude Sonnet with vision). Not all tasks need the most expensive model.
  2. Design cascading strategy — Define fallback chain: start with fastest/cheapest model, escalate to more capable models if quality is insufficient. Example: Haiku → Sonnet → Opus. Measure escalation rate (% of requests that cascade) and optimize to minimize unnecessary escalations.
  3. Establish routing rules — Define deterministic rules for model selection: route by task type (classification → Haiku, creative writing → Opus), by complexity (short prompts → small models, long prompts → large models), or by user tier (free users → Haiku, paid users → Sonnet). Document routing logic explicitly.
  4. Plan for context window management — Measure typical prompt lengths and output lengths. If prompts exceed model limits, implement truncation (drop least important context), summarization (compress with smaller model), or chunking (split into multiple requests). Test that truncated prompts still produce useful outputs.

During implementation

  • Implement request routing layer — Build a central router that examines each request (task type, complexity, user tier, priority) and selects the appropriate model. Router must be fast (<10ms overhead) and deterministic (same input always routes to same model for consistency).
  • Add quality-based cascading — After receiving a response from a cheap model, run a lightweight quality check (confidence score, length validation, keyword presence). If quality is below threshold, retry with a more expensive model. Log all escalations for analysis.
  • Design stateful prompt chaining — When chaining multiple LLM calls (research → draft → critique → revision), maintain conversation state explicitly. Use structured context: {task: ..., previous_output: ..., next_instruction: ...}. Avoid relying on model memory (models are stateless between API calls).
  • Implement prompt compression — For long contexts, compress aggressively: remove filler words, use abbreviations, reference external documents by ID instead of embedding full text. Test that compressed prompts produce equivalent outputs. Measure compression ratio (original tokens / compressed tokens).
  • Handle rate limits gracefully — Implement exponential backoff and retry logic for rate limit errors. If one model is rate-limited, fail over to an alternative model (even if more expensive). Never return errors to users due to transient rate limits.
  • Track cost and latency per model — Log every request: model used, input tokens, output tokens, latency, cost. Aggregate metrics by model and task type. Identify opportunities to downgrade expensive models to cheaper alternatives without quality loss.

After implementation

  • Validate routing accuracy — Test that requests route to the expected model based on your rules. Measure routing accuracy (% of requests routed correctly). Incorrect routing wastes cost (cheap task routed to expensive model) or produces poor quality (complex task routed to weak model).
  • Measure cascade efficiency — Track escalation rate: % of requests that start with a cheap model but cascade to expensive models. Target: <10% escalation rate. Higher rates indicate routing rules are too aggressive (route to cheaper models upfront).
  • Benchmark end-to-end latency — Measure latency including routing overhead, model inference, and cascading retries. Compare to single-model baseline. Orchestration should add <50ms overhead. If higher, optimize routing logic or reduce cascade depth.
  • Test fallback behavior — Simulate model failures (rate limits, API downtime, timeouts) and validate that fallback logic activates. Ensure degraded mode still returns useful responses (even if lower quality or higher latency).

Self-check before task completion

  • Task-to-model mapping is documented with capability requirements (reasoning, speed, cost, context)
  • Cascading strategy is defined with explicit escalation rules and thresholds
  • Routing rules are deterministic and documented (by task type, complexity, user tier)
  • Context window limits are handled via truncation, summarization, or chunking strategies
  • Request router is implemented with <10ms overhead and deterministic behavior
  • Quality-based cascading retries with more expensive models if quality is below threshold
  • Prompt chaining maintains stateful context explicitly across LLM calls
  • Prompt compression is implemented and tested for equivalence with uncompressed prompts
  • Rate limit handling implements exponential backoff and model failover
  • Cost and latency per model are logged and aggregated for optimization analysis
  • Routing accuracy is validated (requests route to expected models)
  • Escalation rate is measured and optimized to <10% of requests
  • Fallback behavior is tested under simulated model failures (rate limits, downtime)

Gives 0 of the 12 instructions most agent orchestration skills give in ~1.1k tokens

Counted across 742 of the 995 authors here whose files we hold, read 2026-08-07

  • reference existing artifacts by path or URLin 53 of 742, across 25 files
  • run the full test suite after integrating changesin 51 of 742, across 19 files
  • dispatch one agent per independent problem domainin 50 of 742, across 17 files
  • verify fixes do not conflictin 45 of 742, across 13 files
  • include a suggested skills section in the documentin 45 of 742, across 17 files
  • redact sensitive informationin 41 of 742, across 11 files
  • save to the temporary directory of the operating systemin 39 of 742, across 10 files
  • tailor the document to user-provided focus argumentsin 39 of 742, across 9 files
  • spot check agent changes for systematic errorsin 34 of 742, across 7 files
  • write a handoff document summarising the current conversationin 31 of 742, across 6 files
  • Assign each agent a specific scopein 23 of 742, across 8 files
  • provide specific scope and clear goalin 23 of 742, across 5 files

Said here and by no other author read

  • map task requirements to model capabilities
  • design an escalation fallback chain
  • establish deterministic model selection rules
  • plan context window limit management
  • implement a central request router
  • add quality-based cascading retries

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.