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.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- 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.
02 资源文件 3
- 参考文档_meta.json282 B
- 参考文档README.md997 B
- 脚本scripts/anchor.sh7.9 KB
03 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:
- Know what you were working on
- See decisions that were made
- Find open loops that need closing
- 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
| 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 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
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.