Automated summary
Provides advanced commands and performance tuning options for the zai-cli command-line tool, including direct MCP tool invocation, TypeScript tool chain execution, and cache/timeout management.
Strengths
- Enables direct interaction with MCP tools via schemas and raw calls.
- Offers a code mode to run TypeScript scripts and evaluate expressions.
- Provides environment variables to fine-tune caching, retries, and timeouts.
Limitations
- Requires deep knowledge of zai-cli and MCP tools.
- Performance settings are specific to zai-cli and not portable.
- MCP error handling may need manual adjustments.
Best for automating complex workflows with zai-cli, debugging MCP tools, or optimizing performance in production environments.
Avoid when using zai-cli with basic commands or when network performance optimization is unnecessary.
Security analysis
SafeThe skill provides reference documentation for the zai-cli tool, with no destructive or exfiltrating instructions. All commands are standard CLI usage and environment variable settings, posing no execution risk.
No concerns found
How this analysis is madeExamples
Show me all available MCP tools with their full schemas, but skip vision-related ones.Run the TypeScript tool chain from ./chain.ts using zai-cli code mode.Set the MCP tool cache TTL to 5 minutes and enable caching for faster tool discovery.Advanced Usage
This reference covers advanced commands and performance tuning for zai-cli.
Raw MCP Tools
Use these when you need schemas or direct tool invocation.
zai-cli tools [--filter <text>] [--full] [--typescript] [--no-vision]zai-cli tool <name> [--no-vision]zai-cli call <tool> [--json <json> | --file <path> | --stdin] [--dry-run] [--no-vision]
Examples
zai-cli tools --filter vision --full
zai-cli tool zai.zread.search_doc --no-vision
zai-cli call zai.search.webSearchPrime --json '{"search_query":"LLM tools"}'
Code Mode (TypeScript tool chains)
zai-cli code run ./chain.ts
zai-cli code eval "await call('zai.search.webSearchPrime', { search_query: 'zai cli' })"
zai-cli code interfaces
Performance Tuning
Skip vision MCP startup
zai-cli tools --no-vision
zai-cli doctor --no-vision
Tool discovery cache (speeds tools/tool/doctor)
Defaults: enabled, 24 hour TTL.
export ZAI_MCP_TOOL_CACHE=1
export ZAI_MCP_TOOL_CACHE_TTL_MS=300000
export ZAI_MCP_CACHE_DIR="$HOME/.cache/zai-cli"
Retries for transient MCP failures
# Vision-only retries (default 2)
export ZAI_MCP_VISION_RETRY_COUNT=2
# Global retries for all tools
export ZAI_MCP_RETRY_COUNT=1
Timeout
export Z_AI_TIMEOUT=300000 # milliseconds
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/advanced-zai-cli-usage-and-performance-tuning-mm5t8cif/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/advanced-zai-cli-usage-and-performance-tuning-mm5t8cif' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/advanced-zai-cli-usage-and-performance-tuning-mm5t8cif/download' --output '.skill-downloads/advanced-zai-cli-usage-and-performance-tuning-mm5t8cif/SKILL.md.part' && mv '.skill-downloads/advanced-zai-cli-usage-and-performance-tuning-mm5t8cif/SKILL.md.part' '.skill-downloads/advanced-zai-cli-usage-and-performance-tuning-mm5t8cif/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.
Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/advanced-zai-cli-usage-and-performance-tuning-mm5t8cif/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.