一键导入
glm-code-claw
Use GLM Code as a Code Agent for code understanding, project generation, features, bug fixes, refactoring, and various programming tasks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use GLM Code as a Code Agent for code understanding, project generation, features, bug fixes, refactoring, and various programming tasks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Answer any question about GLM Code usage, features, configuration, and troubleshooting by referencing the official user documentation. Also helps users view or modify their settings.json. Invoke with `/qc-helper` followed by a question, e.g. `/qc-helper how do I configure MCP servers?` or `/qc-helper change approval mode to yolo`.
Review changed code for correctness, security, code quality, and performance. Use when the user asks to review code changes, a PR, or specific files. Invoke with `/review`, `/review <pr-number>`, `/review <file-path>`, or `/review <pr-number> --comment` to post inline comments on the PR.
Review local code changes with git diff and update the official docs under docs/ to match. Use when the user asks to document current uncommitted work, sync docs with local changes, update docs after a feature or refactor, or when phrases like "git diff", "local changes", "update docs", or "official docs" appear.
Guide for running end-to-end tests of the GLM Code CLI, including headless mode, MCP server testing, and API traffic inspection. Use this skill whenever you need to verify CLI behavior with real model calls, reproduce user-reported bugs end-to-end, test MCP tool integrations, or inspect raw API request/response payloads. Trigger on mentions of E2E testing, headless testing, MCP tool testing, or reproducing issues.
Automates terminal UI screenshot testing for CLI commands. Applies when reviewing PRs that affect CLI output, testing slash commands (/about, /context, /auth, /export), generating visual documentation, or when 'terminal screenshot', 'CLI test', 'visual test', or 'terminal-capture' is mentioned.
This skill should be used when the user asks to "用 tmux 做真实测试", "保存 tmux 日志", "像真实用户一样测试 GLM", "生成可复查的 TUI 测试报告", "测试 slash command 交互", or requests a tmux-based real user E2E run with complete readable logs. It guides real TUI usage with step-by-step capture-pane snapshots rather than ANSI raw pipe logs.
| name | glm-code-claw |
| description | Use GLM Code as a Code Agent for code understanding, project generation, features, bug fixes, refactoring, and various programming tasks |
Use this skill when you need to:
npm install -g @glm-code/glm-code
For normal session reuse, prefer a global install over npx.
Check if authentication is already configured:
glm auth status
If authentication exists, skip this section. If not authenticated, check if the
BAILIAN_CODING_PLAN_API_KEY environment variable exists:
echo $BAILIAN_CODING_PLAN_API_KEY
If BAILIAN_CODING_PLAN_API_KEY exists, authenticate directly:
glm auth coding-plan --region china --key $BAILIAN_CODING_PLAN_API_KEY
If the environment variable does not exist, interrupt and prompt the user to
authenticate via glm-oauth or coding-plan:
glm auth
Or configure custom API after launching GLM Code via /auth.
You should always use acpx to run GLM Code over the Agent Client Protocol
(ACP) instead of scraping PTY sessions.
To use acpx:
npm install -g acpx@latest
Or without installing:
npx acpx@latest
npx acpx@latest --skill install acpx
Read the acpx skill reference for every command, flag, and workflow pattern: See the ACPX Reference section below for details
For complete CLI reference with all options and examples: https://raw.githubusercontent.com/openclaw/acpx/main/docs/CLI.md
From now on, when you need to delegate work to GLM Code, use acpx instead of
spawning raw terminal sessions. For example:
npx acpx@latest glm "fix the failing tests"
npx acpx@latest glm "refactor the auth module"
npx acpx@latest glm exec "one-shot: summarize this repo"
Tip: You should typically use the
--approve-allflag to prevent task interruptions.
acpx glm 'inspect failing tests and propose a fix plan'
acpx glm 'apply the smallest safe fix and run tests'
acpx glm exec 'summarize repo purpose in 3 lines'
acpx glm -s backend 'fix API pagination bug'
acpx glm -s docs 'draft changelog entry for release'
acpx glm 'run full test suite and investigate failures'
acpx glm --no-wait 'after tests, summarize root causes and next steps'
acpx --format json glm 'review current branch changes' > events.ndjson
acpx --cwd ~/repos/my-project --approve-all glm -s pr-123 \
'review PR #123 for regressions and propose minimal patch'
--approve-all: No interactive prompts--approve-reads (default): Auto-approve reads/searches, prompt for writes--deny-all: Deny all permission requestsIf every permission request is denied/cancelled and none are approved, acpx
exits with permission denied.
--no-wait for long-running tasks to avoid blocking--approve-all for non-interactive batch operations--format json for automation and script integration--cwd to manage context across multiple projects| Command | Description |
|---|---|
/help | Show available commands |
/clear | Clear conversation history |
/compress | Compress history to save tokens |
/stats | Show session info |
/auth | Configure authentication |
/exit | Exit GLM Code |
Full reference: docs/users/features/commands.md.
Config files (highest priority first): CLI args > env vars > system > project
(.glm/settings.json) > user (~/.glm/settings.json) > defaults. Format:
JSONC with env var interpolation.
Key settings:
| Setting | Description |
|---|---|
model.name | Model to use (e.g. glm-max) |
tools.approvalMode | plan / default / auto_edit / yolo |
permissions.allow/ask/deny | Tool permission rules |
mcpServers.* | MCP server configurations |
Full reference: docs/users/configuration/settings.md.
Supports Alibaba Cloud Coding Plan, OpenAI-compatible API keys, and GLM OAuth (free tier discontinued 2026-04-15).
Full reference: docs/users/configuration/auth.md.
Configure custom model providers via modelProviders in settings or environment
variables (OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODEL).
Full reference: docs/users/configuration/model-providers.md.
docs/users/features/approval-mode.md.docs/users/features/mcp.md./skill.
See docs/users/features/skills.md.docs/users/features/sub-agents.md.docs/users/features/sandbox.md.docs/users/features/headless.md.Well-known agent names resolve to commands:
glm → glm --acp# Default (prompt mode, persistent session)
acpx [global options] [prompt text...]
acpx [global options] prompt [options] [prompt text...]
# One-shot execution
acpx [global options] exec [options] [prompt text...]
# Session management
acpx [global options] cancel [-s <name>]
acpx [global options] set-mode <mode> [-s <name>]
acpx [global options] set <key> <value> [-s <name>]
acpx [global options] status [-s <name>]
acpx [global options] sessions [
list | new [--name <name>] | close [name] | show [name] |
history [name] [--limit <count>]
]
acpx [global options] config [show | init]
# With explicit agent
acpx [global options] <agent> [options] [prompt text...]
acpx [global options] <agent> prompt [options] [prompt text...]
acpx [global options] <agent> exec [options] [prompt text...]
Note: If prompt text is omitted and stdin is piped,
acpxreads prompt from stdin.
--agent <command>: raw ACP agent command fallback.--cwd <directory>: session working directory.--approve-all: auto-approve all requests.--approve-reads: auto-approve reads/searches, prompt for writes.--deny-all: deny all requests.--format <format>: output format, one of text, json, or quiet.--timeout <seconds>: maximum wait time.--ttl <seconds>: idle TTL for queue owners.--verbose: verbose ACP/debug logs to stderr.Flags are mutually exclusive where applicable.