Skip to content
Back to skills

Smart Archive

ASecurity

Intelligent context archiving for the 1M token era. Replaces strategic-compact. Works with server-side Compaction API. Archives completed RIPER phases to .ai_state/ instead of emergency compression.

  • 188 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 22, 2026
researchapi

Works with

  • api

Security analysis

A100/100

Scanned September 22, 2026

npx -y skills add WenJunDuan/Rlues --skill smart-archive --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Smart Archive?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Smart Archive
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wenjunduan-smart-archive-780e20a7/badge)](https://www.skillsdirectory.com/skills/wenjunduan-smart-archive-780e20a7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: smart-archive
description: |
  Intelligent context archiving for the 1M token era.
  Replaces strategic-compact. Works with server-side Compaction API.
  Archives completed RIPER phases to .ai_state/ instead of emergency compression.
---

# Smart Archive Skill (was: strategic-compact)

## v8.0 变更

旧策略 (200K): 紧急压缩,丢失上下文
新策略 (1M): 智能归档,配合服务端 Compaction

## 上下文层级策略

| 使用量 | 动作 |
|:---|:---|
| 0-200K | 正常工作,无干预 |
| 200K-500K | 监控。服务端 Compaction 自动启用 |
| 500K-800K | 主动归档已完成阶段到 .ai_state/ |
| 800K+ | 建议拆分为 Agent Teams (Path D) |

## 归档策略

已完成的 RIPER 阶段上下文 → 摘要写入 .ai_state/archive.md:

```markdown
### Archive: R1 Research Phase - {{timestamp}}
- 搜索范围: {{files}}
- 关键发现: {{findings}}
- 决策: {{decisions}}
```

只保留关键信息,删除搜索结果原文等低密度内容。

## 与 Compaction API 配合

服务端 Compaction 自动压缩旧消息。
smart-archive 的价值在于:在 Compaction 之前,确保关键决策和上下文已持久化到 .ai_state/。

```
关键信息 → .ai_state/ (永久)
会话上下文 → Compaction 处理 (自动摘要)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…