agentleFS
bobmmaobobmmao/agent-workflow-skills/skills/governance/search-budget-policy/SKILL.md

search-budget-policy

Skill0 starsChanged 5 months agoMITView on GitHub

Route web lookups across Brave, Tavily, Scrapling, and DuckDuckGo while conserving paid API quota.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this 4-level search order:

    line 7
  2. Distinctive:

    Use when source quality and freshness matter.

    line 11
  3. Very specific:

    If web_search already hit a Scrapling provider failure for the same query/error, skip duplicate retries and move to level 2 or 4 as …

    line 16
  4. Distinctive:

    Use when higher-priority paths are unavailable.

    line 26
  5. Distinctive:

    Do NOT use paid search for simple definitions, translation, rewriting, or summarization.

    line 31
  6. Distinctive:

    Do NOT repeat nearly identical queries.

    line 32
  7. Distinctive:

    If a path fails once for the same query, move to the next fallback level instead of retry looping.

    line 34
  8. Distinctive:

    Keep retries bounded (max 3 with short backoff).

    line 35
  9. Very specific:

    When to use built-in web_search (primary):

    line 37
  10. Very specific:

    When to use tavily_search:

    line 44
  11. Very specific:

    If web_search already failed for the same query/error, do not loop.

    line 48
  12. Distinctive:

    When to use DDG fallback:

    line 55
  13. Very specific:

    Use web_fetch only after you already have a target URL from search results or the user gave you a URL.

    line 61
  14. Distinctive:

    Do not fetch many pages speculatively.

    line 62
  15. Distinctive:

    Prefer fetching 1 page first, then expand only if needed.

    line 63
  16. Distinctive:

    If the answer does not require live web access, answer directly without any search.

    line 68
  17. Distinctive:

    If paid search is not justified, prefer lower-cost fallback or no search.

    line 69
  18. Distinctive:

    If all search methods appear unavailable, stop wasting calls and answer from available context, clearly stating the limitation.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Use this 4-level search order:

  1. Built-in web_search (configured provider, currently Scrapling via Brave web/API fallback)
    • Primary path for high-value lookups.
    • Use when source quality and freshness matter.
  2. tavily_search
    • Secondary path when primary search fails, rate-limits, or has weak recall.
    • Good structured backup for research tasks.
    • If web_search already hit a Scrapling provider failure for the same query/error, skip duplicate retries and move to level 2 or 4 as appropriate.
  3. scrapling-lead-search (no API fallback)
    • Third path for resilient low-cost recovery when provider tools are flaky.
    • General web/news queries should disable the lead-only intent filter: python3 skills/growth/scrapling-lead-search/tools/scrapling_lead_search.py --query "<query>" --max-results 10 --no-api-fallback --skip-intent-filter --json
    • Lead discovery can keep the original default filter.
  4. DuckDuckGo fallback (ddg-search / github-ddgr-search)
    • Last-resort path only.
    • Use when higher-priority paths are unavailable.

Search budgeting policy:

  • Assume paid providers have limited quota and should be preserved.
  • Behave conservatively:
    • Do NOT use paid search for simple definitions, translation, rewriting, or summarization.
    • Do NOT repeat nearly identical queries.
    • Reuse prior search results whenever possible.
    • If a path fails once for the same query, move to the next fallback level instead of retry looping.
    • Keep retries bounded (max 3 with short backoff).

When to use built-in web_search (primary):

  • User explicitly asks to search the web
  • User needs the latest/current information
  • Official source discovery matters
  • Commercial or business research quality matters
  • You need authoritative first-pass results

When to use tavily_search:

  • Primary Scrapling-backed web_search failed in this session
  • You still need structured API results
  • You need a second high-quality source without dropping to DDG yet
  • If web_search already failed for the same query/error, do not loop; move to the next fallback

When to use scrapling-lead-search:

  • Provider tools are unstable
  • You need resilient lead discovery with minimal paid API burn
  • You want low-cost web HTML discovery before API fallback

When to use DDG fallback:

  • Primary/Tavily/Scrapling paths all failed
  • Query is exploratory/lower-stakes
  • You only need rough candidate URLs

web_fetch policy:

  • Use web_fetch only after you already have a target URL from search results or the user gave you a URL.
  • Do not fetch many pages speculatively.
  • Prefer fetching 1 page first, then expand only if needed.
  • Remember: web_fetch does plain HTTP fetch and readable extraction, not JavaScript rendering.
  • For JS-heavy or login-protected pages, prefer the Browser tool instead.

Response behavior:

  • If the answer does not require live web access, answer directly without any search.
  • If paid search is not justified, prefer lower-cost fallback or no search.
  • If all search methods appear unavailable, stop wasting calls and answer from available context, clearly stating the limitation.

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.