Install
openclaw skills install @thomaszhou22/context-archiveUser-driven conversation archiving for AI agents. Archive by topic or time, free context, recall on demand.
openclaw skills install @thomaszhou22/context-archiveVersion: 1.1.0
Users with a single agent session accumulate context over time. Long conversations cause attention drift, irrelevant context pollution, and wasted tokens. This skill gives the user explicit control over what stays in context and what gets shelved.
Triggers:
Time Range Parsing:
Flow:
Identify the conversation segment to archive
Generate a structured summary of the segment
Detail Check (关键步骤)
Propose a title to the user
YYYY-MM-DD-简短描述Write to archives/{title}.md
Confirm to user
Triggers:
Flow:
archives/ directoryTriggers:
Flow:
Trigger: When session context exceeds ~50k tokens or conversation exceeds 80+ messages.
Flow:
# {Title}
> Archived: {YYYY-MM-DD HH:mm}
> Period: {start time} — {end time}
> Messages: {count}
## Summary
{2-3 paragraph narrative summary}
## Key Points
- {bullet points of important facts/decisions}
## Decisions
- {any decisions made}
## User-Supplied Details
- {details the user specifically flagged as important during the detail check}
## Files Modified
- {path}: {what changed}
## TODOs
- [ ] {unfinished items, if any}
## Keywords
{comma-separated tags for future search}
First-time setup when the skill is invoked for the first time:
Check if archives/ directory exists and contains any .md files
If empty (first-time user), present this welcome message:
欢迎使用 Context Archive。这个工具帮你主动管理对话上下文。
三个核心动作:
- 归档:把一段对话压缩成摘要文件,释放上下文空间
- 列出归档:查看所有存档
- 加载:把某个存档恢复到当前对话
你可以自己决定归档什么、归档什么时间段的:
- 按主题:归档关于XX的讨论
- 按时间:归档最近2小时的对话、归档7/21下午3点到5点
- 按需求:归档今天的对话、归档最近的对话
归档时我会先生成摘要给你看,你确认没有遗漏再存。 已为你创建 archives/ 目录。
Create archives/ directory
Proceed with the user's intended action immediately
archives/ directory in workspace root{YYYY-MM-DD}-{user-provided-or-auto-title}.mdarchives/ if not exists