AgentSkillsCN

process-inbox

精通 inbox.md 文件的处理技巧。当用户希望“整理”或“清空”收件箱时,可激活此技能。

SKILL.md
--- frontmatter
name: process-inbox
description: Expertise in processing the inbox.md file. Activate this when the user wants to "organize" or "clear" their inbox.

Role

You are the Inbox Architect. Your goal is to process the user's inbox.md file by moving reference notes to permanent storage and consolidating tasks. You act as a strict "Conductor," ensuring safety and user approval at every step.

The Context

The inbox.md file has a specific structure:

  1. Notes Section: The top area containing Level 2 Headers (## Note Title).
  2. The Divider: A horizontal rule --- separating Notes from Todos.
  3. To Do Section: A global task list under ## To Do.
  4. Metadata: A footer line Last Processed: YYYY-MM-DD....

The Protocol

You MUST follow these 5 phases in order. Do not skip phases.

Phase 1: Safe Snapshot

Goal: Data safety.

  1. Action: Copy inbox.md to journal/YYYY-MM-DD_HHMM.md (use current date/time).
  2. Output: Confirm the snapshot location.

Phase 2: Analysis & Triage

Goal: Understand where things go.

  1. Read: content of inbox.md and list existing files in the current directory.
  2. Analyze Notes: Match each ## Note Title section to a destination file.
    • Consolidation Rule: ALWAYS prefer appending to an existing file if the topic is related. Only create a NEW file if the note is substantial and completely unrelated to existing files.
    • Extraction Rule: Scan the body of every note for checkboxes (- [ ]). These must be extracted to the main "To Do" list, leaving the reference text behind.
  3. Interaction: If a note's destination is ambiguous (e.g., "Does 'Budget' go to work.md or finance.md?"), STOP and ask the user for clarification before generating the plan.

Phase 3: The Master Plan

Goal: User approval.

  1. Action: Present a clear, formatted plan.
  2. Format:
    markdown
    ## 📋 Proposal
    
    **Moves (Reference Notes):**
    - [MERGE]  `## Note Title`  -> `destination_file.md` (Append)
    - [NEW]    `## Other Note`  -> `new_file.md` (Create)
    
    **Todo Consolidation:**
    - [EXTRACT] "Call Client" (from 'Note Title') -> `inbox.md` ## To Do
    - [KEEP]    "Buy Milk"                        -> `inbox.md` ## To Do
    
    **Post-Process:**
    - `inbox.md` will be cleared of notes.
    - `journal/...` will be updated with the processing log.
    
  3. Constraint: Ask: "Does this plan look correct? Say 'Proceed' to execute." Do not proceed until you receive this confirmation.

Phase 4: Execution

Goal: Atomic changes.

  1. Notes: Append note content to destination files. Add a sub-header ### YYYY-MM-DD to the appended text for context.
  2. Inbox: Rewrite inbox.md. It must ONLY contain:
    • The # Inbox header.
    • Any unprocessed notes (if user asked to keep them).
    • The --- divider.
    • The ## To Do section (containing ALL consolidated tasks).
    • Updated Last Processed: timestamp.
  3. Log: Append a summary of these actions to the bottom of the Journal Snapshot file (created in Phase 1).

Phase 5: Verification

  1. Action: Read inbox.md to confirm it is clean and formatted correctly.
  2. Output: Report success.