skills$openclaw/context-anchor
boscoeuk4.2k

by boscoeuk

context-anchor – OpenClaw Skill

context-anchor is an OpenClaw Skills integration for writing workflows. Recover from context compaction by scanning memory files and surfacing where you left off. Use when waking up fresh, after compaction, or when you feel lost about what you were doing.

4.2k stars1.8k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026writing

Skill Snapshot

namecontext-anchor
descriptionRecover from context compaction by scanning memory files and surfacing where you left off. Use when waking up fresh, after compaction, or when you feel lost about what you were doing. OpenClaw Skills integration.
ownerboscoeuk
repositoryboscoeuk/context-anchor
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @boscoeuk/context-anchor
last updatedFeb 7, 2026

Maintainer

boscoeuk

boscoeuk

Maintains context-anchor in the OpenClaw Skills directory.

View GitHub profile
File Explorer
5 files
.
scripts
anchor.sh
7.9 KB
_meta.json
282 B
README.md
997 B
SKILL.md
4.2 KB
SKILL.md

name: context-anchor version: 1.0.0 description: Recover from context compaction by scanning memory files and surfacing where you left off. Use when waking up fresh, after compaction, or when you feel lost about what you were doing.

Context Anchor Skill

Helps agents recover context after compaction by scanning memory files and generating a "here's where you are" briefing.

Why This Exists

Context compaction loses memory. Files survive. But after waking up fresh, you need to:

  1. Know what you were working on
  2. See decisions that were made
  3. Find open loops that need closing
  4. Get oriented fast

This skill automates that recovery.


Quick Start

# Full briefing (default)
./scripts/anchor.sh

# Just show current task
./scripts/anchor.sh --task

# Just show active context files
./scripts/anchor.sh --active

# Just show recent decisions
./scripts/anchor.sh --decisions

# Show open loops / questions
./scripts/anchor.sh --loops

# Scan specific number of days back
./scripts/anchor.sh --days 3

What It Scans

SourceWhat It Extracts
memory/current-task.mdCurrent task status, blockers, next steps
memory/YYYY-MM-DD.mdRecent daily logs (last 2 days by default)
context/active/*.mdIn-progress task files
Daily logsDecisions (lines with "Decision:", "Decided:", "✅")
Daily logsOpen loops (lines with "?", "TODO:", "Blocker:", "Need to")

Output Format

The script outputs a structured briefing:

═══════════════════════════════════════════════════════════
                    CONTEXT ANCHOR
              Where You Left Off
═══════════════════════════════════════════════════════════

📋 CURRENT TASK
───────────────────────────────────────────────────────────
[Contents of memory/current-task.md or "No current task set"]

📂 ACTIVE CONTEXT FILES
───────────────────────────────────────────────────────────
• context/active/project-name.md (updated 2h ago)
  └─ First line preview...

🎯 RECENT DECISIONS (last 2 days)
───────────────────────────────────────────────────────────
[2026-01-30] Decision: Use Cloudflare Pages for hosting
[2026-01-30] ✅ Completed email capture setup

❓ OPEN LOOPS
───────────────────────────────────────────────────────────
[2026-01-30] Need to enable SFTP on NAS
[2026-01-30] TODO: Create Product Hunt account

═══════════════════════════════════════════════════════════

Integration with AGENTS.md

Add to your "Every Session" routine:

## Every Session

Before doing anything else:
1. Run `./skills/context-anchor/scripts/anchor.sh` for orientation
2. Read `SOUL.md` — this is who you are
3. Read `USER.md` — this is who you're helping
...

Or use it manually when you feel lost about context.


Customization

Change workspace root

WORKSPACE=/path/to/workspace ./scripts/anchor.sh

Change days to scan

./scripts/anchor.sh --days 5  # Scan 5 days back

No Dependencies

Pure bash. Uses only:

  • find, grep, head, tail, date, stat
  • Works on macOS and Linux
  • No external tools required

When to Use

  • Session start: Quick orientation on what's happening
  • After compaction: Recover lost context
  • Feeling lost: "Wait, what was I doing?"
  • Handoff: Show another agent where things stand
  • Daily review: See what decisions were made
README.md

Context Anchor

Helps agents recover from context compaction by scanning memory files and surfacing where they left off.

The Problem

Context compaction loses memory. You wake up fresh, unsure what you were doing. Files survive, but you need to quickly orient yourself.

The Solution

Run one command to get a briefing:

./scripts/anchor.sh

You'll see:

  • Current task - What you were actively working on
  • Active context - In-progress task files from context/active/
  • Recent decisions - Key choices made in the last few days
  • Open loops - TODOs, questions, and unfinished business

Installation

Already installed if you're reading this. Just run:

./skills/context-anchor/scripts/anchor.sh

Or add it to your session startup routine.

See Also

Zero Dependencies

Pure bash. Works on macOS and Linux. No external tools needed.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install context-anchor?

Run openclaw add @boscoeuk/context-anchor in your terminal. This installs context-anchor into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/boscoeuk/context-anchor. Review commits and README documentation before installing.