一键导入
memory-processor
Process raw events into distilled long-term memories using batch processing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Process raw events into distilled long-term memories using batch processing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a brand-new reusable skill from a single completed task. Read the per-task SKILL_SOURCE markdown the handler wrote, distil the workflow into a generalised SKILL.md, save it at skills/<name>/SKILL.md. Use this when CraftBot has spawned a 'Create Skill' workflow task and you need to author the new skill end-to-end without user interaction.
Refine an existing CraftBot skill using evidence from one completed task that used it. Read the per-task SKILL_SOURCE markdown the handler wrote, diff it against the existing SKILL.md, apply surgical edits to skills/<target>/SKILL.md. Use this when CraftBot has spawned an 'Improve Skill' workflow task and you need to refine the skill's accuracy or token efficiency without redesigning it.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
Conduct a conversational interview to explore user's job and life goals
Daily planning skill that reviews recent interactions, scans external environment, identifies tasks for today, and updates the Goals, Plan, and Status section in PROACTIVE.md.
Process the unified proactive heartbeat by reading PROACTIVE.md and executing all due tasks across every frequency (hourly/daily/weekly/monthly).
| name | memory-processor |
| description | Process raw events into distilled long-term memories using batch processing. |
| user-invocable | false |
| action-sets | ["file_operations"] |
The only way for agent to save event into long-term memory.
agent_file_system/EVENT_UNPROCESSED.md - Source (read & clear batches)agent_file_system/MEMORY.md - Destination (append distilled memories)Use task_update_todos to track progress. Create todos at start, update as you go.
Initial todos (create after reading first batch):
1. [pending] Process and loop for each batch (25~50 lines).
2. [pending] Validate and cleanup
3. [pending] Complete task
After each batch: Mark current as completed, add next batch if more events exist.
Process 50 lines at a time to avoid memory issues.
read_file EVENT_UNPROCESSED.md, offset=11, limit=50task_update_todos to create initial todo liststream_edit MEMORY.md (append only)stream_edit EVENT_UNPROCESSED.md (delete lines 12-61)task_end when validation passes[reasoning], [action_start], [gui_action], [screen_description][agent message] - agent responses are NEVER saved...[YYYY-MM-DD HH:MM:SS] [category] Full Name predicate object
Categories: [fact], [preference], [event], [decision], [learning]
Input:
[2026/02/09 06:33:10] [user message]: agent, i am an ai researcher at craftos
Output:
[2026-02-09 06:33:10] [fact] John is an AI researcher at CraftOS
Note: Get actual names from existing MEMORY.md. Never use "user", "conversation partner", or pronouns.
Each memory item MUST be <= 150 words, counted on the text AFTER the [category] tag.
If a distillation would exceed 150 words, compress further:
Never truncate mid-sentence; never end an item with ....
Core principle: Memory is for LASTING PERSONAL INSIGHTS that improve future interactions, not event logging.
The Future Utility Test: Before saving, ask: "Will knowing this help me serve the user better in a FUTURE conversation?" If the answer is no, discard it.
NEVER save (these belong in EVENT.md, not MEMORY.md):
task_completion, task_started, task_faileduser_request, user message, agent messageSAVE CONDITION:
Only save the memory if it contains lasting value:
ALWAYS save (high future utility):
Examples of future utility:
read_file, stream_edit, memory_search, grep_files, task_end, task_update_todos
send_message, ignore, run_shell, write_file, create_file
Batch 1 (50 lines):
[2026-02-09 06:33:10] [fact] John is an AI researcher[2026-02-09 06:33:10] [event] John has a meeting with Sarah from Company ABC on 15/2/2026, with unknown locationTodo update after batch 1:
1. [completed] Process batch 1 (lines 12-61)
2. [in_progress] Process batch 2 (lines 12-61)
3. [pending] Validate and cleanup
4. [pending] Complete task
Result: 50 events → 1 memory, progress tracked via todos
Input (raw, rambling):
[2026-03-12 10:04:22] [user message]: so i was thinking about the trip next month, we're still planning to fly to tokyo on april 18th, staying at the shinjuku hilton for six nights, my wife emma is coming, and we also want to try the sushi place called sukiyabashi jiro that my friend kenji recommended, oh and the flight is on ANA from LAX, departing 10:55am, i need to remember to pack the camera and charger, and i'm a bit anxious because last time i forgot my passport
Output (<= 150 words, two atomic memories):
[2026-03-12 10:04:22] [event] John and Emma fly Tokyo on 2026-04-18 via ANA from LAX 10:55am, staying Shinjuku Hilton 6 nights
[2026-03-12 10:04:22] [preference] John wants to try Sukiyabashi Jiro sushi in Tokyo (recommended by Kenji)
Anxiety, packing reminder, and narrative framing are dropped — no lasting utility.
Triggered when the task instruction contains a "Pruning phase" directive (MEMORY.md has reached the item-count cap).
Add these todos alongside the event-processing todos:
N+1. [pending] Read MEMORY.md header + oldest block
N+2. [pending] Consolidate/merge/drop oldest items
N+3. [pending] Replace oldest block in MEMORY.md
Execute AFTER event processing completes:
read_file MEMORY.md from line 11 (skip the header block) up to the oldest-N range indicated in the task instruction.stream_edit MEMORY.md to replace the oldest block with the consolidated set. The # Memory Log / ## Overview / ## Memory header (lines 1-10) must remain intact.[event] items whose date has passed and have no lasting consequence.prune_target below the pre-prune count (the task instruction states the exact number).