Install
openclaw skills install @terrycarter1985/web-snippet-extractorExtract reusable code snippets, API patterns, and configuration examples from web pages. Use when you find a documentation page, blog post, or tutorial and need to pull out the actionable code blocks, CLI commands, or config snippets without manually scanning the entire page.
openclaw skills install @terrycarter1985/web-snippet-extractorExtract clean, copy-paste-ready code snippets from any web page.
web_fetch tool available (built into OpenClaw)web_fetch(url="<target-url>", extractMode="markdown", maxChars=20000)
Use markdown mode to preserve code block delimitings (lang ... ).
Look for fenced code blocks in the markdown output. Each snippet should include:
Tag each extracted snippet:
| Tag | Meaning |
|---|---|
config | Configuration files (yaml, toml, json, env) |
command | CLI/shell commands |
code | Source code (any language) |
script | Full automation scripts (bash, python, etc.) |
snippet | Short inline patterns or one-liners |
Return snippets as structured blocks:
### Snippet 1: <short description>
- **Language:** <lang>
- **Type:** <config|command|code|script|snippet>
```<lang>
<code content>
### 5. Save to workspace (optional)
If the user wants to persist snippets, write them to a file:
workspace/snippets/.md
## Example
**Input:** A URL to a Docker documentation page about `docker compose`
**Output:**
```markdown
### Snippet 1: Start services in detached mode
- **Language:** bash
- **Type:** command
```bash
docker compose up -d
services:
web:
image: nginx:alpine
ports:
- "80:80"
## Notes
- Always include the source URL in the output header
- If a page has >10 snippets, summarize the top 5 most relevant by default and offer to list more
- Strip out boilerplate (license headers, import noise) when the user asks for "clean" snippets
- Respect the page's content license; mention attribution when requested