do-web-doc-resolver
Skill2 starsChanged 10 days agoMITView on GitHub
Python resolver for URLs and queries into compact, LLM-ready markdown. Use this skill when fetching documentation, resolving web URLs, or building context from web sources — even if they just say "read this doc page" or "get the docs for X". Uses progressive free-first cascade with quality scoring, circuit breakers, layered routing memory, trace-based evaluation, and agent-friendly docs validation. Not for web-search-researcher, agent-browser.
- Reads credentials
- Installs packages
In this repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/avoid-ai-writing/AGENTS.mdAGENTS.md
- .agents/skills/do-web-doc-resolver/AGENTS.mdAGENTS.md
- .agents/skills/skill-evaluator/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- accessibility-auditorSkill
- agent-browserSkill
- agentic-abstentionSkill
- agents-mdSkill
- api-design-firstSkill
- architecture-diagramSkill
- avoid-ai-writingSkill
- cicd-pipelineSkill
- cloudflare-worker-apiSkill
- codacySkill
- codeberg-apiSkill
- code-review-assistantSkill
- css-render-performanceSkill
- database-devopsSkill
- debuggerSkill
- delegateSkill
- dependency-upgradesSkill
- dist-channel-selectionSkill
- docs-hookSkill
- document-rendering-and-locatorsSkill
- dogfoodSkill
- dora-reportSkill
- durable-objectsSkill
- eu-ai-act-complianceSkill
- git-github-workflowSkill
- goap-agentSkill
- implementerSkill
- intent-classifierSkill
- iterative-refinementSkill
- jules-delegatorSkill
- learnSkill
- lifecycle-managementSkill
- local-context-sanitizationSkill
- memory-contextSkill
- migration-refactoringSkill
- nested-build-isolationSkill
- privacy-firstSkill
- progressive-deliverySkill
- pwa-offline-syncSkill
- reader-ui-uxSkill
- readme-best-practicesSkill
- secrets-managementSkill
- secure-invite-and-accessSkill
- security-code-auditorSkill
- shell-script-qualitySkill
- skill-creatorSkill
- skill-evaluatorSkill
- static-analysisSkill
- testing-strategySkill
- test-runnerSkill
- triz-solverSkill
- turso-dbSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Search for technical information across the web
- Very specific: line 72
Structured Tool Contracts: Every provider returns ProviderResult(ok, content, error, meta) with ProviderMeta(tool, duration_ms, cache_hit, …
≈ “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
Web Doc Resolver Skill
Resolve URLs and queries into compact, LLM-ready markdown using a progressive, free-first cascade with 2026 production patterns.
When to Use
- Fetch and parse documentation from a URL
- Search for technical information across the web
- Build context from web sources for AI agents
- Validate content against agent-docs-spec v0.3.0
- Trace resolution trajectories for debugging
Prerequisites
- Python 3.10+ in an isolated virtual environment.
- From the skill directory, run
python -m pip install .to install the base package and dependencies declared inpyproject.tomlbefore the quick start. - Install provider, ML, or database extras only for the features that need them; text resolution does not require the optional visual/ML stack.
Quick Start
python -m scripts.cli "https://docs.rust-lang.org/book/"
python -m scripts.cli "Rust async programming" --profile quality --jsonCascade Strategy
URL: Cache → llms.txt → Jina → Direct Fetch → Firecrawl → Mistral Browser → DuckDuckGo
Query: Cache → Exa MCP → Exa SDK → Tavily → Serper → DuckDuckGo → Mistral Web Search
Providers (12 total)
| Provider | Type | Free | Latency |
llms_txt | URL | Yes | ~100ms |
jina | URL | Yes | ~300-1500ms |
exa_mcp | Query | Yes | Varies |
duckduckgo | Query | Yes | ~2s |
direct_fetch | URL | Yes | ~500ms |
exa, tavily, serper | Query | No | ~1s |
firecrawl, mistral_* | URL/Query | No | ~2-3s |
docling, ocr | URL | No | ~3-5s |
Execution Profiles
| Profile | Attempts | Paid | Latency | Quality |
free | 3 | 0 | 6s | 0.70 |
fast | 2 | 1 | 4s | 0.60 |
balanced | 4-6 | 1-2 | 9-12s | 0.65 |
quality | 6-10 | 3-5 | 15-20s | 0.55 |
Key Features
Structured Tool Contracts: Every provider returns ProviderResult(ok, content, error, meta) with ProviderMeta(tool, duration_ms, cache_hit, quality_score, error_type).
Layered Routing Memory: TTL-based decay (30 days), metadata filtering, recency weighting. See scripts/routing_memory.py.
Structured Resolution Evidence: CLI --json reports available source, quality, and provider metrics. Trace model types live in scripts/models.py; the CLI has no --trace flag.
Agent-Friendly Docs Validation: Validates against agent-docs-spec v0.3.0 — 10 checks across 7 categories.
Quality Scoring: Content scored 0.0-1.0. Penalties: too_short(-0.35), missing_links(-0.15), duplicate_heavy(-0.25), noisy(-0.20).
Circuit Breakers: 3 failures → 300s cooldown per provider.
Configuration
export EXA_API_KEY="" TAVILY_API_KEY="" FIRECRAWL_API_KEY="" MISTRAL_API_KEY=""
export WEB_RESOLVER_MAX_CHARS=8000 WEB_RESOLVER_MIN_CHARS=200Output
{"source": "jina", "content": "...", "score": 0.87,
"metrics": {"total_latency_ms": 1234, "provider_metrics": [...], "paid_usage": False},
"trace": {"trace_id": "...", "steps": [...], "success": True}} # when --traceFile Structure
scripts/
├── resolve.py # Main orchestrator & CLI
├── models.py # Data models, enums, trace types
├── providers_impl.py # 12 provider implementations
├── quality.py # Content quality scoring
├── docs_validation.py # Agent-docs-spec v0.3.0 checks
├── routing_memory.py # Layered memory with TTL decay
├── routing.py # Budget-aware routing
├── circuit_breaker.py # Circuit breaker patterns
├── cache_negative.py # Negative cache
├── synthesis.py # LLM synthesis gate
└── utils.py # UtilitiesSee Also
web-search-researcher— Web search and researchagent-browser— Browser automation
Rationalizations
| Rationalization | Reality |
| "I'll just use the cheapest provider for everything." | Free providers often have lower quality, latency, or reliability; cascading with quality scoring ensures acceptable results. |
| "Circuit breakers are overkill — errors are rare." | Without circuit breakers, a failing provider consumes budget and time on every request, degrading the entire cascade. |
| "The sync and async fetchers share one URL validator." | They do not. utils/http.py and utils/async_http.py each define their own _normalize_host/is_safe_url. Patch one and the async path keeps the old rules. |
Red Flags
- Ignoring quality scores and accepting low-quality content without validation
- Disabling circuit breakers or skipping cooldown periods during provider failures
- Not setting max character limits — fetching unbounded content wastes tokens
- A host-validation change landing in
utils/http.pywith no matchingutils/async_http.pychange and no async test case - Adding another IP encoding to
_normalize_hostinstead of rejecting non-canonical hosts and checking the resolved address - A resolution failure reaching the allow return, or an IPv6 literal embedding a v4
address (
::/96,64:ff9b::/96,2002::/16) judged only against IPv4 networks
References
| Topic | File |
| Agent-docs-spec | https://github.com/agent-ecosystem/agent-docs-spec |
| Memory 2026 | https://mem0.ai/blog/state-of-ai-agent-memory-2026 |
| Agent architecture | https://andriifurmanets.com/blogs/ai-agents-2026-practical-architecture-tools-memory-evals-guardrails |
| Web research optimization | references/web-research-optimization.md - Token budgets, quality scoring, caching, profile selection |
Voice & Context
- Default:
professional+blog - Reference:
voice-profilesskill for definitions and auto-detection.
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
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.

