Boscoeuk

Context Anchor

AI 智能体v1.0.0
作者:Boscoeuk更新于 2026-05-11context-anchor@clawhub_boscoeuk/context-anchor
上下文管理记忆增强

据 AlphaMoat 统计,截至 2026-09,Context Anchor 累计下载 4,538 次、获 4 个星标,在全部 5,078 个 AI 技能中排名第 2,118 位,在「AI 智能体」分类(969 个)中排名第 399 位。

累计安装
187
累计下载
4,538
星标
4
全站排名
#2,118
全站前 42% · 「AI 智能体」前 42%
平台累计安装累计下载星标评论
ClawHub ↗1504,5384-
SkillHub ↗1874,4964—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文介绍它会查看当前任务记录、近期日志和活动上下文文件,并整理当前任务、已作决定、未解决问题等摘要。扫描范围和回溯天数可配置;摘要依赖用户环境中已有的记忆文件和日志。

资料发布于 2026-10-27

可以用来做什么

  • 整理当前任务状态与已作决定
  • 从上下文和日志中找出未完成事项

什么时候用

  • 对话上下文被压缩或中断后需要重新定位时
  • 需要快速查看近期决策和开放问题时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

根据项目记忆文件总结当前任务、最近的决定和未完成事项
查看最近日志中有哪些开放问题需要跟进

月度数据趋势

累计下载4,538
2,9393,7984,6562026-03 · 累计下载 3,0572026-05 · 累计下载 3,7392026-06 · 累计下载 3,9182026-07 · 累计下载 4,2072026-08 · 累计下载 4,3732026-09 · 累计下载 4,53826-0326-09
星标4
3452026-03 · 星标 42026-05 · 星标 42026-06 · 星标 42026-07 · 星标 42026-08 · 星标 42026-09 · 星标 426-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-094,538—4
2026-084,373+3.9%4
2026-074,207+7.4%4
2026-063,918+4.8%4
2026-053,739—4
2026-033,057—4

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

4.2 KB · ClawHub v1.0.0
---
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.
展开全部(共 143 行)
## 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)
  └─ 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:

```markdown
## 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

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

### Change days to scan

```bash
./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

「AI 智能体」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。