Context Anchor for Openclaw

Context Anchor is a lightweight Bash-based utility that helps AI agents recover from context compaction by scanning memory files to generate a briefing of where they left off.

boscoeuk
v1.0.0
Feb 2, 2026
4
4.5k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install context-anchor

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install context-anchor using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Context Anchor?

The Context Anchor skill is a specialized utility designed to solve the common problem of context loss during long-running AI agent sessions. When an agent undergoes context compaction or starts a fresh session, it often loses track of its current trajectory. This skill bridges that gap by scanning persistent memory and context files to reconstruct a coherent briefing of the agent's current state.

By leveraging existing files like daily logs and task trackers, Context Anchor ensures that no decision is forgotten and no open loop remains unnoticed. It provides a structured, high-level overview that allows both human developers and AI agents to orient themselves instantly within a complex project environment using the Openclaw Skills framework.

Context Anchor Use Cases

  • Starting a new work session to quickly orient the agent.
  • Recovering critical information after a context window compaction event.
  • Clarifying current objectives when the agent feels lost or lacks direction.
  • Handing off project state between different AI agents or human collaborators.
  • Performing a daily review of decisions made and blockers encountered.

How Context Anchor Works

  1. The script initiates a scan of the workspace, specifically targeting the memory and context directories.
  2. It extracts the current task status, blockers, and next steps from the current-task.md file.
  3. The tool identifies active context files and provides a preview of their contents and last modification times.
  4. It parses daily log files from a configurable number of days back to find explicit decisions and completed milestones using specific string patterns.
  5. It identifies open loops, such as TODOs, blockers, and unanswered questions, using pattern matching within the logs.
  6. A structured briefing is generated and outputted to the terminal for the agent to process and reintegrate into its active context.

Context Anchor Setup

To integrate this into your workflow, ensure the script is executable and within your skills directory. It requires no external dependencies beyond standard Unix utilities.

# Make the script executable
chmod +x ./scripts/anchor.sh

# Run a full briefing to test installation
./scripts/anchor.sh

For seamless automation, add it to your agent's session routine within AGENTS.md as recommended by the Openclaw Skills standard practices.

Context Anchor Data Schema & Taxonomy

The skill relies on a standardized file structure within the workspace to extract meaningful context. It searches the following locations:

Source Data Extracted Identification Logic
memory/current-task.md Task Status Full file content extraction
memory/YYYY-MM-DD.md Decisions & Loops Scans for keywords like Decision:, Decided:, ✅, TODO:, and Blocker:
context/active/*.md Project Context Lists files updated recently with a content preview
Daily Logs Questions Extracts lines containing question marks or "Need to" phrases

Context Anchor Advanced Features

  • Custom look-back periods using the --days flag to scan deeper into project history.
  • Granular reporting modes to focus specifically on decisions (--decisions), open loops (--loops), or active files (--active).
  • Zero-dependency architecture requiring only standard Unix utilities like find, grep, and stat.
  • Workspace root customization via environment variables for managing multiple projects.
  • Seamless integration with agent session protocols via Openclaw Skills standard paths to automate orientation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*