Life Capture

👤 epitomizelu 📦 v1.0.0 ⭐ 4.3 ⬇️ 776 下載
🏠 生活服務 免費

📖 技能介紹


name: life-capture description: capture daily-life notes into markdown and sqlite. use when the user wants to record one or more life entries such as expenses, completed tasks, schedules, reminders, or ideas; classify the content; generate tags; parse natural language into structured json; write a daily markdown note under life/daily; and sync structured fields into a local sqlite database. triggers include short single-line entries, mixed sentences containing multiple record types, or requests to log and organize personal information for later review and reporting.


life-capture

Turn natural-language life logs into durable records. This skill classifies each input item, generates tags, creates user-visible markdown, writes to a daily note under life/daily, and syncs structured data into life/db/life.db.

Default storage layout

Use these paths unless the user explicitly overrides them:

life/
  daily/
  ideas/
  db/life.db

Create missing directories as needed. Never delete existing content. Append or update only.

Supported record types

Map every parsed item to exactly one primary type:

  • expense: spending, bills, purchases, subscriptions, refunds
  • task: completed tasks, ongoing work, todos, chores, habits
  • schedule: calendar items, appointments, time blocks, plans
  • idea: ideas, inspiration, possible projects, reflections worth saving

When a sentence contains multiple items, split it into multiple records.

Output contract

For each user request:

  1. Parse the message into one or more records.
  2. Generate a stable id for each record using the pattern:
  3. exp_YYYYMMDD_NNN
  4. task_YYYYMMDD_NNN
  5. sched_YYYYMMDD_NNN
  6. idea_YYYYMMDD_NNN
  7. Generate 1 to 4 short tags.
  8. Show the user the organized result in markdown.
  9. Save the records by running scripts/process_entry.py.

Always keep the original user wording in raw_text. Never invent missing fields. Leave unknown fields null.

User-visible response format

Because this skill is configured for visible output, show a concise but complete result after writing:

## 已整理記錄

### 1) <type label>
- ID: <id>
- 標籤: #a #b
- 歸檔: <daily markdown path>
- 資料庫: <written/skipped>

#### Markdown
<the markdown block written for this item>

#### JSON
```json
<the parsed record json>

If there are multiple records, repeat the block for each one.

## Parsing rules

Use `scripts/parse_entries.py` for natural-language parsing. The parser now reads configurable rules from `references/parser_config.json`, so prefer editing that file instead of changing Python when you need new categories, tags, or keyword mappings.

### Expense

Extract when present:
- `amount`
- `currency` (default `CNY` only when the currency symbol or language implies RMB; otherwise null)
- `category`
- `subcategory`
- `merchant`
- `pay_method`

Default top-level tags often include `開銷` plus one semantic tag such as `餐飲` or `交通`.

Preferred categories:
- 飲食
- 交通
- 購物
- 居家
- 社交
- 娛樂
- 醫療
- 學習
- 其他

### Task

Extract when present:
- `status` (`todo`, `doing`, `done`, `cancelled`)
- `priority` (`low`, `normal`, `high`)
- `project`
- `due_date`
- `completed_at`

If the user says they already did something, default status to `done`.

### Schedule

Extract when present:
- `schedule_date`
- `start_time`
- `end_time`
- `location`
- `status` (`planned`, `done`, `skipped`)

If the user uses relative dates, resolve them from the current conversation date. Prefer passing `--today YYYY-MM-DD` to `scripts/process_entry.py` or `scripts/parse_entries.py` so relative dates like `明天` are stable across environments.

### Idea

Extract when present:
- `idea_type`
- `status` (`captured`, `reviewing`, `used`, `archived`)
- `related_task_id`

Default status to `captured`.


## Configurable parsing rules

Before editing Python, check whether the change can be made in `references/parser_config.json`.

You can change:
- category and subcategory mappings for expenses
- task project mappings
- idea type mappings
- schedule extra tag mappings
- default tags by record type
- hint regexes used in type inference

To test a modified config without changing the bundled default file:

```bash
python scripts/parse_entries.py --config /path/to/custom_config.json --text "買咖啡 18 元,明天下午兩點去體檢"

Markdown writing rules

Write each record into the daily note for its effective date under one of these sections: - ## 開銷 - ## 任務 - ## 日程 - ## 靈感

Use this block structure:

### <id>
- 時間:<time or empty>
- 標籤:#tag1 #tag2
- 原始描述:<raw_text>
- 摘要:<summary>

Then add type-specific fields:

  • Expense: 金額 / 幣種 / 分類 / 子分類 / 商家 / 支付方式
  • Task: 狀態 / 優先順序 / 專案 / 截止日期 / 完成時間
  • Schedule: 日期 / 開始時間 / 結束時間 / 地點 / 狀態
  • Idea: 型別 / 狀態 / 關聯任務

Execution workflow

End-to-end one-command flow

Use this when the user provides natural language and wants the records saved immediately:

python scripts/process_entry.py --root life --db life/db/life.db --today 2026-03-10 --text "今天中午牛肉麵 26 元,下午整理了書桌,想到可以做一個生活資料看板"

The wrapper script will: 1. initialize the database if missing 2. parse text into {"records": [...]} with scripts/parse_entries.py 3. save markdown and sqlite rows with scripts/save_entry.py 4. print parsed records plus save results as json

Split-step flow

Use this when the user asks to inspect or verify the structured output before writing:

python scripts/parse_entries.py --text "明天下午兩點去體檢,買咖啡 18 元"

小蔥技能有更好的技能skills外掛。

Then save:

python scripts/save_entry.py --root life --db life/db/life.db --stdin-json

Database init only

Use this once before first write if life/db/life.db does not exist and you are not using process_entry.py:

python scripts/init_db.py --db life/db/life.db

Database sync rules

The database design is: - entries - expenses - tasks - schedules - ideas - tags - entry_tags

See references/schema.md for the schema, references/examples.md for sample payloads and commands, and references/configuration.md plus references/parser_config.json for configurable parsing rules.

Failure handling

  • If markdown write succeeds but database sync fails, say so clearly.
  • Do not silently drop a record.
  • If parsing is ambiguous, make the narrowest safe interpretation and preserve the original text.
  • If a record is missing a critical type-specific field, still save the record with null fields rather than discarding it.

🤖 AI 評測

這是一款將日常碎碎念自動整理成有條理筆記的生活管理工具,表現相當不錯。它能準確識別消費、任務、日程、靈感等不同型別的記錄,自動分類打標,資料既容易閱讀也方便查詢。文件示例豐富,很快就能上手。美中不足的是,目前主要對中文支援較好,其他語言可能會識別不準。另外在多人同時使用時,記錄編號可能有小機率重複。總體來說質量不錯,日常使用完全沒問題。

📊 多維度評分

適應性4.2
規範性4.2
有效性4.3
可靠性4.2
可信度5

📁 包含檔案 (11 個)

📄 SKILL.md 6.6 KB
📄 _meta.json 131 B
📄 agents/openai.yaml 138 B
📄 references/configuration.md 1.2 KB
📄 references/examples.md 2.4 KB
📄 references/parser_config.json 3.8 KB
📄 references/schema.md 664 B
📄 scripts/init_db.py 2.1 KB
📄 scripts/parse_entries.py 13.5 KB
📄 scripts/process_entry.py 1.8 KB
📄 scripts/save_entry.py 9.3 KB