← 返回
安全合规 中文

Save Usage ~4x (Codex oAuth users)

Classifies tasks by safety and complexity to route safe, negligible queries to gpt-5.1-codex-mini and escalates critical or executable tasks to gpt-5.3-codex.
{"answer":"按安全性和复杂度对任务分类,将安全且微不足道的查询路由至 gpt-5.1-codex-mini,将关键或可执行任务升级至 gpt-5.3-codex。"}
jacks3tr
安全合规 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 845
下载
💾 17
安装
1
版本
#latest

概述

Save usage

Run on gpt-5.1-codex-mini only for safe/negligible work. Use gpt-5.3-codex when the task actually needs it. Avoid external API keys unless absolutely necessary.

CRITICAL: Classify First, Then Act

Before generating ANY response, you MUST:

  1. Check: does this task match ANY escalation trigger below?
  2. If YES → call sessions_spawn() IMMEDIATELY. Do NOT attempt to answer yourself.
  3. If NO → respond directly on the current model.

When in doubt, escalate. A wrong escalation costs little. A wrong “mini” answer can waste time or cause damage.

Rule of Thumb

> If anything will be executed, or the outcome matters, escalate.

When to Escalate → MUST call sessions_spawn

If the task matches ANY of the following, do NOT answer yourself.

Instead, IMMEDIATELY call:

sessions_spawn(
	message: "<the full task description>",
	model: "gpt-5.3-codex",
	label: "<short task label>"
)

Escalation triggers (always)

  • Executed output — any tool runs, code changes, patches, shell commands, infra steps
  • Security / auth / secrets — threat modeling, permissions, tokens, keys, access control
  • Architecture & migrations — multi-epic plans, brownfield refactors, infra+product coupling
  • Integration/contract work — schema mapping, ordering, idempotency, retries, consistency
  • Uncertainty remains — ambiguity after 1 pass, contradictions, missing constraints
  • High-impact decisions — hard to reverse, expensive/subtle failure modes, 2+ domains affected
  • Complex reasoning — long dependency chains, multi-step analysis, nontrivial trade-offs
  • Structured deliverables — tables, outlines, reports/proposals, long writing, specs

Reasoning escalation (within gpt-5.3-codex)

  • Default: LOW/MEDIUM
  • Escalate to HIGH/EXTRA HIGH if 2+ are true:
  • decision is hard to reverse
  • affects 2+ domains (infra/data/security/ops/cost)
  • failure modes are subtle/expensive
  • requires long dependency-chain reasoning

NEVER do this on gpt-5.1-codex-mini

  • NEVER output steps that will be executed (tools, code, commands) — escalate
  • NEVER do security/auth/secrets — escalate
  • NEVER do architecture, migrations, brownfield refactors — escalate
  • NEVER do integration contracts or schema choreography — escalate
  • NEVER produce structured deliverables (tables/outlines/reports/specs) — escalate
  • NEVER make high-impact decisions or complex reasoning chains — escalate

If you catch yourself taking responsibility for correctness or safety, STOP and call sessions_spawn instead.

When to Stay on gpt-5.1-codex-mini

Only if safe/negligible and non-executable:

  • Intent routing / triage — classify, choose agent/model/reasoning
  • Summaries & extraction — key points, action items, fields, dedupe
  • Reformatting — convert to markdown/YAML/JSON templates (non-executable)
  • Prompt drafts — write a prompt for a stronger agent/model to run
  • Simple Q&A — definitions, short explanations, short translations, unit conversions
  • Casual chat — greetings, short acknowledgments

Keep mini replies concise.

Save even more: de-escalate

If a conversation was escalated to gpt-5.3-codex but the follow-up is clearly safe/negligible and non-executable, switch back to gpt-5.1-codex-mini.

Return the result directly. Do NOT mention the model switch unless the user asks.

Why the description field is so long

The Clawdbot skill system only injects the frontmatter description field

into the system prompt — the body of SKILL.md is not automatically

included. The model may optionally read the full file, but it is not

guaranteed. Because this is a behavioral skill (changing how the model

routes every message) rather than a tool skill (teaching CLI commands), the

core routing logic must live in the description so the model always sees it.

The body above serves as extended documentation: detailed trigger lists,

reasoning levels, and usage tips that the model can reference if it

reads the file.

TL;DR: description = what the model always sees. body = reference docs.


版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 06:21 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,212 📥 266,268
security-compliance

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,142
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,594