consult-zai

Orchestrates parallel code analysis between z.ai GLM 5.2 and Claude code-searcher with comparison reports.

2.6k|246|Updated Jul 8, 2025
One-click install
npx skills add https://github.com/centminmod/my-claude-code-setup --skill consult-zai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: consult-zai
Source: https://github.com/centminmod/my-claude-code-setup/tree/main/.claude/skills/consult-zai
Command: npx skills add https://github.com/centminmod/my-claude-code-setup --skill consult-zai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq.

What problem does it solve?

Getting a second opinion on complex code questions normally means manually querying multiple AI models and reconciling their answers yourself. This Skill automates dual-AI consultation by dispatching the same enhanced prompt to z.ai's GLM 5.2 and Claude's code-searcher in parallel, then synthesizing their responses into a structured comparison.

Core Features & Use Cases

  • Parallel Dual-AI Dispatch: Sends an enhanced prompt with citation requirements to both z.ai GLM 5.2 (via the zai CLI) and the code-searcher subagent simultaneously, with timeout watchdogs and read-only tool enforcement.
  • Structured Comparison Report: Produces raw responses from both agents, a mandatory comparison table, agreement-level assessment, and findings bucketed by corroboration (corroborated, solo, disputed).
  • Defect-Hunt Severity Mode: For bug hunts and code reviews, appends severity tagging (Critical/Warning/Info) and a no-manufacture rule so agents report "found nothing" honestly instead of inventing issues.
  • Use Case: When debugging a difficult issue or reviewing architecture, ask a code question and receive two independent analyses with file:line citations, plus a synthesized recommendation on which source was more helpful.

Quick Start

Ask a code question like "consult z.ai on how the authentication flow works in this codebase" to get a dual-AI comparison report.

Frequently Asked Questions about consult-zai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a second AI opinion on a code question?

Ask your code question and invoke this Skill to dispatch it to both z.ai GLM 5.2 and Claude's code-searcher in parallel. You receive both raw responses plus a comparison table, agreement level, and a synthesized recommendation.

What is the difference between z.ai GLM 5.2 and Claude code-searcher analysis?

Both agents receive the same enhanced prompt requiring file:line citations and structured findings. The Skill compares their file paths, line numbers, code snippets, and unique findings, then buckets each finding as corroborated, solo, or disputed.

What dependencies are required to run dual-AI code consultation?

You need jq installed for parsing z.ai JSON output (a hard dependency) and a zai shell function configured in your zshrc or bashrc pointing at the z.ai endpoint. GNU timeout via coreutils is recommended to bound hung dispatches.

What happens if z.ai fails or times out during a consultation?

The Skill still presents the successful agent's response and labels the report a degraded single-AI run with no cross-comparison. On z.ai failure it quotes the stderr log tail for diagnostics before cleaning up temp files.

Can the consultation agents modify my code during analysis?

No. The z.ai dispatch enforces read-only access with allowedTools restricted to Read, Grep, and Glob, plus an explicit disallowedTools list blocking Bash, Edit, and Write. The orchestrator is also instructed not to mutate the reviewed tree while agents run.

When should I not use dual-AI code consultation?

Skip it for simple syntax questions, basic file lookups, or straightforward documentation queries where a single AI suffices. The Skill itself notes a direct read or lighter path is cheaper for low-complexity questions.