Context Anchor
by @boscoeuk
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.
clawhub install context-anchorπ About This Skill
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.shJust show current task
./scripts/anchor.sh --taskJust show active context files
./scripts/anchor.sh --activeJust show recent decisions
./scripts/anchor.sh --decisionsShow open loops / questions
./scripts/anchor.sh --loopsScan 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)
ββ 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 SessionBefore 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, statWhen to Use
β‘ When to Use
π‘ Examples
# Full briefing (default)
./scripts/anchor.shJust show current task
./scripts/anchor.sh --taskJust show active context files
./scripts/anchor.sh --activeJust show recent decisions
./scripts/anchor.sh --decisionsShow open loops / questions
./scripts/anchor.sh --loopsScan specific number of days back
./scripts/anchor.sh --days 3