SuperAPI AI Directory

readwise-rival

Writing & research

View repository

Updated 10-16 09:31

About this skill

Reading Highlights and Knowledge Review

Collect highlights and notes from reading, generate knowledge cards, and support spaced repetition review.

Use Cases

  • The user says "Help me save this passage" or "What content about XX have I read recently?"
  • The user wants to periodically review previous reading excerpts
  • The user wants to generate knowledge cards from reading notes

Data Storage

# 高亮库存储路径
mkdir -p ~/.xiaodazi/reading/highlights
mkdir -p ~/.xiaodazi/reading/cards

Highlight Format

// ~/.xiaodazi/reading/highlights/2025-02.json
{
  "highlights": [
    {
      "id": "h_001",
      "text": "好的决策不是关于你知道什么,而是关于你如何思考。",
      "source": {
        "type": "book",
        "title": "思考,快与慢",
        "author": "丹尼尔·卡尼曼",
        "chapter": "第3章"
      },
      "tags": ["决策", "思维方式"],
      "note": "这个观点可以用在产品设计决策流程中",
      "created_at": "2025-02-07T14:30:00"
    }
  ]
}

Core Features

1. Save Highlights

The user pastes or dictates a passage of text, and the LLM saves it in a structured way:

# 追加高亮
python3 -c "
import json, os
from datetime import datetime

highlights_file = os.path.expanduser('~/.xiaodazi/reading/highlights/$(date +%Y-%m).json')
# ... 读取、追加、写入
"

2. Search by Topic

# 搜索含关键词的高亮
python3 -c "
import json, glob, os

pattern = os.path.expanduser('~/.xiaodazi/reading/highlights/*.json')
query = '决策'
results = []
for f in glob.glob(pattern):
    data = json.load(open(f))
    for h in data.get('highlights', []):
        if query in h.get('text', '') or query in str(h.get('tags', [])):
            results.append(h)

for r in results[:10]:
    print(f'📌 \"{r[\"text\"][:80]}...\"')
    src = r.get('source', {})
    print(f'   — {src.get(\"title\", \"?\")}')
    print()
"

3. Generate Knowledge Cards

Extract question-answer pairs from highlights for review:

## 知识卡片

**Q**: 好的决策取决于什么?
**A**: 不是关于你知道什么,而是关于你如何思考。(丹尼尔·卡尼曼《思考,快与慢》)

**标签**: #决策 #思维方式
**下次复习**: 2025-02-14

4. Spaced Repetition Review

Schedule reviews based on a simplified SM-2 algorithm:

首次: 1 天后
第二次: 3 天后
第三次: 7 天后
第四次: 14 天后
第五次: 30 天后

5. Weekly Review

## 本周阅读回顾

**新增高亮**: 12 条
**来源**: 3 本书, 5 篇文章

### 高频主题
1. 决策科学(4 条)
2. 产品设计(3 条)
3. AI 应用(3 条)

### 精选高亮
> "好的决策不是关于你知道什么..."
> — 思考,快与慢

### 待复习卡片
- 5 张今日到期
- 12 张本周到期

Output Specifications

  • After saving a highlight, confirm "Saved, tags: #XX #XX"
  • During review, show 5 cards at a time, and after the user answers, mark the level of mastery
  • Weekly reviews are generated automatically (can be pushed in conjunction with the notification Skill)
  • All data is stored locally ~/.xiaodazi/reading/