Install
openclaw skills install smart-fetchFetch web pages for LLM use with markdown-first negotiation, strict output limits, cache/revalidation, and robust HTML fallback. Use for article/doc/blog scraping where token efficiency, safer ingestion, and predictable extraction behavior are important.
openclaw skills install smart-fetchAccept: text/markdown, text/html (unless markdown mode is disabled).content-type is text/markdown, return directly.content-type is text/html, run Readability + Turndown fallback.node index.js <url>
# debug logs
node index.js --debug <url>
# structured output (metadata + body)
node index.js --json <url>
# hard output limits
node index.js --max-chars 12000 --max-bytes 50000 <url>
# cache and revalidation
node index.js --cache-ttl 3600 --cache-dir ./.cache/smart-fetch <url>
# network stability
node index.js --timeout 12000 --retries 2 <url>
# force disable markdown negotiation for this request
node index.js --no-markdown <url>
SMART_FETCH_TIMEOUT_MS (default: 15000)SMART_FETCH_RETRIES (default: 1, exponential backoff)SMART_FETCH_DISABLE_MARKDOWN (1|true|yes)SMART_FETCH_MIN_BODY_CHARS (default: 200)SMART_FETCH_MAX_CHARS (default: 0, disabled)SMART_FETCH_MAX_BYTES (default: 0, disabled)SMART_FETCH_CACHE_TTL (default: 0, disabled)SMART_FETCH_CACHE_DIR (default: ~/.cache/smart-fetch)SMART_FETCH_DOMAIN_ALLOWLIST (comma-separated hosts)SMART_FETCH_DOMAIN_BLOCKLIST (comma-separated hosts)blocklist > allowlist > default allowSMART_FETCH_DISABLE_MARKDOWN has highest priority; if set, markdown negotiation is disabled even without --no-markdowncache-ttl <= 0 disables cacheWarnings may include:
readability_parse_failedmissing_titlebody_too_shorttruncated_by_max_charstruncated_by_max_bytesnon_html_or_markdown_content_typeSafety flags may include:
contains_shell_exec_lurecontains_run_command_lurecontains_download_and_execute_lurecontains_api_key_requestRouting fields:
severity: info | warn | errorrecommendedNextAction enum:
noneretry_with_higher_limitsretry_with_alternate_extractorskip_summarization_use_metadata_onlymanual_review_needed