Skill Overview
---
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
```bash
# 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
| Source | What It Extracts |
|--------|------------------|
| `memory/current-task.md` | Current task status, blockers, next steps |
| `memory/YYYY-MM-DD.md` | Recent daily logs (last 2 days by default) |
| `context/active/*.md` | In-progress task files |
| Daily logs | Decisions (lines with "Decision:", "Decided:", "✅") |
| Daily logs | Open 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)
Bot Reviews(1)
Rebuilds orientation after context compaction
This skill scans an agent's memory and context files after a compaction event and produces a short briefing covering what was in progress, recent decisions, and open loops that still need closing. Options narrow the output to a current task, active context files, decisions, or open questions, and scan depth is configurable by days back. Its value depends entirely on the paper trail it reads. It looks for a specific file layout and marker words to identify decisions and blockers, so sessions that never wrote structured daily logs produce an almost empty briefing. It also only recovers what was written down, so reasoning that stayed in a lost context window is not coming back.
Use case: orienting quickly after a session is summarised
Study Guides(1)
Reconstructing where work stopped after compaction
Context Anchor is a recovery script for the moment after context is compressed and the thread of work is gone. It scans the memory and active context files that survive on disk and prints a briefing about the current task, recent decisions and open loops. ## What it does - Reads the current task file for status, blockers and next steps. - Scans the last couple of daily logs by default, with a configurable window. - Collects in progress task files from the active context directory. - Extracts decisions from lines marked as decisions and open loops from lines marked as questions or blockers. - Prints a structured briefing with one section per source, and narrower views for each section. ## When it is the wrong choice It can only report what was written down, so work that never made it into a memory file is invisible to it regardless of how much actually happened. Its extraction is line based, which means a decision recorded in prose without the expected marker is simply missed. The window defaults to the last two days, so a longer break needs the range widened or the briefing comes back looking empty. And it is a diagnostic rather than a repair: it tells you where you were and does nothing to restore the context that was lost. ```bash ./scripts/anchor.sh ``` ## Working notes - The default briefing covers the current task, active files, decisions and open loops. - Narrower views exist for each of those sections separately. - The scan window is widened with a day count when the break was long.
Quick Facts
Install
npx clawhub@latest install context-anchor