← 返回 Skills 市场
raufimusaddiq

GLM Autoroute

作者 Raufi Musaddiq · GitHub ↗ · v1.2.0
cross-platform ✓ 安全检测通过
778
总下载
0
收藏
1
当前安装
5
版本数
在 OpenClaw 中安装
/install glm-autoroute
功能描述
Routes tasks between GLM-4.7-FlashX for simple queries and GLM-5 for coding, analysis, reasoning, and complex tasks, switching automatically as needed.
使用说明 (SKILL.md)

GLM Autoroute

Binary model routing for ZAI GLM models - lightweight vs heavyweight tasks.

Introduction

  1. GLM-4.7 is the default model. Only spawn GLM-5 when the task actually needs it.
  2. Use sessions_spawn to run tasks with GLM-5:
sessions_spawn({
  task: "\x3Cthe full task description>",
  model: "zai/glm-5",
  label: "\x3Cshort task label>"
})
  1. After done with GLM-5, the main session continues with GLM-4.7 as default.

Models

GLM-4.7 (DEFAULT - zai/glm-4.7)

Use for lightweight tasks:

  1. Simple Q&A - What, When, Who, Where
  2. Casual chat - No reasoning needed
  3. Quick lookups
  4. File lookups
  5. Simple tasks - repetitive tasks, formatting
  6. Cron Jobs - if it needs reasoning, THEN ESCALATE TO GLM-5
  7. Status checks
  8. Basic confirmations
  9. Provide concise output, just plain answer, no explaining

DO NOT:

  • ❌ DO NOT CODE WITH GLM-4.7
  • ❌ DO NOT ANALYZE USING GLM-4.7
  • ❌ DO NOT ATTEMPT ANY REASONING USING GLM-4.7
  • ❌ DO NOT RESEARCH USING GLM-4.7
  • If you think the request does not fall into point 1-8, THEN ESCALATE TO GLM-5
  • If you think you will violate the DO NOT list, THEN ESCALATE TO GLM-5

GLM-5 (zai/glm-5)

Use for heavyweight tasks:

  1. Coding (any complexity)
  2. Analysis & debugging
  3. Multi-step reasoning
  4. Research & investigation
  5. Critical planning
  6. Architecture decisions
  7. Complex problem solving
  8. Deep research
  9. Critical decisions
  10. Detailed explanations

Examples

Task Model Why
"Check calendar" GLM-4.7 Simple lookup
"What time is it?" GLM-4.7 Simple Q&A
"Heartbeat check" GLM-4.7 Routine
"Read this file" GLM-4.7 Simple lookup
"Summarize this" GLM-4.7 Basic task
"Write Python script" GLM-5 Coding
"Debug this error" GLM-5 Analysis
"Research market trends" GLM-5 Deep research
"Plan migration" GLM-5 Complex planning
"Analyze this issue" GLM-5 Analysis

Other Notes

  1. When the user asks to use a specific model, use it
  2. Always mention which model is used in outputs — example: "(GLM-5)" or "(GLM-4.7)" at the end of responses
  3. After done with GLM-5 (via sessions_spawn), continue with GLM-4.7 as default
  4. If you think the request does not fall into GLM-4.7 use cases, THEN ESCALATE TO GLM-5
  5. If you think you will violate the DO NOT list, THEN ESCALATE TO GLM-5
  6. Coding = always GLM-5
  7. When in doubt → GLM-5 (better safe than sorry)
  8. Heartbeat checks → always GLM-4.7 unless complex analysis needed

Memory Management with sessions_spawn

When spawning GLM-5 sub-agent sessions for ANY task (coding, research, analysis, planning, etc.), follow this pattern:

Output Rules

1. Code Output (Important)

  • Full code ONLY in files — do NOT include in announce unless explicitly requested
  • Provide summary: what was created, file path, status, dependencies
  • Full code disclosure ONLY when:
    • User explicitly requests: "Show me the code"
    • Debugging needs code review
    • User wants to improve/modify it

2. Full Announce for Other Results

  • Research findings, analysis results, solutions → announce FULLY to user
  • Do NOT shorten, summarize, or condense non-code output
  • User gets complete findings, not a brief summary

3. Two-Layer Memory Strategy

MEMORY.md (Curated Long-Term)

  • ONLY key insights, decisions, lessons, significant findings, preferences
  • Clean, concise, actionable
  • Skip routine data, step-by-step reasoning, temporary thoughts

Detailed Reports (Task-Specific Files)

  • For research: research/YYYY-MM-DD-topic.md (full findings, data, analysis)
  • For coding: add inline docs/README in code folder if needed
  • For analysis: output files in relevant project directories

Examples

Research task:

sessions_spawn({
  task: "Research X. Announce full findings to user. Write full report to research/YYYY-MM-DD-X.md, then write ONLY key insights to MEMORY.md (clean, concise).",
  model: "zai/glm-5",
  label: "Research X"
})

Coding task:

sessions_spawn({
  task: "Write Python script for X. Save full code to file. Provide summary (what created, path, status, dependencies) in announce. Write key implementation decisions to MEMORY.md (important only).",
  model: "zai/glm-5",
  label: "Python script X"
})

Apply this pattern to ALL GLM-5 spawns. Code in files only, summary in announce, full disclosure on request.

安全使用建议
This skill appears to do what it says: route lightweight tasks to GLM-4.7 and escalate to GLM-5 via sessions_spawn for complex work. Before installing, check these points: 1) confirm your environment actually exposes the models named (zai/glm-4.7 and zai/glm-5) and that sessions_spawn behaves as expected; 2) be aware the skill instructs the agent to write persistent files (MEMORY.md, research/*, code files) — ensure you are comfortable with those files being created and stored; 3) the package.json is malformed and version metadata is inconsistent, which is sloppy but not evidence of malice; you may want the publisher to fix that; 4) no credentials, network endpoints, or installers are requested, which reduces risk. If you need higher assurance, ask the publisher for a corrected package.json and explicit confirmation of the model endpoints and exact file paths the skill will write to.
功能分析
Type: OpenClaw Skill Name: glm-autoroute Version: 1.2.0 The skill bundle defines a model routing strategy for an AI agent, instructing it to use different GLM models based on task complexity. The `SKILL.md` provides clear guidelines for output formatting and memory management, including a security-conscious rule to keep full code output in files and only disclose it upon explicit user request. There are no instructions for data exfiltration, unauthorized command execution, persistence, or other malicious activities. The `package.json` lists no external dependencies, reducing supply chain risks. All content aligns with the stated purpose and lacks high-risk behaviors.
能力评估
Purpose & Capability
The name and description claim binary routing between GLM-4.7 and GLM-5; the SKILL.md explicitly instructs using sessions_spawn to run GLM-5 for heavy tasks and to default to GLM-4.7 otherwise. No unrelated binaries, env vars, or external services are requested. Minor packaging inconsistencies exist (package.json has malformed JSON and version mismatch), but these look like sloppy metadata rather than intent to mislead.
Instruction Scope
Instructions stay on-topic: they define when to escalate to GLM-5 and how to use sessions_spawn. They also mandate a memory/write pattern (MEMORY.md, research/YYYY-MM-DD-*.md, saving full code to files and summarizing in announce). This requires the agent to create and write files in the workspace; that's within the skill's described memory-management goals but is an action you should be comfortable with (writes are persistent and could contain sensitive outputs).
Install Mechanism
No install spec and no code files to execute (instruction-only), so nothing is downloaded or installed. This is low-risk from an installation perspective.
Credentials
The skill requests no environment variables, credentials, or config paths. There are no declarations that would permit access to unrelated cloud accounts or tokens; the SKILL.md also doesn't reference secrets or external endpoints. Proportional to its stated role.
Persistence & Privilege
The skill does not set always:true and is user-invocable; normal. However, its instructions explicitly ask the agent to write persistent files (MEMORY.md and dated research files) and to save full code to the workspace. That is a benign but consequential level of persistence — verify you want the agent to create/retain these files in your environment.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install glm-autoroute
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /glm-autoroute 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
Added code output handling rules. Full code now only saved to files by default, with summary in announce (what created, path, status, dependencies). Full code disclosure only when user explicitly requests or debugging needed. This prevents cluttering announces with unnecessary code while keeping full code accessible on request. Applied to all GLM-5 spawns for coding tasks.
v1.1.0
BREAKING: Changed default model from GLM-4.7-FlashX to GLM-4.7 for better balance of speed and capability. Updated all references in documentation including Introduction, DO NOT rules, examples table, and other notes. Added comprehensive memory management guidelines with two-layer strategy (MEMORY.md + detailed reports). Added explicit output rules requiring GLM-5 sub-agents to announce full results to users without shortening. This change affects the default model used for lightweight tasks while maintaining the same binary routing logic with GLM-5 for heavyweight tasks. No functional changes to routing logic, only model alias update and enhanced documentation for memory handling and output behavior.
v1.0.2
Full English version, removed pricing/trading references
v1.0.1
Added escalation rules to Other Notes
v1.0.0
Initial release - binary routing for ZAI GLM models (FlashX default, GLM-5 for heavy tasks)
元数据
Slug glm-autoroute
版本 1.2.0
许可证
累计安装 1
当前安装数 1
历史版本数 5
常见问题

GLM Autoroute 是什么?

Routes tasks between GLM-4.7-FlashX for simple queries and GLM-5 for coding, analysis, reasoning, and complex tasks, switching automatically as needed. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 778 次。

如何安装 GLM Autoroute?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install glm-autoroute」即可一键安装,无需额外配置。

GLM Autoroute 是免费的吗?

是的,GLM Autoroute 完全免费(开源免费),可自由下载、安装和使用。

GLM Autoroute 支持哪些平台?

GLM Autoroute 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 GLM Autoroute?

由 Raufi Musaddiq(@raufimusaddiq)开发并维护,当前版本 v1.2.0。

💬 留言讨论