# metadata-agent

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

- subagent · `type=agent` · Claude Code · 868 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/obsidian-ops-team/metadata-agent.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/metadata-agent

## What it 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.

## Requirements
- Works with: Obsidian

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent obsidian-ops-team/metadata-agent
```

2. **Manually: put the files in place**
- File: `.claude/agents/metadata-agent.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/metadata-agent.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/metadata-agent.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/obsidian-ops-team/metadata-agent.md

## When to use it
- 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
- 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

## Similar
- [context-manager](https://affpapa.org/en/nevibecode/agents/context-manager.md) — subagent · 10638 installs
- [code-architect](https://affpapa.org/en/nevibecode/agents/code-architect.md) — subagent · 1439 installs
- [search-specialist](https://affpapa.org/en/nevibecode/agents/voltagent-community-search-specialist.md) — subagent · 6886 installs
- [content-marketer](https://affpapa.org/en/nevibecode/agents/voltagent-community-content-marketer.md) — subagent · 4038 installs
- [product-manager](https://affpapa.org/en/nevibecode/agents/product-manager.md) — subagent · 1104 installs
- [project-manager](https://affpapa.org/en/nevibecode/agents/project-manager.md) — subagent · 1064 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
