Install
openclaw skills install instruction-anchor-guardPreserve user-critical instructions across long sessions and context compaction. Use when users mark constraints as important/must/always/never/highest-prior...
openclaw skills install instruction-anchor-guardPrevent loss or drift of user-critical constraints during compaction, session restart, or long multi-turn tasks.
Trigger when any of these appear:
Store anchors in first available path:
memory/anchors.mdmemory/instruction-anchors.md.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>
global or priority is P0, ask a one-line confirmation before persistingsupersededANCHOR_SET sorted by priority and recencyANCHOR_SET into planning phase before tool executionDRIFT_CHECK block in responsePriority order:
Tie-breakers:
task > session > global) if same priorityWhen 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>
[REDACTED]expired when expiresAt < now/anchors list/anchors pause <id>/anchors resume <id>/anchors delete <id>/anchors pin <id> nevermemory/anchors-archive-YYYY-MM.mdmemory-self-heal for retry/fallback after drift correctiontask-execution-guard to enforce anchor checks at each milestone