agentleFS
patrickbdevaneypatrickbdevaney/hermes-max/skills/workflow-tool-selection/SKILL.md

workflow-tool-selection

Skill1 starsChanged 6 months agoMITView on GitHub

A strict tiered ladder consulted BEFORE reaching for any expensive tool — answer from context first, climb only when each rung fails. Caps cost and latency by never firing deep_research/escalation when a cheaper rung would answer.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every tool below the context window costs tokens, latency, or money, and the costs grow fast as you descend.

    line 10
  2. Very specific:

    If any of these returns relevant, current-enough material, use it and STOP — do not run deep_research.

    line 80
  3. Very specific:

    Failure = climb, not retry-louder: If rung 5 (conductor_synthesize) fails, that's the signal to consider rung 6/7 — but a *second* synth …

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- TRIGGERS WHEN: A strict tiered ladder consulted BEFORE reaching for any expensive tool — answer from context first, climb only when each rung fails. -->

Climb the ladder from the cheapest rung. Never skip down to an expensive tool.

Every tool below the context window costs tokens, latency, or money, and the costs grow fast as you descend. Before you reach for one, ask: what is the CHEAPEST rung that can answer this? Start there. A lower rung is tried only after the rungs above it have failed to answer — never in parallel, never as a first guess. This is the single most important habit for staying fast and cheap; pair it with [[workflow-effort-routing]] (how hard to think) and [[workflow-deadline-discipline]] (stop deliberating, act).

The ladder (try top-down; descend only on failure)

#RungToolUse whenCost
1Context windowno toolthe answer is already in this conversation / the open files / what you just readfree
2Known codebase patternsearch_code (also get_symbol_context, retrieve_related)"how does THIS repo already do X" — an existing symbol, caller, or convention~free, sub-second
3Framework / API questionsearch_docs (mcp-docs corpus)a library/framework/API fact that may already be in the docs corpuscheap, local
4Prior decision / knowledgerecall_about (KG; also query_graph)"did we already decide / learn / record this" — an earlier choice, entity, or relationcheap, local
5Hard novel problemconductor_steer → conductor_synthesizenone of 1–4 answer and it needs real reasoning/generation, not retrievallocal model time
6Needs recent knowledgedeep_researchthe answer requires CURRENT external knowledge not in the corpus (rung 3 already checked)minutes + sources
7Frontier-novel, synth failedescalate (Opus tier)conductor_synthesize failed twice on a genuinely frontier-novel problem$$ / may be OFF

Each rung answers a different kind of question — retrieval (2–4), reasoning (5, 7), or fresh external knowledge (6). Climbing in order means you never pay for fresh-knowledge research or frontier escalation to answer something the repo, the docs, or the KG already knew.

Task-class entry points (where to START on the ladder)

Most tasks should NOT start at rung 1 and grind upward — classify the task (use the difficulty signal from [[workflow-conductor]] / classify_difficulty) and enter at the right rung:

  • MECHANICAL (apply a planned diff, rename, format, obvious fix, run the verifier): start at rung 1 and NEVER go deeper. If the context window doesn't already hold what you need, at most one search_code (rung 2) — a mechanical task that "needs research" is mis-classified; re-plan instead of descending. Mechanical work never touches rungs 5–7.
  • HARD (non-obvious bug, design with downstream consequences, flagged HARD): start at rung 4 — check prior decisions in the KG first (don't re-derive what was decided), then climb 5 → (6/7 only if truly required). Rungs 2–3 are still worth a quick look if a codebase/API fact is implicated.
  • NOVEL (frontier problem, genuinely new territory, needs current external knowledge): start at rung 6 — but only after the corpus pre-check below. If deep_research synthesis still can't close it and the problem is frontier-novel, rung 7.

The five-tier RESEARCH ladder (exhaust in order — mechanically enforced)

Reaching for deep_research reflexively is the single most expensive habit. The model doing reasoning on each research step burns wall time — a single deep_research is ~5–15 min. Most coding questions resolve at Tier 0–2. Reach for parametric knowledge and fast search before any synthesis tool. The server now enforces this ladder — it will refuse deep_research until the cheaper tiers are on record.

TierWhatWhenCost
0 — Parametricimplement directly, no tool calltextbook algorithms (Miller-Rabin, quicksort, Dijkstra…), standard patterns, common library usage — you already know these0s
1 — RAG corpussearch_code / corpus check over docs/research-*"does prior work / this repo already cover X"ms
2 — Targeted fetchfetch_clean on a known URL, or one SearXNG hit"exact value of X", "what does this API return" — a precise fact10–30s
3 — Single-topic distillmcp-docs.research_topicone specific sub-question, one source, local distill — no multi-source synthesis30–90s
4 — deep_researchfull multi-source synthesisLAST RESORT — novel protocol specs, recent primary literature, triangulation across many sources, open-ended "current state of X"5–15 min

Mechanical gates on deep_research (it returns an error, not a result, if you skip ahead):

  • Parametric block — textbook/standard-pattern queries are refused outright (implement from parametric knowledge).
  • Corpus-first — it checks docs/research-* itself; a hit returns prior research instantly.
  • Exhaustion — it refuses until a related lighter-tool call (search_code/fetch_clean/research_topic) is on record, or you call note_lighter_tools_attempted(question) to assert you tried them.
  • Budget + cooldown — capped cumulative research time per session and a cooldown between calls; a blocked call tells you to use the lighter tiers.

The deep_research corpus pre-check (MANDATORY before rung 6)

deep_research is the most expensive rung short of Opus — minutes of wall-clock and external sources. Before firing it, ALWAYS check whether the RAG/docs corpus already has relevant material:

  1. search_docs("<the question>") — the on-disk research corpus (prior deep_research runs compound their briefs here).
  2. search_code over ingested docs / recall_about for the topic's entities (rungs 2–4).

If any of these returns relevant, current-enough material, use it and STOP — do not run deep_research. Only when the corpus genuinely lacks it (or it's plainly stale) do you fire research. This is the whole point of the compounding corpus: each run makes the next one cheaper, so a topic is researched from scratch once. See [[workflow-deep-research]] for running it well once you commit.

Fire deep_research ONCE, at task start — and only if the task requires current/external knowledge the corpus pre-check above couldn't satisfy. It is a 5–10 minute operation that already loops plan→explore→verify→synthesize internally, so never fire it mid-task or per-subtask. After it returns, follow-up lookups go to search_code / search_docs, not a second research run. If the one call times out or returns < 3 sources, fall back to mcp-docs.research_topic — never another deep_research ([[workflow-deep-research]]).

Discipline

  • One rung at a time. Fire the cheapest plausible rung, look at the result, and only descend if it genuinely failed to answer — not because you'd "rather" use the bigger tool.
  • Name the rung you're on in your reasoning ("rung 2: search_code for the existing handler") so a jump to rung 6 is visibly justified by failures at 2–5, not a reflex.
  • Failure = climb, not retry-louder. If rung 5 (conductor_synthesize) fails, that's the signal to consider rung 6/7 — but a second synth failure on frontier-novel is the only gate to rung 7 ([[workflow-escalate]]); below frontier-novel, a synth failure means re-plan, not escalate.
  • Respect availability. Rung 7 (Opus) may be OFF (no key) and rungs 5–6 are gated by the live budget/conductor; if a rung is unavailable the ladder degrades to the best available lower rung and says so — never a hard stop.
  • Skipping straight to deep_research or escalate for something the context window, the codebase, the docs corpus, or the KG already holds is the single most expensive mistake this ladder prevents.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.