zai-cli
A CLI interface providing vision, web search, content scraping, and GitHub exploration capabilities.
Install
mkdir -p .claude/skills/zai-cli && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1255" && unzip -o skill.zip -d .claude/skills/zai-cli && rm skill.zipInstalls to .claude/skills/zai-cli
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Z.AI CLI providing:
- Vision: image/video analysis, OCR, UI-to-code, error diagnosis (GLM-4.6V)
- Search: real-time web search with domain/recency filtering
- Reader: web page to markdown extraction
- Repo: GitHub code search and reading via ZRead
- Tools: MCP tool discovery and raw calls
- Code: TypeScript tool chaining
Use for visual content analysis, web search, page reading, or GitHub exploration. Requires Z_AI_API_KEY.Key capabilities
- →Analyze images, screenshots, and videos for errors
- →Perform real-time web searches with domain and recency filtering
- →Extract web page content into markdown format
- →Search and read GitHub repository code
- →Discover and invoke raw MCP tools
- →Chain TypeScript tools for automated workflows
How it works
The CLI provides command-line access to Z.AI services, using subcommands to route requests to specific analysis, search, or repository tools. It supports raw MCP tool calls and TypeScript chaining for advanced operations.
Inputs & outputs
When to use zai-cli
- →Analyze screenshots for errors
- →Perform real-time web search
- →Scrape webpage content to markdown
- →Search GitHub repositories
About this skill
ZAI CLI
Access Z.AI capabilities via npx zai-cli. The CLI is self-documenting - use --help at any level.
Setup
export Z_AI_API_KEY="your-api-key"
Get a key at: https://z.ai/manage-apikey/apikey-list
Commands
| Command | Purpose | Help |
|---|---|---|
| vision | Analyze images, screenshots, videos | --help for 8 subcommands |
| search | Real-time web search | --help for filtering options |
| read | Fetch web pages as markdown | --help for format options |
| repo | GitHub code search and reading | --help for tree/search/read |
| tools | List available MCP tools | |
| tool | Show tool schema | |
| call | Raw MCP tool invocation | |
| code | TypeScript tool chaining | |
| doctor | Check setup and connectivity |
Quick Start
# Analyze an image
npx zai-cli vision analyze ./screenshot.png "What errors do you see?"
# Search the web
npx zai-cli search "React 19 new features" --count 5
# Read a web page
npx zai-cli read https://docs.example.com/api
npx zai-cli read https://docs.example.com/api --with-images-summary --no-gfm
# Explore a GitHub repo
npx zai-cli repo search facebook/react "server components"
npx zai-cli repo search openai/codex "config" --language en
npx zai-cli repo tree openai/codex --path codex-rs --depth 2
# Check setup
npx zai-cli doctor
Output
Default: data-only (raw output for token efficiency).
Use --output-format json for { success, data, timestamp } wrapping.
Advanced
For raw MCP tool calls (tools, tool, call), Code Mode, and performance tuning (cache/retries),
see references/advanced.md.
When not to use it
- →When an active Z_AI_API_KEY is unavailable
Prerequisites
Limitations
- →Requires an external API key for all operations
- →Default output is data-only, requiring specific flags for JSON wrapping
How it compares
Unlike manual browser-based research or manual API integration, this tool provides a self-documenting command-line interface for direct interaction with AI-powered analysis and retrieval services.
Compared to similar skills
zai-cli side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| zai-cli (this skill) | 5 | 6mo | Review | Beginner |
| exa-search | 9 | 8mo | Review | Beginner |
| ddgs | 0 | 3mo | Review | Beginner |
| deep-research | 0 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by numman-ali
View all by numman-ali →You might also like
exa-search
benjaminjackson
Search the web for content matching a query with AI-powered semantic search. Use for finding relevant web pages, research papers, news articles, code repositories, or any web content by meaning rather than just keywords.
ddgs
itsmeadarsh2008
Use when an agent needs to search the web, find images/news/videos/books, or extract content from a URL. Covers the ddgs Python library, CLI, and MCP server integration.
deep-research
inuishan
Multi-source deep research using firecrawl and exa MCPs. Searches the web, synthesizes findings, and delivers cited reports with source attribution. Use when the user wants thorough research on any topic with evidence and citations.
perplexity
davila7
Web search and research using Perplexity AI. Use when user says "search", "find", "look up", "ask", "research", or "what's the latest" for generic queries. NOT for library/framework docs (use Context7) or workspace questions.
perplexity-search
davila7
Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model's knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.
websearch-quick
thomasholknielsen
Fast, targeted single-pass search strategy for simple factual lookups. 1-iteration workflow with authoritative source verification and minimal citations. Use for version lookups, documentation finding, simple definitions, existence checks. Keywords: what version, find docs, link to, what is, does X support.