
Web Reader
Fetch and normalize live web pages inside an agent workflow so you can cite titles, URLs, and HTML without hand-copying tabs.
Overview
Web Reader is an agent skill for the Idea phase that fetches a URL via the ZAI SDK and returns title, URL, HTML, and token usage for agent-side research.
Install
npx skills add https://github.com/answerzhao/agent-skills --skill web-readerWhat is this skill?
- ZAI web-dev SDK integration that returns HTML, title, URL, and optional publishedTime in one call
- Typed PageReaderFunctionResult with status codes and per-request token usage metadata
- Designed for agent runtimes that already use z-ai-web-dev-sdk instead of one-off curl or browser automation
- MIT-licensed skill package you can wire into research or validation automations
- Returns html, title, url, and token usage fields per PageReader call
Adoption & trust: 1.7k installs on skills.sh; 26 GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need live web page content in your agent session but copying tabs or writing one-off fetch code wastes time and breaks reproducibility.
Who is it for?
Solo builders automating competitor and market page pulls inside ZAI-backed agent projects.
Skip if: Teams that need interactive login flows, heavy JavaScript SPAs without a reader API, or workflows that forbid outbound network calls from the agent.
When should I use this skill?
When the agent must read a public URL and return normalized page content via ZAI.create() page reader APIs.
What do I get? / Deliverables
Your agent holds structured page HTML and metadata with usage stats so you can summarize, compare, or archive sources in the same workflow.
- Structured page read result (HTML, title, URL, optional publishedTime)
- Token usage metadata for the fetch
Recommended Skills
Journey fit
Canonical shelf is Idea → research because the skill’s primary job is pulling external page content for discovery and competitive digging before you commit to build. Research is where solo builders need structured page reads (title, URL, HTML, token usage) rather than brittle scraping scripts.
How it compares
Use as a focused SDK page-read integration, not a replacement for full browser or MCP web-search stacks.
Common Questions / FAQ
Who is web-reader for?
Indie and solo developers using z-ai-web-dev-sdk who want their coding agent to ingest public URLs as structured data during research.
When should I use web-reader?
Use it in Idea research when validating competitors or docs, during Validate when checking landing copy on live sites, or anytime you need HTML plus title/URL in the agent without manual paste.
Is web-reader safe to install?
It performs outbound reads of URLs you supply; review the Security Audits panel on this page and restrict which hosts your agent may request before enabling in production repos.
SKILL.md
READMESKILL.md - Web Reader
MIT License Copyright (c) 2025 z-ai-web-dev-sdk Skills Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import ZAI from 'z-ai-web-dev-sdk'; interface PageReaderFunctionResult { code: number; data: { html: string; publishedTime?: string; title: string; url: string; usage: { tokens: number; }; }; meta: { usage: { tokens: number; }; }; status: number; } async function main(url: string) { try { const zai = await ZAI.create(); const results: PageReaderFunctionResult = await zai.functions.invoke('page_reader', { url: url }); console.log('Web reader invocation succeeded. Results:'); console.log(JSON.stringify(results, null, 2)); } catch (err: any) { console.error('page_reader failed:', err?.message || err); } } main('https://www.google.com'); --- name: web-reader description: Implement web page content extraction capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to scrape web pages, extract article content, retrieve page metadata, or build applications that process web content. Supports automatic content extraction with title, HTML, and publication time retrieval. license: MIT --- # Web Reader Skill This skill guides the implementation of web page reading and content extraction functionality using the z-ai-web-dev-sdk package, enabling applications to fetch and process web page content programmatically. ## Skills Path **Skill Location**: `{project_path}/skills/web-reader` This skill is located at the above path in your project. **Reference Scripts**: Example test scripts are available in the `{Skill Location}/scripts/` directory for quick testing and reference. See `{Skill Location}/scripts/web-reader.ts` for a working example. ## Overview Web Reader allows you to build applications that can extract content from web pages, retrieve article metadata, and process HTML content. The API automatically handles content extraction, providing clean, structured data from any web URL. **IMPORTANT**: z-ai-web-dev-sdk MUST be used in backend code only. Never use it in client-side code. ## Prerequisites The z-ai-web-dev-sdk package is already installed. Import it as shown in the examples below. ## CLI Usage (For Simple Tasks) For simple web page content extraction, you can use the z-ai CLI instead of writing code. This is ideal for quick content scraping, testing URLs, or simple automation tasks. ### Basic Page Reading ```bash # Extract content from a web page z-ai function --name "page_reader" --args '{"url": "https://example.com"}' # Using short options z-ai function -n page_reader -a '{"url": "https://www.example.com/article"}' ``` ### Save Page Content ```bash # Save extracted content to JSON file z-ai function \ -n page_reader \ -a '{"url": "https://news.example.com/article"}' \ -o page_content.json # Extract and save blog post z-ai function \ -n page_reader \ -a '{"url": "https://blog.example.com/post/123"}' \ -o blog_post.json `