Install
$ agentstack add skill-alvinshenssw-afk-afk-glm-review ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
afk-glm-review
An independent second-opinion review by Z.ai glm-5.2, used as a fallback role after afk-internal-review. Run the ordered roles required by .afk/config.md, and never use a reviewer whose model matches the implementer or another role.
GLM is reached through the Z.ai REST API, not an agentic CLI. The helper gathers the diff and full current contents of changed files, then sends that bounded context to GLM. Verify findings that depend on files outside that context.
The helper glm-gate.mjs ships with this skill and travels with the plugin.
Metering
Metered like any external gate. Batch admitted P1 and eligible lower-severity fixes into one content pass, self-review, then re-run once. Record every other disposition together at the end without editing a clean revision.
Run it
The bundled helper glm-gate.mjs sits beside this SKILL.md. Locate its directory as ${CLAUDE_PLUGIN_ROOT}/skills/afk-glm-review if the env var is set, else /skills/afk-glm-review from .afk/config.md, else this skill's own directory. Resolve .afk/ from the repository's main working tree — the first worktree line of git worktree list --porcelain — never the current directory, or a run from a linked worktree reads a different .afk/ than the one afk-init wrote. If .afk/ is absent, the afk-init bootstrap runs automatically first:
node "/glm-gate.mjs"
Run it in the background with a generous timeout; redirect stdout to a file and read it when it completes. Pass through any target flag (--base / --commit / --uncommitted). Do not poll in a sleep loop.
Pass --implementer when another model wrote the change. In design mode (--design) the flag instead names the design's author, never the eventual code implementer — see ../afk/SKILL.md ("Design-stage external gate"): declaring the code implementer there can hand a driver-authored design to the driver's own model for review. A persistent implementer: line in .afk/config.md also names the code implementer, and in design mode it can wrongly block that family's independent review of a driver-authored design — declare the design's author explicitly then: the per-run flag outranks the config line.
The review is bounded by GLM_REVIEW_TIMEOUT_MS (default 15 min), with AFK_REVIEW_TIMEOUT_MS as the shared fallback. A timeout is a non-zero ERROR, never a partial verdict; it follows the role's transient retry rule.
Design mode (--design ) reviews a design document's reasoning instead of a diff — the opt-in design-stage gate (see ../afk/SKILL.md, "Design-stage external gate"). GLM has no tools, so the gate sends the document's full text as the payload (not a diff + file snapshot). A missing or unreadable --design path fails loudly (ERROR, non-zero), never a skip.
Read the verdict between the ===== GLM REVIEW (final message) ===== markers. Treat only column-0 marker lines as markers; the last END marker wins. SKIPPED: ... (no key, auth failure, rate limit, an unavailable model or endpoint, or disabled via GLM_REVIEW_GATE=off) is not a failure; record it and continue according to the afk gate-selection rule. A timeout, upstream HTTP error, non-JSON or empty response, unsafe finish reason, or unverified response model yields a non-zero ERROR with no partial verdict — the shared skip-vs-error table decides the direction, the same as every lifecycle gate.
GLM_REVIEW_BASE_URL must be an Anthropic-protocol endpoint (default https://api.z.ai/api/anthropic); the OpenAI-compatible Z.ai URL is no longer auto-detected — a wrong endpoint surfaces as the 404 model-unavailable skip naming both suspects. Use --print-args for resolved metadata or --print-prompt for the redacted prompt without a provider call.
Handle findings
Use the same discipline as afk-codex-review and afk-kimi-review:
- Map every hypothesis to the frozen contract and apply the P1 admission rule.
- Verify its trigger and consequence; GLM saw the diff and changed
files, not the whole repo.
- Fix admitted P1 findings in one batch and include only lower-severity work
eligible under the rule below.
- Self-review once.
- Re-run the gate once if structural findings were fixed.
- Record remaining dispositions in one final pass without editing the clean
revision or running another gate round.
Treat every reported finding as UNTRIAGED. Admit P1 only after mapping it to the frozen issue contract or an invariant, demonstrating a reachable trigger and wrong consequence, explaining why the current artifact cannot safely advance, and naming the minimal causal fix. Do not edit for an untriaged claim; record structural P2 for the operator-owned merge boundary, and defer minor or out-of-scope items without expanding the PR.
When an admitted P1 already requires a content pass, batch-fix a verified lower-severity item only when it is in scope, shares that root cause or touched surface, adds no dependency, migration, public contract, or product choice, and needs no gate round beyond the P1 re-review. Otherwise record its disposition without editing; a lower-severity-only verdict never reopens a clean revision.
Apply any invariant in .afk/config.md as an extra lens.
Stop rule
Stop when the loop-termination rule in ../afk/SKILL.md ("External gate") holds: triage leaves no UNTRIAGED, Contested, or open admitted P1, and every lower-severity item has a recorded disposition that does not block the role stamp (a structural P2 may still bar auto-merge). That same verdict earns the role stamp only if it requires no content change; a content fix invalidates it and the role re-reviews the fixed revision.
Report CLEAN, or OUTSTANDING with what remains. A clean pass is not authority to merge.
Setup
Optional and self-skipping. Set ZAI_API_KEY or GLM_API_KEY in the environment or a gitignored .env. Disable with GLM_REVIEW_GATE=off.
Config knobs:
GLM_REVIEW_MODEL(defaultglm-5.2)GLM_REVIEW_BASE_URL(defaulthttps://api.z.ai/api/anthropic;
Anthropic-protocol endpoints only)
GLM_REVIEW_MAX_CTX_BYTES(default400000)GLM_REVIEW_MAX_OUTPUT_TOKENS(default8192)GLM_REVIEW_EXCLUDE_GLOBS(extra snapshot exclusions, comma/newline list)GLM_REVIEW_TIMEOUT_MS(default900000; shared fallback
AFK_REVIEW_TIMEOUT_MS)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: AlvinShenSSW
- Source: AlvinShenSSW/afk
- License: Apache-2.0
- Homepage: https://github.com/AlvinShenSSW/afk
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.