I Made a Skill to Replace Claude Code's WebFetch
Claude Code’s WebFetch tool has a bug where the domain:* wildcard doesn’t work, so I built a skill to replace it.
Previous article: Claude Code Permissions: I Have No Idea What I’m Doing
The Problem
I tried allowing WebFetch in Claude Code’s config file (settings.local.json):
{
"permissions": {
"allow": [
"WebFetch(domain:*)"
]
}
}
But even with this setting, every WebFetch usage still prompted for permission.
After looking into it, this turned out to be a known bug:
The Fix
Since Bash(curl:*) works fine, the approach is to fetch pages with curl and process them in a skill.
WebFetch’s internal process is:
- Fetch the page with Axios
- Summarize with Haiku
- Return the result
This skill recreates that flow.
Skill Implementation
Create .claude/skills/web-fetch/SKILL.md:
---
permissionMode: bypassPermissions
tools: Bash
model: claude-haiku-4-5-20251001
---
# WebFetch Alternative Skill (project)
A workaround for the bug where WebFetch's `domain:*` wildcard doesn't work.
Uses a sub-agent + curl to achieve equivalent functionality. Saves context.
## Arguments: $ARGUMENTS
Format: `URL question`
Example: `https://example.com Give me a summary of this page`
---
## Steps
Launch a sub-agent with the Task tool and have it run the following:
subagent_type: general-purpose
model: haiku
prompt: |
Access the following URL with curl and answer the question.
URL: [URL portion of $ARGUMENTS]
Question: [everything after the URL in $ARGUMENTS]
Steps:
1. Fetch the page with: curl -sL "URL" | head -500
2. Extract text content from HTML
3. Answer the question concisely in English
Return only the answer.
Return the sub-agent's response directly to the user.
Key points:
permissionMode: bypassPermissions— Bash permission not requiredmodel: claude-haiku-4-5-20251001— saves cost (full model name required)head -500— saves context
Usage
/web-fetch https://example.com Give me a summary of this page
Notes
curl Permission
This skill uses curl internally, so settings.local.json must include Bash(curl:*):
{
"permissions": {
"allow": [
"Bash(curl:*)"
]
}
}
Model Name
Model name behavior may vary by environment. Sometimes haiku works; sometimes you need the full name like claude-haiku-4-5-20251001. Try the full name if you get an error.
Reference
- Auto-Approve WebFetch and WebSearch in Claude Code with Hooks - An alternative workaround using Hooks