npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-glm-agent

v1.0.7

Published

GLM AI subagent plugin for Claude Code - Opus orchestration with multiple GLM workers

Downloads

56

Readme

Claude GLM Agent

GLM AI subagent plugin for Claude Code - Opus orchestration with multiple GLM workers.

This plugin enables hybrid AI workflows by allowing Claude (Opus) to delegate tasks to GLM models via the Z.AI API. Use a single GLM call for quick questions, or orchestrate multiple GLM agents in parallel for complex analysis.

Features

  • /glm - Ask GLM a single question, get a different perspective from Opus
  • /task-with-glm - Opus orchestrates multiple GLM workers in parallel for complex tasks
  • Two GLM models: glm-4.7 (best quality) and glm-4.5-air (fast response)
  • Automatic command registration - Commands available immediately after installation

Quick Start

# 1. Install CLI
npm install -g claude-glm-agent

# 2. Install plugin to Claude Code
claude-glm-agent install

# 3. Set API key
export GLM_API_KEY="your-api-key"

# To persist across sessions, add to your shell profile:
echo 'export GLM_API_KEY="your-api-key"' >> ~/.zshrc && source ~/.zshrc

# 4. Restart Claude Code and use!
/glm What is the best practice for error handling?

Alternative Installation Methods

curl -fsSL https://raw.githubusercontent.com/sungmanch/claude-glm-agent/main/scripts/install.sh | bash
export GLM_API_KEY="your-api-key"
git clone https://github.com/sungmanch/claude-glm-agent.git
cd claude-glm-agent
npm install && npm run build && npm link
claude-glm-agent install
export GLM_API_KEY="your-api-key"

Usage

Single GLM Query (/glm)

Use when you need a different perspective or want to cross-check Opus's response:

/glm What are the security implications of this code?
/glm Summarize the key points of this discussion

Scenario-Based GLM Orchestration (/task-with-glm)

The /task-with-glm command automatically detects your task type and applies optimized worker strategies:

Automatic Scenario Detection

| Scenario | Triggers | Workers | |----------|----------|---------| | Bug Fixing | error, bug, fix, crash, broken | Analyzer → Implementers + Validator | | Code Review | review, PR, evaluate, quality | Quality + Security + Performance + Test Analyzers | | New Feature | add, implement, create, build | Architect → Implementers → Validator | | Refactoring | refactor, clean up, restructure | Minimal + Ideal + Migration Architects | | Exploration | understand, how does, architecture | Scout + Architecture + DataFlow Analyzers | | Performance | slow, optimize, memory, bottleneck | Time + Memory + I/O + Caching Analyzers | | Testing | test, coverage, edge case, TDD | Unit + Edge Case + Integration workers | | Documentation | document, README, API docs | Analyzer → API Documenter → Usage Documenter | | Planning/Debate | plan, decide, compare, trade-off, which approach | Sonnet + GLM Multi-Model Debate |

Example Usage

Bug Fixing:

/task-with-glm fix this error: TypeError: Cannot read property 'map' of undefined

Code Review:

/task-with-glm review this PR for security and performance issues

New Feature:

/task-with-glm implement user authentication with JWT tokens

Refactoring:

/task-with-glm refactor this function to be more maintainable

Exploration:

/task-with-glm explain how the authentication system works in this codebase

Performance:

/task-with-glm optimize this slow database query

Testing:

/task-with-glm generate comprehensive tests for the payment module

Documentation:

/task-with-glm document the API endpoints in this controller

Planning/Debate (Multi-Model):

/task-with-glm should we use REST or GraphQL for the new API?
/task-with-glm compare Redux vs Zustand for state management in this project

GLM Worker Roles

| Role | Purpose | Model | |------|---------|-------| | GLM-Scout | Fast file/pattern discovery | glm-4.5-air | | GLM-Analyzer | Deep code analysis | glm-4.7 | | GLM-Architect | Design and architecture | glm-4.7 | | GLM-Implementer | Implementation proposals | glm-4.7 | | GLM-Validator | Edge cases, risk assessment | glm-4.5-air | | GLM-Documenter | Documentation generation | glm-4.5-air | | Sonnet-Debater | Advocate perspective A in debates | claude-sonnet | | GLM-Debater | Advocate perspective B in debates | glm-4.7 |

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Opus (Orchestrator)                       │
│  ┌─────────────┬─────────────┬─────────────┬─────────────┐ │
│  │ GLM Agent 1 │ GLM Agent 2 │ GLM Agent 3 │ GLM Agent N │ │
│  │  (Task A)   │  (Task B)   │  (Task C)   │   (...)     │ │
│  └─────────────┴─────────────┴─────────────┴─────────────┘ │
└─────────────────────────────────────────────────────────────┘

With /task-with-glm, Opus:

  1. Detects scenario from keywords (bug, review, feature, refactor, etc.)
  2. Assigns specialized roles (Scout, Analyzer, Architect, Implementer, Validator, Documenter)
  3. Executes workers in parallel or sequential phases based on scenario
  4. Synthesizes results with scenario-specific templates
  5. Validates consistency, confidence levels, and follow-up needs

Available Models

| Model | Use Case | |-------|----------| | glm-4.7 | Complex analysis, code review, detailed responses (default) | | glm-4.5-air | Quick questions, summaries, simple tasks |

CLI Commands

# Install (or reinstall) the plugin
claude-glm-agent install

# Force reinstall (overwrite existing files)
claude-glm-agent install --force

# Uninstall
claude-glm-agent uninstall

# Show help
claude-glm-agent --help

# Show version
claude-glm-agent --version

File Locations

After installation, files are placed in:

~/.claude/
├── agents/
│   ├── glm-worker.md           # GLM worker agent definition
│   ├── debate-sonnet.md        # Sonnet debater for multi-model debates
│   └── debate-glm.md           # GLM debater for multi-model debates
├── commands/
│   ├── glm.md                  # /glm command
│   └── task-with-glm.md        # /task-with-glm command
└── plugins/local/claude-glm-agent/
    ├── scripts/
    │   ├── glm_call.py         # GLM API caller (Python)
    │   ├── glm_call.mjs        # GLM API caller (Node.js)
    │   └── glm_call.sh         # GLM API caller (Shell wrapper)
    └── metadata.json           # Installation metadata

Troubleshooting

"GLM_API_KEY environment variable is not set"

Ensure you've set the API key:

export GLM_API_KEY="your-api-key"

Commands not appearing in Claude Code

  1. Restart Claude Code after installation
  2. Check that files exist: ls -la ~/.claude/commands/
  3. Try reinstalling with --force: claude-glm-agent install --force

API timeout errors

The default timeout is 180 seconds. For very long requests, consider breaking them into smaller subtasks.

Acknowledgments

This project was inspired by and references the following projects:

  • oh-my-claudecode by Yeachan Heo - Multi-agent orchestration for Claude Code with 28 agents and delegation-first architecture
  • oh-my-opencode by Yeongyu Kim - The original Sisyphus agent harness for OpenCode with multi-model orchestration
  • llm-council by Andrej Karpathy - Multi-LLM deliberation system where models review and synthesize each other's work

License

MIT

Author

Sungman Cho