Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

instruction-anchor-guard指令锚卫

Agent Skill

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

总安装

9,816

周安装

409

GitHub Stars

公开资料未说明

下载量

3,272
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:instruction-anchor-guard(指令锚卫)
来源仓库:https://github.com/dalomeve/instruction-anchor-guard
安装命令:
openclaw skills install instruction-anchor-guard
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install instruction-anchor-guard

简介

用于保留用户的关键指令约束,防止上下文压缩导致规则丢失。

  • 适合长时间对话中的行为边界管理和提示词优化。
  • 可标记“必须”“始终”类约束,提升任务执行的合规性。
  • 安装命令:openclaw skills install instruction-anchor-guard,适用于 OpenClaw。
  • 使用时应区分示例与真实业务规则,避免将假设当作硬性限制。

SKILL.md

name
instruction-anchor-guard
version
1.1.0
description
Preserve user-critical instructions across long sessions and context compaction. Use when users mark constraints as important/must/always/never/highest-priority/rules, and enforce anchor checks before and after compaction to prevent plan drift.
metadata
openclaw
emoji
[ANCHOR]
category
resilience

Instruction Anchor Guard

Prevent loss or drift of user-critical constraints during compaction, session restart, or long multi-turn tasks.

When To Trigger

Trigger when any of these appear:

  • User marks an instruction as important, critical, must, always, never, highest priority, rule, or constraint
  • A task has more than 3 steps and spans multiple turns
  • Compaction happened (or is likely) and the task has non-negotiable requirements
  • Agent behavior shows possible drift from prior explicit user constraints

Anchor Ledger Schema

Store anchors in first available path:

  1. memory/anchors.md
  2. memory/instruction-anchors.md
  3. .anchors.md (workspace root fallback only)

Entry schema (append-only, one section per anchor):

## Anchor: <id>
- **source**: <session-id|message-id|user>
- **instruction**: <canonical instruction text>
- **verbatim**: <short quote from user>
- **priority**: P0 | P1 | P2
- **scope**: global | session | task:<id> | channel:<id>
- **createdAt**: <ISO-8601 timestamp>
- **expiresAt**: <ISO-8601 timestamp or "never">
- **status**: active | paused | expired | superseded
- **signature**: <stable hash of canonical instruction>
- **supersedes**: <anchor-id or none>

Workflow

1) Capture

  • Parse latest user message for candidate anchor statements
  • Keep only instruction/constraint content; remove examples/chatter
  • Assign default values:

- priority: P1 (unless user says critical/highest -> P0) - scope: session (unless user explicitly asks global/task scope) - expiresAt: session end (unless user explicitly sets never/date)

2) Confirm for Broad Anchors

  • If scope is global or priority is P0, ask a one-line confirmation before persisting
  • Do not auto-promote P2/P1 to P0 without explicit user intent

3) Persist

  • Append anchor entry to ledger
  • If new anchor conflicts with old same-scope anchor, mark old one superseded
  • Never rewrite history silently; keep audit trail

4) Rehydrate (each turn and after compaction)

  • Load active anchors (status=active and not expired)
  • Build an in-memory ANCHOR_SET sorted by priority and recency
  • Inject ANCHOR_SET into planning phase before tool execution

5) Drift Check (before final answer and before destructive actions)

  • Compare current plan against active anchors
  • On conflict:

- P0 conflict: stop and correct plan immediately - P1 conflict: auto-correct and note adjustment - P2 conflict: continue only if no user-level contradiction

  • Emit DRIFT_CHECK block in response

Conflict Resolution

Priority order:

  1. System and safety policy
  2. User anchors (P0 > P1 > P2)
  3. Current-turn temporary preferences

Tie-breakers:

  • More specific scope wins (task > session > global) if same priority
  • Newer anchor wins if same priority and same scope
  • Explicit user override wins only when safety is not violated

Output Template

When anchors exist, include this compact block:

ANCHORS_ACTIVE
| ID | P | Scope | Expires | Instruction |
|----|---|-------|---------|-------------|
| anchor-001 | P0 | global | never | Never perform destructive data deletion without confirmation |

PLAN_GUARD
- Current action: <action>
- Conflicts: none | <anchor ids>
- Decision: clear | corrected | paused-awaiting-user

DRIFT_CHECK
- Last anchor sync: <timestamp>
- Drift: no | yes
- Fix applied: <none|what changed>

Safety Boundaries

  • Never store tokens, API keys, passwords, cookies, or auth headers
  • Never store raw personal data unless strictly required by user instruction
  • Redact sensitive literals as [REDACTED]
  • Store constraints, not datasets
  • Do not execute destructive commands solely because an anchor exists; still require explicit confirmation for destructive actions

Expiry and Maintenance

  • Mark expired when expiresAt < now
  • Support control intents:

- /anchors list - /anchors pause <id> - /anchors resume <id> - /anchors delete <id> - /anchors pin <id> never

  • Rotate ledger when > 200 entries into memory/anchors-archive-YYYY-MM.md

Integration Notes

  • Pair with memory-self-heal for retry/fallback after drift correction
  • Pair with task-execution-guard to enforce anchor checks at each milestone
  • Keep this skill deterministic and concise; avoid free-form interpretation when conflict exists

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

73.76%
按下载量换算2,413

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills