Skip to content

feat(skills): add bundled glm-review skill (cross-model code review via z.ai GLM)#151

Open
vikasiwp wants to merge 1 commit into
vikasprogrammer:mainfrom
vikasiwp:feat/glm-review-skill
Open

feat(skills): add bundled glm-review skill (cross-model code review via z.ai GLM)#151
vikasiwp wants to merge 1 commit into
vikasprogrammer:mainfrom
vikasiwp:feat/glm-review-skill

Conversation

@vikasiwp

Copy link
Copy Markdown
Contributor

Adds a self-contained bundled skill glm-review — a fast, one-shot cross-model code review using z.ai's GLM models via their Anthropic-compatible API. A different model has different blind spots, so it makes a cheap, independent second opinion alongside the host's own review (e.g. /code-review).

What it is

config/skills/glm-review/ = SKILL.md + glm-review.sh. Fully self-contained:

  • Deps: curl + jq (and gh only for --pr). No node/vendor.
  • Secret: reads ZAI_API_KEY from the environment (documented; exits with a clear error if unset). Optional ZAI_ANTHROPIC_URL to point at another Anthropic-compatible base.
  • Reviews the current repo's diff — git diff HEAD (default), --staged, --base <branch> (<branch>...HEAD), or --pr <N>. Caps the diff at 120KB. Prints concrete bugs / security / missed edge-cases / simplifications, most-severe-first with file:line + a one-line fix (or "no blocking issues"); --model overrides (default glm-4.6), --json for raw.

Why bundle it

It's description-triggered ("review with GLM / z.ai / a different model", or before opening/merging a PR) and auto-materialises to agents like any other bundled skill, so a code agent can self-check its diff before a human review. Cross-model agreement raises confidence; disagreement flags a spot worth a closer look.

Safety

No platform behaviour change: the skill only reads a diff and calls an API. Any change an agent makes as a result still passes the gateway. SKILL.md tells the agent to treat the output as a second opinion to verify, not a verdict.

Verification

Live-tested against a planted-bug diff — it caught the SQL injection, the null-dereference, and the off-by-one, each with file:line + a fix. A clean diff returns "no blocking issues". All three GLM models (glm-4.6/4.7/5.2) return 200 on the endpoint.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HiUDC14XfeTQJZHf2wswma

…ia z.ai GLM)

A fast, one-shot cross-model review of the current repo diff (or a GitHub PR) using
z.ai GLM models over their Anthropic-compatible API — an independent second opinion
alongside the host reviewer. Self-contained: SKILL.md + glm-review.sh, needs only
curl/jq + a ZAI_API_KEY env var (gh for --pr). Reviews uncommitted / --staged /
--base <branch> / --pr <N>; prints bugs / security / edge-cases / simplifications
most-severe-first. Description-triggered; auto-materialises to agents like any bundled
skill. No platform behaviour change — reads a diff, calls an API; the gateway still
governs any change made as a result.

Live-verified against a planted-bug diff: caught SQL injection, null-deref, and an
off-by-one with file:line + fixes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HiUDC14XfeTQJZHf2wswma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant