ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

glm-coding-agent

Run Claude Code CLI with GLM 4.7 (via Z.AI) with automatic git safety net - checkpoint, experiment branch, review workflow. Cheap 200k context.

Why use this skill?

Use the GLM Coding Agent to run Claude Code with GLM 4.7. Features automatic git checkpoints, experiment branches, and 200k context for secure, affordable AI development.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/cgnl/glm-coding-agent
Or

What This Skill Does

The glm-coding-agent is a specialized interface that bridges the powerful Claude Code CLI with the efficient GLM 4.7 model via Z.AI. It is engineered specifically for developers who require high-context (200k tokens) coding assistance without the premium cost of other frontier models. Beyond simple integration, this skill wraps every interaction in an 'automatic git safety net.' Before any code is executed or modified, the agent automatically creates a git checkpoint, isolates work within an experiment branch, and enforces a mandatory interactive review workflow. This ensures that you can rapidly prototype, refactor, or debug while retaining the ability to perform a one-click rollback if the agent produces unexpected results.

Installation

To get started, ensure you have the Claude Code CLI installed on your system. For macOS/Linux, create the wrapper script at ~/clawd/scripts/glmcode.sh by extracting the API key from your ~/.openclaw/openclaw.json file. Create the configuration directory ~/.claude/ and place the settings-glm.json file containing the glm-4.7 model reference inside. On Windows, the process is streamlined via clawhub install openclaw/skills/skills/cgnl/glm-coding-agent, which pre-configures the necessary PowerShell scripts. Verify that your openclaw.json contains a valid zai provider API key.

Use Cases

  • Refactoring Legacy Code: Use the agent to traverse large, undocumented codebases and apply consistent refactoring across multiple files while safely tracking changes in an experiment branch.
  • Rapid Feature Prototyping: Quickly scaffold new endpoints or UI components using GLM 4.7’s large context window, allowing the agent to reference your entire project architecture.
  • Automated Bug Hunting: Direct the agent to investigate failing tests and implement error handling, relying on the git checkpoint system to revert if the patch is ineffective.

Example Prompts

  1. "Apply a global error handling wrapper to all express routes in the /src/controllers directory."
  2. "Refactor the authentication module to support JWT rotation, creating a new experiment branch named 'feat/auth-rotation'."
  3. "Identify the root cause of the memory leak in the data processing pipeline and propose a fix."

Tips & Limitations

  • Safety First: Always review the git diff suggested during the 'Interactive Review' phase before merging to the main branch.
  • Context Window: While the 200k context is expansive, avoid uploading extremely large non-code assets that might saturate the prompt token limit.
  • Environment Sync: Ensure your environment variables are correctly exported in your shell profiles if you encounter authentication errors when calling the scripts.

Metadata

Author@cgnl
Stars1100
Views1
Updated2026-02-17
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-cgnl-glm-coding-agent": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#coding#git#ai-assistant#automation#workflow
Safety Score: 4/5

Flags: file-write, file-read, external-api, code-execution