← 返回
未分类 中文

skill-retrieval-gate

Decide whether to run `memory_search` before following another skill or workflow, so the agent can reduce token usage without forcing retrieval on every task...
决定是否在执行其他技能或工作流前运行 `memory_search`,以便智能体减少 token 使用量,同时避免每个任务都强制检索。
otweihan otweihan 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 359
下载
💾 0
安装
1
版本
#latest

概述

Skill Retrieval Gate

Goal

Use this skill to decide whether the current task should query memory_search before following another skill or workflow.

This skill is for retrieval judgment, not mandatory retrieval.

Core rule

Do not make every skill query memory first.

Instead:

  1. Judge whether the task depends on local knowledge or history
  2. Retrieve only when that dependency is real
  3. Load only a few high-signal results
  4. Fall back immediately if retrieval is weak, unavailable, or unnecessary

Example triggers

This skill is especially useful for requests like:

  • continue the previous work on this project
  • check what we already documented before you proceed
  • use project memory first if this depends on earlier decisions
  • decide whether retrieval is worth it before following the skill
  • base this on existing notes instead of asking me again

Workflow

1. Decide whether retrieval is needed

Use decision-flow when the request may depend on:

  • project history
  • prior decisions
  • local knowledge bases
  • user-specific preferences
  • previously organized notes

2. Judge the skill tier

Use skill-tiering to classify the current skill or task into:

  • retrieval-first
  • retrieval-optional
  • retrieval-usually-skip

3. Build the query

Use query-construction to build a compact query from:

  • task object
  • task type
  • key module, symptom, or entity

4. Keep the result set small

Use result-trimming to limit context expansion.

Default rule:

  • fetch top 1-3 results first
  • only expand deeper when clearly needed

5. Fall back fast

Use fallback-rules if retrieval is empty, noisy, low-confidence, unavailable, or unnecessary.

Anti-patterns

Avoid these mistakes:

  • forcing retrieval for every task
  • copying the entire user prompt into memory_search
  • expanding every hit just because it matched
  • dragging weak or stale snippets into later reasoning
  • treating retrieval failure as a blocker instead of falling back

Output expectation

After using this skill, the agent should be able to answer:

  • Should I call memory_search for this task?
  • What query should I use?
  • How many results should I keep?
  • Should I fall back to the original skill flow immediately?

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 17:04 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Knowledge-Base

otweihan
结构化 Markdown 知识库管理协议。在知识库中新增、整理、搜索笔记和项目。匹配:在知识库中记笔记/归档/整理/搜索/创建项目/写日报/写周报/记录外部来源/沉淀概念或问题模型/知识库体检。当用户提到知识库操作、笔记管理、知识库健康检查
★ 0 📥 455

portable-deployment-audit

otweihan
对OpenClaw部署、代码仓库和本地项目目录进行只读安全审计。扫描指定目标目录中的暴露凭据...
★ 0 📥 428

openclaw-siliconflow-memory

otweihan
配置OpenClaw语义记忆使用SiliconFlow嵌入,通过OpenAI兼容API调用BAAI/bge-m3模型。用于启用或修复时。
★ 0 📥 363