Remember All Prompts Daily
This skill maintains conversation continuity across token budget cycles by automatically archiving your session history before compaction and restoring it when a new session begins.
How It Works
1. Extraction Trigger (95% Token Usage)
When token usage approaches 95%:
- - Run
export_prompts.py to extract current session history - Format all prompts/responses with timestamps
- Append to
memory/remember-all-prompts-daily.md with date-wise entry - Marks the archive point so compaction can proceed
2. Fresh Session Trigger (1% Token Usage)
When a new session starts (fresh 1% token usage):
- - Check if
memory/remember-all-prompts-daily.md exists - Read the most recent entry
- Ingest it as "past conversation summary" to restore context
- Continues naturally from where the previous session ended
3. Daily File Structure
CODEBLOCK0
Scripts
scripts/export_prompts.py
Extracts all prompts/responses from current session and archives them.
Usage:
CODEBLOCK1
What it does:
- - Uses
sessions_history() to fetch all messages from current session - Formats with timestamps and message IDs
- Appends to INLINECODE5
- Includes metadata (token count, duration, etc.)
scripts/ingest_prompts.py
Reads the daily archive and injects it as context on session start.
Usage:
CODEBLOCK2
What it does:
- - Reads
memory/remember-all-prompts-daily.md (if exists) - Extracts most recent session
- Returns formatted summary for ingestion into new session
Integration
Heartbeat Check
Add to
HEARTBEAT.md to monitor token usage:
CODEBLOCK3
Cron Job (Optional)
For automatic triggers:
CODEBLOCK4
Example Flow
Session 1:
- 1. Chat normally
- Token reaches 95%
- export_prompts.py runs automatically
- All prompts archived to daily file
- Session compacts
Session 2 (New Sprint):
- 1. Fresh 1% token budget
- ingest_prompts.py reads archive
- "Here's what we discussed yesterday..."
- Context restored, conversation continues seamlessly
Manual Usage
Export Right Now
CODEBLOCK5
View Today's Archive
CODEBLOCK6
Ingest Previous Session
CODEBLOCK7
Token Monitoring
Monitor token usage via:
CODEBLOCK8
When you see token usage approaching 95%, the skill can auto-trigger, or you can manually export.
Notes
- - Runs only in main session (direct chat with Ateeb)
- Respects privacy — only stores your actual prompts and responses
- Daily file auto-rotates at midnight (one entry per date)
- Can be manually triggered anytime
每日提示记忆技能
该技能通过在压缩前自动存档会话历史,并在新会话开始时恢复历史记录,从而在代币预算周期内保持对话连续性。
工作原理
1. 提取触发(代币使用量达95%)
当代币使用量接近95%时:
- - 运行 export_prompts.py 提取当前会话历史
- 将所有提示/响应按时间戳格式化
- 按日期条目追加到 memory/remember-all-prompts-daily.md
- 标记存档点,以便进行压缩
2. 新会话触发(代币使用量达1%)
当新会话开始时(代币使用量重置为1%):
- - 检查 memory/remember-all-prompts-daily.md 是否存在
- 读取最近一条条目
- 将其作为过往对话摘要导入,以恢复上下文
- 从上一会话结束处自然延续
3. 每日文件结构
每日提示记忆技能
[日期:2026-01-26]
会话1(09:00 - 09:47)
[会话中的所有提示和响应]
会话2(10:15 - 11:30)
[会话中的所有提示和响应]
脚本
scripts/export_prompts.py
提取当前会话中的所有提示和响应并进行存档。
使用方法:
bash
python scripts/export_prompts.py
功能说明:
- - 使用 sessions_history() 获取当前会话中的所有消息
- 按时间戳和消息ID进行格式化
- 追加到 memory/remember-all-prompts-daily.md
- 包含元数据(代币数量、持续时间等)
scripts/ingest_prompts.py
读取每日存档并在会话开始时将其作为上下文注入。
使用方法:
bash
python scripts/ingest_prompts.py
功能说明:
- - 读取 memory/remember-all-prompts-daily.md(如果存在)
- 提取最近的会话
- 返回格式化摘要,用于导入新会话
集成
心跳检查
添加到 HEARTBEAT.md 以监控代币使用量:
检查代币使用量 - 如果>95%,导出会话历史
定时任务(可选)
用于自动触发:
bash
定期检查代币
clawdbot cron add --text 检查代币使用量,必要时导出 --schedule
/15 *
示例流程
会话1:
- 1. 正常聊天
- 代币使用量达到95%
- export_prompts.py 自动运行
- 所有提示存档到每日文件
- 会话压缩
会话2(新周期):
- 1. 代币预算重置为1%
- ingest_prompts.py 读取存档
- 这是我们昨天讨论的内容...
- 上下文恢复,对话无缝继续
手动使用
立即导出
bash
python skills/remember-all-prompts-daily/scripts/export_prompts.py
查看今日存档
bash
cat memory/remember-all-prompts-daily.md | tail -100
导入上一会话
bash
python skills/remember-all-prompts-daily/scripts/ingest_prompts.py
代币监控
通过以下方式监控代币使用量:
bash
session_status # 显示当前代币使用量百分比
当代币使用量接近95%时,该技能可自动触发,或您也可以手动导出。
注意事项
- - 仅在主会话中运行(与Ateeb的直接对话)
- 尊重隐私——仅存储您的实际提示和响应
- 每日文件在午夜自动轮换(每个日期一条条目)
- 可随时手动触发