Context Anchor

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.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
4 · 2.5k · 5 current installs · 6 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description say it will recover context by scanning memory/context files; the included script does exactly that (reads memory/current-task.md, memory/YYYY-MM-DD.md, context/active/*.md) and produces a briefing. Required tools listed in SKILL.md (find, grep, head, tail, date, stat) match what the script uses.
!
Instruction Scope
SKILL.md and the script instruct the agent to read files under a workspace root and scan recent daily logs for decisions/open loops — this is appropriate for the stated purpose. However, the runtime instructions and script reference environment variables (WORKSPACE, DAYS_BACK) and suggest adding the script to an "Every Session" startup routine; those env vars are not declared in the registry metadata and the "run before doing anything else" guidance could cause broad file reads if used automatically. The script does not access network endpoints or other system-wide config.
Install Mechanism
No install spec — instruction-only with a local script. No downloads, no package installs, nothing written to disk by an installer. This is low-risk in terms of supply-chain/install mechanism.
Credentials
The skill requests no credentials and the registry metadata lists no required env vars. The script does honor WORKSPACE and DAYS_BACK (and SKILL.md documents WORKSPACE override) but these were not listed in the registry's required env fields. While no secrets are requested, the script will read arbitrary files under the resolved workspace path — which could include sensitive data if your workspace contains it.
Persistence & Privilege
always:false and no install hooks modifying other skills or agent-wide config. The skill can be invoked by the model (disable-model-invocation:false) — this is the platform default and not, by itself, a red flag. The script does not persist credentials or alter other skills.
Assessment
This skill is a local, pure-Bash helper that scans files in your workspace to generate a briefing — it does not send data over the network or request credentials. Before installing or adding it to an automatic 'Every Session' routine: (1) review the script (scripts/anchor.sh) yourself to confirm it only reads files you expect; (2) be aware it will read everything under its resolved WORKSPACE (default is three directories up from the script), so set WORKSPACE to a narrow path if your workspace contains secrets; (3) run it manually first to inspect output; (4) note SKILL.md documents WORKSPACE and DAYS_BACK but the registry metadata doesn't list these env vars — this is minor but worth knowing. If you want to be extra cautious, keep this skill manual-only instead of adding it to automatic session startup.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk9721b5ja2tmrcqm534n9h9ned80bs4c

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

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

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…