Safe Web Fetch for Token Optimization for Openclaw

A secure web content retrieval tool that optimizes token usage by 50-80% through intelligent Markdown cleaning and multi-layer security.

bg1avd
v1.0.0
Mar 5, 2026
0
897
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install safe-web-fetch-for-save-token

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install safe-web-fetch-for-save-token using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Safe Web Fetch for Token Optimization?

Safe Web Fetch is a high-performance tool designed for AI agents to interact with web content securely and efficiently. By leveraging Jina Reader, it extracts clean Markdown from websites, stripping away advertisements, headers, and footers that often bloat token usage. This integration is a vital part of the Openclaw Skills ecosystem, enabling developers to build more cost-effective AI workflows.

Beyond efficiency, this skill focuses heavily on enterprise-grade security. It provides built-in protection against SSRF (Server-Side Request Forgery) by blocking private IP ranges and localhosts. It also includes an automated scanner that identifies sensitive information like API keys or private keys within the fetched content, ensuring that private data is never inadvertently processed by an external LLM.

Safe Web Fetch for Token Optimization Use Cases

  • Summarizing web articles with minimal token consumption.
  • Performing secure research tasks while preventing SSRF attacks.
  • Standardizing web data into clean Markdown for RAG pipelines.
  • Filtering out noise from complex websites to improve model reasoning accuracy.

How Safe Web Fetch for Token Optimization Works

  1. The user or agent provides a URL to the safe_fetch.py script.
  2. The script validates the URL against security rules, including SSL checks and domain whitelists.
  3. It requests a cleaned version of the site through Jina Reader or falls back to direct retrieval.
  4. The content is scanned for sensitive data patterns (e.g., API keys, Bearer tokens) to ensure security compliance.
  5. The final, optimized Markdown is returned to the agent in a structured JSON format.

Safe Web Fetch for Token Optimization Setup

Ensure you have python3 installed on your environment. To install and configure the skill within your Openclaw Skills directory, use the following steps:

# Navigate to your skills directory
cd ~/.openclaw/skills/safe-web-fetch

# Test a fetch to verify setup
python3 scripts/safe_fetch.py "https://example.com"

# Review the default configuration
python3 scripts/safe_fetch.py --show-config

Safe Web Fetch for Token Optimization Data Schema & Taxonomy

The skill produces a structured output that makes it easy for agents to parse the result. This is a core feature for those using Openclaw Skills.

Property Type Description
success boolean Indicates if the operation was safe and successful.
content string The cleaned Markdown content ready for the LLM.
original_url string The source URL that was fetched.
source string Indicates whether Jina or a direct fetch was used.
error string/null Contains error details if a security check failed.

Safe Web Fetch for Token Optimization Advanced Features

  • Token Optimization: Dramatically reduces the context window usage for any URL-based task.
  • Sensitive Data Detection: Regex-based scanning for API keys, AWS credentials, and private keys before returning data.
  • SSRF Prevention: Blocks access to internal networks, loopback addresses, and non-HTTP protocols like file:// or ftp://.
  • Configurable Allow-list: Custom config.json to restrict fetching to specific trusted domains or block known ad servers.
  • Forced SSL Verification: Ensures connections to authentic servers and prevents Man-in-the-Middle attacks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*