Obsidian batch yaml

From JaimeParker/stable-jarvis · View interactive version

Obsidian batch yaml is an AI agent skill from the GitHub repository JaimeParker/stable-jarvis. Autonomously scans specific directories (00, 10, 20, 30) in an Obsidian vault, analyzes note content, and intelligently merges AI-generated YAML frontmatter (tags, summary, aliases) into the notes.

How to use this skill

Skill file

Skill: Obsidian Batch YAML

Description

This skill automates the process of enhancing your Obsidian "Cyber Brain" by adding structured, AI-suitable YAML frontmatter to existing Markdown notes. It is designed to run autonomously across your most active research and project folders.

Trigger: Use when the user wants to "standardize", "process", or "add metadata/tags/summaries" to existing notes in the 00, 10, 20, or 30 directories.

Input: Obsidian vault directories 00, 10, 20, and 30.

Output: Updated Markdown notes with merged YAML frontmatter including tags, summary, and aliases.


Workflow

Follow this iterative, batch-based process to execute the skill.

1. Discovery

  1. User Declaration (Optional): Check if the user has explicitly provided a list of notes to process. This can be:
  1. Automatic Discovery: If no explicit list is provided, identify all Markdown (.md) files within the target directories:
  1. Filter & Batch: Exclude any files that are clearly non-content (e.g., templates, system logs). Organize the remaining files into batches of 5 notes to maintain efficiency.

2. Batch Processing Loop

For each batch of 5 notes, perform the following steps for every note:

A. Read Taxonomy & Analyze
  1. Read Tag Taxonomy (MANDATORY): Before generating any tags, you MUST read the controlled tag vocabulary at 60 System/Tag Taxonomy.md. This file defines the approved tag categories:
  1. Read Note: Use mcp_obsidian_read_note to load the full content, including any existing YAML.
  2. Analyze Content: Analyze the body text to generate the following metadata:
B. Intelligent Merge Logic
  1. Parse Existing YAML: If the note has a frontmatter block (between --- delimiters), extract the existing fields.
  2. Merge Data:
  1. Construct New YAML: Assemble the merged fields into a clean YAML block at the top of the file.
C. Tag Validation (Post-Generation Check)

Before writing, validate the generated tags:

  1. Format Check: All tags must be lowercase with hyphens (kebab-case). Reject tags that contain underscores, uppercase letters, spaces, or special characters.
  2. Noise Rejection: Reject tags that are:
  1. Singleton Warning: If a newly created tag is not in the taxonomy, flag it for review. It should only be added if it applies to at least 2 notes.
  2. Deduplicate: Remove exact duplicates and case-variants (e.g., Offline-RL and offline-rl → keep offline-rl).
D. Write Update
  1. Apply Update: Use mcp_obsidian_patch_note (if replacing only the top block) or mcp_obsidian_write_note to save the updated note.
  2. Log Progress: Keep a brief internal log of which files have been updated in this turn.

3. Continuation & Finalization

  1. Check for Next Batch: After completing a batch, automatically proceed to the next until all identified files are processed.
  2. Final Report: Once the entire scope is complete, provide a summary to the user:

User Declaration Format

Users can explicitly declare which notes should be processed by providing:

Single Note:

Single Folder:

"Process this folder: Research"
"Add YAML to: 10 Projects"
"Handle all notes in: 20 Areas/ML Systems"

Single Note:

"Process this note: My Research Note.md"
"Add YAML to: 10 Projects/AI Research.md"

Multiple Notes (List Format):

["00 Inbox/Note 1.md", "10 Projects/Note 2.md", "20 Areas/Note 3.md"]

Mixed Format (Folders and Notes):

["Research/Deep Learning", "10 Projects/AI Systems.md", "00 Inbox/Quick Notes.md"]

Declaration Rules:

Batch Processing:

If a user provides more than 5 items (folders or notes), they will automatically be split into batches of 5 and processed iteratively.


Technical Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.