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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cgnl/glm-coding-agentWhat 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
- "Apply a global error handling wrapper to all express routes in the /src/controllers directory."
- "Refactor the authentication module to support JWT rotation, creating a new experiment branch named 'feat/auth-rotation'."
- "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
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cgnl-glm-coding-agent": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, external-api, code-execution
Related Skills
tado
Control your Tado smart thermostat - check temperature, set heating, manage home/away modes, and monitor presence via geolocation.
nano-banana-antigravity
Generate or edit images via Nano Banana Pro using Antigravity OAuth (no API key needed!)
supermarkt-prijzen
Albert Heijn bonuses, product search, multi-store price comparison (12 supermarkets), recipe search by ingredients, and fridge scanner with vision AI.