Agent skill

Z.AI CLI

by numman-ali in numman-ali/zai-cli

Command-line access to Z.AI vision analysis, web search, page reading and GitHub repo exploration through npx zai-cli, using an API key.

MITAuto-check passedProductivity & Automation

Install Z.AI CLI

skills CLI
$ npx skills add numman-ali/zai-cli --skill zai-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install numman-ali/zai-cli zai-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/numman-ali/zai-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/zai-cli .claude/skills/zai-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
zai-cli
GitHub stars
110
Token cost
~528 tokens
SKILL.md length
121 words
Files
2 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Command-line access to Z.AI vision analysis, web search, page reading and GitHub repo exploration through npx zai-cli, using an API key.

  • Analyzing a screenshot, image or video for errors or text
  • SKILL.md covers Setup, Commands, Quick Start and Output, plus 1 more section
  • Calls npx; needs Z_AI_API_KEY
  • Running a real-time web search with domain or recency filters

What it does

The skill documents `npx zai-cli`, an MCP-based command-line interface to Z.AI. Its commands are vision (image, screenshot and video analysis, with 8 subcommands), search (real-time web search with filtering), read (web pages as markdown), repo (GitHub code search and reading), tools, tool and call (list MCP tools, show a schema, make a raw call), code (TypeScript tool chaining) and doctor (check setup and connectivity). The `--help` flag works at every level.

You need a Z_AI_API_KEY environment variable, created on the Z.AI key page. Output is data-only by default to save tokens, and `--output-format json` wraps results in an object with success, data and timestamp. A reference file covers raw MCP calls, Code Mode and tuning of cache and retries.

When your agent uses it

  • Analyzing a screenshot, image or video for errors or text
  • Running a real-time web search with domain or recency filters
  • Converting a web page to markdown
  • Searching and reading code in a GitHub repository

Example prompts

  • “Look at ./screenshot.png and tell me which errors it shows.”
  • “Search the web for recent posts about SQLite WAL mode, limited to the last week.”
  • “Read https://example.com/docs/guide as markdown.”
  • “Use the repo command to read the README of a public GitHub project.”

Requirements

  • npx, to run zai-cli
  • A Z_AI_API_KEY from Z.AI

What it can do on your machine

Read from SKILL.md and the folder at commit 4a13708. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • z.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • Z_AI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Z.AI CLI loads about 528 tokens when it runs, and up to ~866 if it reads all its reference files. Until then it costs about 109 tokens; SKILL.md has 121 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~109
When it runs · the whole SKILL.md, loaded when a task matches
~528
With references · SKILL.md plus every file in references/, read only if the agent opens them
~866

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from numman-ali/zai-cli at commit 4a13708, republished under its MIT licence (© numman-ali). 121 words, ~528 tokens.

Download SKILL.mdSave it as .claude/skills/zai-cli/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
zai-cli
description
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.

ZAI CLI

Access Z.AI capabilities via npx zai-cli. The CLI is self-documenting - use --help at any level.

Setup

bash
export Z_AI_API_KEY="your-api-key"

Get a key at: https://z.ai/manage-apikey/apikey-list

Commands

CommandPurposeHelp
visionAnalyze images, screenshots, videos--help for 8 subcommands
searchReal-time web search--help for filtering options
readFetch web pages as markdown--help for format options
repoGitHub code search and reading--help for tree/search/read
toolsList available MCP tools
toolShow tool schema
callRaw MCP tool invocation
codeTypeScript tool chaining
doctorCheck setup and connectivity

Quick Start

bash
# 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.

© numman-ali, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/zai-cli of numman-ali/zai-cli.

  • SKILL.md
  • references/advanced.md

Open the folder on GitHubat commit 4a13708

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in numman-ali/zai-cli, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Z.AI CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Z.AI CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Z.AI CLI this skillnumman-ali/zai-cli110—~528Automated safety check: PassMIT
Agent Searchlennney/agent-search-mcp110—~1.9kAutomated safety check: PassApache-2.0
Skillredf0x1/camofox-mcp117—~3.1kAutomated safety check: PassMIT
Project Pull Requestswimmwatch/cloakbrowser-mcp161—~1kAutomated safety check: PassMIT
Web Searchathola/claude-night-market342—~829Automated safety check: PassMIT
Project Releaseswimmwatch/cloakbrowser-mcp161—~1.9kAutomated safety check: PassMIT

Similar skills

  • Agent Search

    lennney/agent-search-mcp

    Use Agent Search MCP for free-first English and Chinese web search with compact evidence and minimal tool calls.

    110 GitHub stars~1.9k tokensUpdated 16 days ago
    Productivity & AutomationAuto-check passed
  • Skill

    redf0x1/camofox-mcp

    Anti-detection browser automation MCP skill for OpenClaw agents with 47 tools for navigation, interaction, observation, extraction, downloads, profiles, sessions, and stealth web search.

    117 GitHub stars~3.1k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Project Pull Request

    swimmwatch/cloakbrowser-mcp

    Create, update, prepare, or review a cloakbrowser-mcp GitHub Pull Request only when the user explicitly requests PR work.

    161 GitHub stars~1k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Web Search

    athola/claude-night-market

    Searches the open web for docs, comparisons, and news via You.com MCP or WebSearch.

    342 GitHub stars~829 tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Project Release

    swimmwatch/cloakbrowser-mcp

    Prepare, publish, verify, or recover a cloakbrowser-mcp release only when the user explicitly requests release work.

    161 GitHub stars~1.9k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check passed
  • GitHub Commenting

    juspay/neurolink

    How to post clean, rich, deduplicated GitHub PR review comments — suggestion blocks, multi-line anchors, markers, formatting rules.

    143 GitHub stars~698 tokensUpdated today
    DevelopmentAuto-check passed

Questions about Z.AI CLI

What does Z.AI CLI do?

Command-line access to Z.AI vision analysis, web search, page reading and GitHub repo exploration through npx zai-cli, using an API key. AI. Its commands are vision (image, screenshot and video analysis, with 8 subcommands), search (real-time web search with filtering), read (web pages as markdown), repo (GitHub code search and reading), tools, tool and call (list MCP tools, show a schema, make a raw call), code (TypeScript tool chaining) and doctor (check setup and connectivity).

When should I use Z.AI CLI?

Z.AI CLI fits situations like: analyzing a screenshot, image or video for errors or text; running a real-time web search with domain or recency filters; converting a web page to markdown; searching and reading code in a GitHub repository.

How do I install Z.AI CLI in Claude Code?

Run `npx skills add numman-ali/zai-cli --skill zai-cli -a claude-code`. Or copy the skill folder (skills/zai-cli in numman-ali/zai-cli) into .claude/skills/zai-cli in your project. Claude Code loads it when a task matches its description.

How do I install Z.AI CLI in Codex?

Run `npx skills add numman-ali/zai-cli --skill zai-cli -a codex`. Or copy the skill folder (skills/zai-cli in numman-ali/zai-cli) into .agents/skills/zai-cli in your project. Codex loads it when a task matches its description.

Can I use Z.AI CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add numman-ali/zai-cli --skill zai-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/zai-cli, .gemini/skills/zai-cli, .github/skills/zai-cli and .opencode/skills/zai-cli in your project.

What does Z.AI CLI need to run?

Going by SKILL.md and its folder, Z.AI CLI needs the command-line tools its instructions call (npx) and credentials named Z_AI_API_KEY. Our summary lists: npx, to run zai-cli; A Z_AI_API_KEY from Z.AI.

Does Z.AI CLI access the network?

SKILL.md names 1 domain. As links in the text: z.ai. This is read from the text; nothing was executed.

Is Z.AI CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Z.AI CLI use?

Z.AI CLI is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Z.AI CLI use?

About 528 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 338 tokens, read only when the agent opens those files.

What are the alternatives to Z.AI CLI?

Skills that share tags, products or a category with Z.AI CLI: Agent Search (lennney/agent-search-mcp, 110 stars), Skill (redf0x1/camofox-mcp, 117 stars), Project Pull Request (swimmwatch/cloakbrowser-mcp, 161 stars) and Web Search (athola/claude-night-market, 342 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Z.AI CLI?

numman-ali (a GitHub user) maintains it in numman-ali/zai-cli, which has 110 GitHub stars. The repository was last updated on January 2, 2026.

Source: numman-ali/zai-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.