workflow-retrieve-before-act
Skill1 starsChanged 6 months agoMITView on GitHub
Before ANY external API call, web fetch, or research query, ALWAYS check the existing corpus first with search_code. If the corpus has relevant material, use it. Only escalate to external tools if search_code returns nothing relevant. This is the brain-first lookup pattern — it fires on every message that is about to reach outside the local stack.
In this repository33 other files it gives its agents.
- skill-process-gotchasSkill
- workflow-cache-disciplineSkill
- workflow-codegraphSkill
- workflow-conductorSkill
- workflow-context-condenserSkill
- workflow-context-hygieneSkill
- workflow-criticSkill
- workflow-deadline-disciplineSkill
- workflow-deep-researchSkill
- workflow-done-definitionSkill
- workflow-edit-formatSkill
- workflow-effort-routingSkill
- workflow-escalateSkill
- workflow-execute-from-planSkill
- workflow-filesystem-offloadSkill
- workflow-learn-frameworkSkill
- workflow-long-running-processesSkill
- workflow-lspSkill
- workflow-memory-curationSkill
- workflow-plan-contractSkill
- workflow-plan-firstSkill
- workflow-planSkill
- workflow-quality-barSkill
- workflow-repomapSkill
- workflow-spec-drivenSkill
- workflow-stuck-detect-resetSkill
- workflow-stuckSkill
- workflow-subagent-isolationSkill
- workflow-subtask-loopSkill
- workflow-task-finishSkill
- workflow-task-startSkill
- workflow-tool-selectionSkill
- workflow-verify-enhancedSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Before deep_research, fetch_clean, research_topic, or any web/API call, run: search_code("<the question>") (and recall_about for entities) …
- Distinctive: line 23
If it returns relevant, current-enough material → use it and stop.
- Distinctive: line 24
Only if it returns nothing relevant → escalate to the external tool (which is itself rationed: see [[workflow-tool-selection]] and the …
≈ “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.
Files
workflow-retrieve-before-act
<!-- TRIGGERS WHEN: about to make any external/web/research call (every such message) -->The single most expensive recurring mistake is reaching outside the stack for something the corpus, codebase, or KG already holds. Make corpus-first systematic, not dependent on remembering it.
Deterministic rule (not advice):
- Before
deep_research,fetch_clean,research_topic, or any web/API call, run:search_code("<the question>")(andrecall_aboutfor entities) over the corpus. - If it returns relevant, current-enough material → use it and stop.
- Only if it returns nothing relevant → escalate to the external tool (which is itself rationed: see [[workflow-tool-selection]] and the corpus-first / exhaustion / budget gates the research server enforces).
First action when this skill applies: call
record_skill_fired("retrieve-before-act") so trigger reliability is measurable.
This is the same compounding-corpus principle the deep_research corpus-first gate enforces at the server level — this skill makes it the agent's default reflex for every outward call, not just research.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

