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
累計下載
4538
星標
4
全站排名
#2,118
全站前 42% · 「AI 智慧體」前 42%
平台累計安裝累計下載星標評論
ClawHub ↗15045384-
SkillHub ↗18744964—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

主文介紹它會檢視當前任務記錄、近期日誌和活動上下文檔案,並整理當前任務、已作決定、未解決問題等摘要。掃描範圍和回溯天數可配置;摘要依賴使用者環境中已有的記憶檔案和日誌。

資料釋出於 2026-10-27

可以用來做什麼

  • 整理當前任務狀態與已作決定
  • 從上下文和日誌中找出未完成事項

什麼時候用

  • 對話上下文被壓縮或中斷後需要重新定位時
  • 需要快速檢視近期決策和開放問題時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

根據專案記憶檔案總結當前任務、最近的決定和未完成事項
檢視最近日誌中有哪些開放問題需要跟進

月度資料趨勢

累計下載4538
2939379846562026-03 · 累計下載 30572026-05 · 累計下載 37392026-06 · 累計下載 39182026-07 · 累計下載 42072026-08 · 累計下載 43732026-09 · 累計下載 453826-0326-09
星標4
3452026-03 · 星標 42026-05 · 星標 42026-06 · 星標 42026-07 · 星標 42026-08 · 星標 42026-09 · 星標 426-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094538—4
2026-084373+3.9%4
2026-074207+7.4%4
2026-063918+4.8%4
2026-053739—4
2026-033057—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),按月更新。口徑說明見資料方法。