Loading...
Loading...
Use when user wants to find a note to publish as a blog post. Triggers on「选一篇笔记发博客」「note to blog」「写博客」「博客选题」. Scans Obsidian notes via Python script, evaluates blog-readiness, supports batch selection with fast/deep dual-track and parallel Agent dispatch.
npx skill4agent add niracler/skill note-to-blog| Tool | Type | Required | Install |
|---|---|---|---|
| Python 3 | cli | Yes | Pre-installed on macOS |
| PyYAML | pip | Yes | |
| writing-proofreading | skill | No | Included in |
Do NOT proactively verify these tools on skill load. If a command fails due to a missing tool, directly guide the user through installation and configuration step by step.
scripts/note-to-blog.py (collect / convert / state subcommands)Phase 1 Phase 2 Phase 3 Phase 4 Phase 5
Collect ──▶ Evaluate ──▶ Interact ──▶ Execute ──▶ Summary
(script) (LLM) (user) (Agent Teams) (report)
├─ select ├─ Fast track
├─ skip └─ Deep track
└─ assign trackcollectpython3 scripts/note-to-blog.py collect \
--note-repo "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Note/" \
--blog-content "repos/bokushi/src/content/" \
--project-paths \
"~/.claude/projects/-Users-sueharakyoko-code-nini-dev" \
"~/.claude/projects/-Users-sueharakyoko-code-nini-dev-repos-bokushi" \
--history-file "~/.claude/history.jsonl"candidatesclusterspublished_postssession_keywordsstatscollectcandidatesclusterspublished_postssession_keywords[
{
"type": "single",
"path": "Areas/大模型(LLM)/关于后LLM时代的代码Review.md",
"title": "关于后 LLM 时代的代码 Review 的看法",
"score": 92,
"collection": "blog",
"effort": "小",
"session_activity": "★★★",
"duplicate_risk": "none",
"reason": "结构完整、有真实案例、观点独特"
},
{
"type": "cluster",
"hub_title": "优雅的哲学",
"hub_path": "Areas/生活(Life)/优雅的哲学-v2.0.md",
"related_count": 9,
"score": 88,
"collection": "blog",
"effort": "大",
"theme_summary": "关于如何优雅地生活的哲学思考,散落在多篇笔记中",
"reason": "主题深度足够,需要整合多篇笔记"
}
]# 类型 标题 适配分 目标 工作量 活跃 重复风险
1 单篇 后LLM时代代码Review 92 blog 小 ★★★ 无
2 主题簇 优雅的哲学 (9篇关联) 88 blog 大 ★ 无
3 单篇 SSH私钥加密 85 til 小 ─ 无
4 单篇 Feed内容阅读姿势 82 blog 小 ★ 无
...| Action | Example | Effect |
|---|---|---|
| Select + assign track | "1 和 3 快速转换,2 走深度" | Queue items with track assignment |
| Override collection | "1 放 til" | Change target collection |
| Batch skip | "4~6 跳过,reason: private" | Mark as skipped via |
| See more | "还有别的吗" | Request additional recommendations (exclude previously shown items) |
| Check status | "状态" | Run |
python3 scripts/note-to-blog.py state skip "<path>" --reason "<reason>" \
--note-repo "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Note/"| Track | When to use | What happens |
|---|---|---|
| Fast (快速) | Independent, mostly complete notes | Script converts → Agent reviews → draft |
| Deep (深度) | Topic clusters or rough notes needing research | Agent reads all related notes → research report |
type: "single"effort: "小"type: "cluster"effort: "大"确认选择:
Fast track:
1. 后LLM时代代码Review → blog/
3. SSH私钥加密 → til/
Deep track:
2. 优雅的哲学 (9篇关联) → blog/
开始处理?总编 (Main Agent)
├── Task Agent 1: 文章 A (fast track)
├── Task Agent 2: 文章 B (fast track)
└── Task Agent 3: 主题簇 C (deep track)general-purposepython3 "<absolute-path-to-skill>/scripts/note-to-blog.py" convert "<full-path-to-note>"descriptionrepos/bokushi/src/content/<collection>/<slug>.md<slug>{
"status": "done",
"note_path": "<relative note path>",
"draft_path": "<collection>/<slug>.md",
"description": "<generated description>",
"issues": ["<any issues found>"],
"suggestions": ["<improvement suggestions>"]
}## 主题报告:<hub_title>
### 涉及笔记 (N 篇)
- <title> (hub, <char_count>字)
- <title> (<char_count>字)
- ...
### 主题地图
- 核心论点:...
- 子话题 A:...(涉及 N 篇)
- 子话题 B:...(涉及 N 篇)
### 重叠与矛盾
- <specific overlaps or contradictions found>
### 缺口
- <missing arguments, incomplete sections>
### 建议大纲
1. 引言:...
2. 第一部分:...(来源:笔记 A、B)
3. 第二部分:...(来源:笔记 C、需要补充)
4. 结论:...{
"status": "done",
"note_path": "<hub note path>",
"related_paths": ["<related note paths>"],
"report": "<full research report markdown>",
"suggested_collection": "<blog/til/monthly>"
}.note-to-blog.jsonpython3 scripts/note-to-blog.py state draft "<note_path>" \
--target "<collection>/<slug>.md" \
--note-repo "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Note/"Fast Track 完成:
✓ 后LLM时代代码Review → repos/bokushi/src/content/blog/llm-code-review.md
- 转换正常,无问题
- 建议:可补充最新的 AI code review 工具对比
✓ SSH私钥加密 → repos/bokushi/src/content/til/ssh-key-encryption.md
- 发现 1 个 TODO 标记需要手动处理Deep Track 完成:
📋 优雅的哲学 (9篇关联)
- 研究报告已生成
- 建议大纲:4 部分,来源涵盖 7 篇笔记
- 下一步?
a) 按大纲写作(调用 Agent 生成初稿)
b) 修改大纲
c) 暂不处理状态更新:
drafted: 2 篇
下次 collect 时这些笔记将不再出现在候选列表中。
草稿均为 hidden: true,需要手动 review 后改为 false 发布。
建议使用 /writing-proofreading 进行审校。
发布后运行 state publish 更新状态:
python3 scripts/note-to-blog.py state publish "<note_path>" --note-repo "..."