# Send Safe-Web to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "safe-web",
    "name": "Safe-Web",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/AdamNaghs/safe-web",
    "canonicalUrl": "https://clawhub.ai/AdamNaghs/safe-web",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/safe-web",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=safe-web",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/safe-web.py",
      "skill.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "safe-web",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-08T09:21:15.574Z",
      "expiresAt": "2026-05-15T09:21:15.574Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=safe-web",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=safe-web",
        "contentDisposition": "attachment; filename=\"safe-web-1.0.8.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "safe-web"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/safe-web"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/safe-web",
    "downloadUrl": "https://openagent3.xyz/downloads/safe-web",
    "agentUrl": "https://openagent3.xyz/skills/safe-web/agent",
    "manifestUrl": "https://openagent3.xyz/skills/safe-web/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/safe-web/agent.md"
  }
}
```
## Documentation

### safe-web

Secure web fetch and search with PromptGuard scanning.

### Status

✅ Working

### Purpose

Protects against prompt injection attacks hidden in web content before returning it to the AI. Wraps web fetching and searching with security scanning.

### Installation

Requires PromptGuard and Python dependencies:

# Install PromptGuard first
cd /home/linuxbrew/.openclaw/workspace/skills/prompt-guard
pip3 install --break-system-packages -e .

# Install web dependencies (if not present)
pip3 install --break-system-packages requests beautifulsoup4

### Fetch Command

Fetch a URL and scan the content:

# Basic fetch
safe-web fetch https://example.com/article

# Save to file
safe-web fetch https://example.com --output article.txt

# JSON output for automation
safe-web fetch https://example.com --json

# Strict mode (block on MEDIUM)
safe-web fetch https://example.com --strict

### Search Command

Search the web and scan results:

# Basic search
safe-web search "AI safety research"

# More results
safe-web search "stock market news" --count 10

# JSON output
safe-web search "machine learning" --json

### Exit Codes

CodeMeaning0Success - content/results are clean1Error (network, parsing, etc.)2Threat detected - content blocked

### Environment Variables

BRAVE_API_KEY - API key for Brave Search (optional, enables search command)

Get one at: https://brave.com/search/api/

### Symlink (Recommended)

Create a system-wide symlink so safe-web works from any directory:

sudo ln -s /home/linuxbrew/.openclaw/workspace/skills/safe-web/scripts/safe-web.py /usr/local/bin/safe-web

After creating the symlink, you can use safe-web directly without specifying the full path.

### Fetch Flow

Downloads URL content with requests
Extracts text using BeautifulSoup (removes scripts, styles)
Scans extracted text with PromptGuard
Returns clean content or blocks with SHIELD report

### Search Flow

Queries Brave Search API (requires API key)
Scans each result title and description
Filters out suspicious results
Returns only clean results

### Security Model

Fail-closed: If PromptGuard cannot be loaded or scanning fails, the tool reports an error rather than returning unverified content.

Content sanitization: HTML is parsed and scripts/styles are removed before scanning to reduce false positives.

No execution: This tool only fetches and scans. It never executes JavaScript or runs commands found in web content.

### Clean Fetch

Fetching: https://site.com/article
Fetched 1523 characters
Scanning with PromptGuard...

Article content here...

### Blocked Content

Fetching: https://suspicious-site.com
Fetched 2048 characters
Scanning with PromptGuard...
============================================================
🛡️  SAFE-WEB SECURITY ALERT
============================================================
Source: https://suspicious-site.com
Severity: CRITICAL
Action: BLOCK_NOTIFY
Patterns Matched: 8

Detected Patterns:
  - instruction_override_en
  - role_manipulation_en
  - system_impersonation_en
============================================================

Content from https://suspicious-site.com has been blocked.

### Search Results

Searching: AI research
Found 5 results, scanning...

Showing 3 clean results:

1. Latest AI Research Papers
   URL: https://arxiv.org/list/ai/recent
   Recent submissions in artificial intelligence...

2. AI Safety Institute
   URL: https://www.safe.ai/
   Research and development for safe AI systems...

### When to Use

Use safe-web when:

Fetching content from untrusted URLs
Scraping web pages for analysis
Searching and processing web results
Any web content will enter the AI context window

Use standard web_fetch/web_search tools only for:

Trusted, known-safe domains
Internal documentation sites
When you explicitly want to bypass scanning

### Comparison with Native Tools

FeatureNative web_fetchsafe-web fetchFetches HTML✅✅Extracts text✅✅Injection scanning❌✅JSON output✅✅Save to file❌✅Exit codes0/10/1/2 (security)

### Dependencies

Python 3.8+
PromptGuard 3.1.0+ (installed in workspace)
requests
beautifulsoup4
Brave Search API key (for search command)

### Limitations

Search requires Brave API key (free tier available)
Fetch does not execute JavaScript (static HTML only)
Large pages may be truncated during text extraction
Network timeouts default to 30 seconds
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: AdamNaghs
- Version: 1.0.8
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-08T09:21:15.574Z
- Expires at: 2026-05-15T09:21:15.574Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/safe-web)
- [Send to Agent page](https://openagent3.xyz/skills/safe-web/agent)
- [JSON manifest](https://openagent3.xyz/skills/safe-web/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/safe-web/agent.md)
- [Download page](https://openagent3.xyz/downloads/safe-web)