| name | blog-from-vault |
| description | Generate blog drafts from Obsidian vault notes. Commands: mine (find topics), draft <note> (generate outline+prose), draft-all (batch). |
Blog from Vault
Generate Jekyll-ready blog drafts from Obsidian vault notes.
Configuration
| Setting | Value |
|---|
| Vault Path | ~/obsidian (or $OBSIDIAN_VAULT env var) |
| Output Path | _drafts/ |
| Scan Folders | Projects/, Areas/ |
| Exclude | Daily/, Briefings/, Templates/, Agents/ |
| Min Words | 500 |
Commands
mine - Topic Mining
Scan vault for blog-worthy notes and generate a report.
Process:
- Read all
.md files from Projects/ and Areas/ in the vault
- For each note, evaluate blog-worthiness:
- Word count (>500 = candidate)
- Has structure (headers like ## Overview, ## Architecture, ## Why)
- Has frontmatter (tags, status)
- Recently modified (bonus points)
- Score each note 0-100:
- Word count: 0-40 points (500=20, 1000+=40)
- Structure: 0-30 points (headers, sections)
- Frontmatter: 0-15 points (tags, status)
- Recency: 0-15 points (modified in last 30 days)
- Read
blog-topics-tracker.md to identify already-tracked topics
- Generate report to
_drafts/00-topic-mining-report.md
Output Format:
---
generated: YYYY-MM-DD
type: mining-report
---
# Blog Topic Mining Report
## High Potential (Score 70+)
| Note | Score | Why | Suggested Angle |
|------|-------|-----|-----------------|
| [filename] | [score] | [reasoning] | [blog title idea] |
## Developing (Score 40-69)
| Note | Score | Missing |
|------|-------|---------|
| [filename] | [score] | [what would make it ready] |
## Already Tracked
- [note] → matches "[topic]" in blog-topics-tracker.md
draft <note_name> - Generate Draft
Transform a vault note into a blog draft with outline and prose.
Process:
- Find the note in vault (search Projects/ then Areas/)
- Read the source note content
- Read style references:
blog-helper.md - Voice: personal, conversational, honest. Structure: hook → context → journey → insights → future
blog-post-outlines.md - Format: Hook, numbered sections with bullets, conclusion, links
- Analyze the note to extract:
- Core concept/problem
- Technical details
- Personal motivation (why this matters)
- Challenges and lessons
- Generate Jekyll draft with outline + prose
Output Format:
---
layout: post
title: "[Generated from note title]"
date: YYYY-MM-DD
excerpt: "[One-sentence summary]"
categories: [category]
tags: [tag1, tag2, tag3]
comments: true
source_note: ~/obsidian/[path/to/note.md]
status: draft
---
<!-- OUTLINE -->
## Outline
**Target Length**: [600-1000] words
**Categories**: [categories]
**Tags**: [tags]
**Hook**: "[Compelling opening sentence/anecdote]"
**Section 1: [Title]**
- Bullet point
- Bullet point
**Section 2: [Title]**
- Bullet point
- Bullet point
[... more sections ...]
**Conclusion**: "[Wrap-up thought]"
**Links to include**: [relevant links from note]
---
<!-- FIRST DRAFT -->
## Draft
[Opening paragraph - hook]
<!--more-->
[Rest of 600-1000 words of prose following Graham's style:
- Personal & conversational ("I" statements)
- Honest & vulnerable (share struggles)
- Specific anecdotes and examples
- Technical details made accessible
- Forward-looking ending]
Error Handling:
- Note not found: Report "Note 'X' not found in Projects/ or Areas/"
- Multiple matches: List matches and ask user to specify full path
- Insufficient content: Warn but still attempt draft with available content
draft-all - Batch Draft Generation
Generate drafts for all "High Potential" notes from the mining report.
Process:
- Read
_drafts/00-topic-mining-report.md
- Extract notes from "High Potential" section
- Run
draft command for each note
- Report what was generated
Style Guide Reference
From blog-helper.md:
Voice:
- Personal & Conversational: Use "I" statements, address readers directly
- Honest & Vulnerable: Share struggles and uncertainties
- Reflective: Include self-reflection about learning and growth
- Informal but Thoughtful: Use contractions, maintain clarity
Structure:
- Hook: Start with personal anecdote or specific observation
- Context: Set the scene with background
- Journey: Walk through the experience/project/learning
- Insights: Share what you learned or discovered
- Future: End with forward-looking thoughts or commitments
Wikilink Handling
When processing vault notes:
- Strip
[[wikilinks]] - convert to plain text or ignore
- Preserve code blocks and technical content
- Note image references as "TODO: add image" in outline
Example Invocations
opencode "use blog-from-vault to mine topics from my vault"
opencode "use blog-from-vault to draft VaultAgent"
opencode "use blog-from-vault to draft all high-potential topics"