Skip to main content
subagent

metadata-agent — Claude Code subagent: what it does, how to install

Standardizes frontmatter in Obsidian markdown vaults. It detects missing metadata, inserts tags, file categories, and creation dates.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --agent obsidian-ops-team/metadata-agent
Open on GitHub

What metadata-agent does

This subagent inspects markdown documents in an Obsidian vault to bring YAML frontmatter into uniform shape. When a note lacks metadata, the agent inserts standard fields: tags, type, created, modified, and status. It pulls creation timestamps directly from filesystem attributes and assigns hierarchical tags based on note content and folder placement. File types follow a predefined scheme, covering categories like note, moc, reference, template, and daily-note.

Execution relies on a Python script named metadata_adder.py triggered through the Bash tool. The workflow starts with a --dry-run execution to preview proposed updates before writing to disk. Existing valid frontmatter remains untouched. The agent updates notes only when metadata is missing or contains malformed fields.

The prompt references absolute local paths such as /Users/cam/VAULT01/System_Files/Scripts/metadata_adder.py. Adapting this setup to another environment requires updating those directory paths first.

What it helps with

  • insert missing frontmatter blocks across vault markdown files
  • populate note creation dates from filesystem attributes
  • generate hierarchical tags from note context and folder structure
  • assign document categories and status flags systematically

Example prompts for the agent

  • Run metadata-agent in dry-run mode to see notes missing frontmatter
  • Standardize metadata across markdown files in the reference directory
  • Use metadata-agent to assign tags and document types to recent notes

How to install metadata-agent

1claude-code-templates

npx claude-code-templates@latest --agent obsidian-ops-team/metadata-agent

2Manually: put the files in place

.claude/agents/metadata-agent.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about metadata-agent

How to install metadata-agent in Claude Code?

Run npx claude-code-templates@latest --agent obsidian-ops-team/metadata-agent in your terminal. The subagent definition will be saved to .claude/agents/metadata-agent.md.

What does metadata-agent do?

It scans Obsidian vault notes and inserts standardized frontmatter headers containing tags, timestamps, document types, and status values.

Why does the workflow use a dry-run flag?

Running python3 /Users/cam/VAULT01/System_Files/Scripts/metadata_adder.py --dry-run previews every file that needs frontmatter, so you can inspect planned modifications before updating files.

Similar subagents

All subagents for Notes, tasks and projects →

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor