task-with-glm

task-with-glm is a command for Claude Code from sungmanch/claude-glm-agent. It costs 16 tokens per session (6,082 once invoked), scanned A, original, MIT.

A command that chooses a task scenario—such as debugging, testing, documentation, or performance work—and assigns the task to specialized GLM workers through Opus orchestration.

In plain words
What is it for?
Use it to run scenario-aware work on bugs, new features, refactors, code reviews, tests, documentation, and other supported task types.
Why use it?
It gives the task a fitting workflow before work begins, reducing the chance that a debugging or review task is handled like an unrelated kind of change.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the TodoWrite tool.

Good fit Use it to run scenario-aware work on bugs, new features, refactors, code reviews, tests, documentation, and other supported task types.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sungmanch/claude-glm-agent/task-with-glm
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/sungmanch/claude-glm-agent

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for task-with-glm

README.md
[![agentmods](https://agentmods.dev/badge/commands/sungmanch/claude-glm-agent/task-with-glm.svg)](https://agentmods.dev/commands/sungmanch/claude-glm-agent/task-with-glm)
Your own site
<a href="https://agentmods.dev/commands/sungmanch/claude-glm-agent/task-with-glm"><img src="https://agentmods.dev/badge/commands/sungmanch/claude-glm-agent/task-with-glm.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,082 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.06082
Opus 5 $0.00008 $0.03041
Sonnet 5 $0.00003 $0.01216
Haiku 4.5 $0.00002 $0.00608

Measured 8d ago against content hash 3c726cca9f85, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

task-with-glm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

assets/commands/task-with-glm.md · 887 lines

How it starts

The opening of the file, as written. The whole thing — 887 lines — stays where its author put it; the contents beside it link to each section on GitHub.

[GLM TASK MODE ACTIVATED]

Task: $ARGUMENTS


Phase 0: Scenario Detection

Analyze the task using the keyword matrix below. If multiple scenarios match, select the PRIMARY scenario based on the user's core intent.

Scenario Detection Matrix

Scenario Detection Keywords
Bug/Debugging error, bug, fix, crash, exception, not working, fails, broken, issue, debug, trace, stack, traceback, undefined, null
Code Review review, check, evaluate, quality, feedback, critique, assess, approve, PR, pull request, merge request
New Feature add, implement, create, build, develop, new, feature, functionality, capability, introduce
Refactoring refactor, restructure, improve, clean up, simplify, optimize structure, redesign, rewrite, modernize
Exploration understand, explain, how does, what is, analyze, architecture, overview, trace, flow, structure, codebase
Performance slow, performance, optimize, speed, memory, latency, bottleneck, profile, efficient, cache
Testing test, coverage, edge case, unit test, spec, mock, assertion, TDD, validation, e2e
Documentation document, docs, README, comment, API docs, explain, JSDoc, docstring, describe, annotate
Research research, look up, find information, documentation, library, API, how to use, learn about, context7, web search, latest, current, find docs, framework, package, best practices
Planning/Debate plan, decide, choose, compare, trade-off, pros cons, should we, which approach, strategy, architecture decision, design decision, evaluate options, versus, vs, alternative

Default: If no clear match, use General scenario (original behavior).


Phase 1: Skip Criteria Check

Skip GLM workers and use Opus alone when:

  • Simple file read/write operations
  • Git commands (commit, push, status)
  • Single file edits under 50 lines
  • User requests "quick" or "fast" response
  • Insufficient code context provided
  • Trivial formatting or linting fixes
  • Direct questions with obvious answers

Read the full file on GitHub · 887 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 887 lines · 16 tokens per session scan A 3c726cca9f85

Subscribe to this mod's changes

task-with-glm is a command published in the GitHub repository sungmanch/claude-glm-agent (5 stars, last pushed 5mo ago), licensed MIT. It adds 16 tokens to every session and 6,082 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.