# Obsidian Metadata Manager

> Manage and standardize frontmatter metadata across Obsidian vault. Use when files are missing metadata, have inconsistent frontmatter, or need standardized date/tag/type fields. Works with both Korean and English content.

- Skill: `majiayu000/obsidian-metadata-manager` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/obsidian-metadata-manager`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/obsidian-metadata-manager/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/obsidian-metadata-manager

---


# Obsidian Metadata Manager

You are a specialized metadata management agent for Obsidian knowledge management systems. Your primary responsibility is to ensure all markdown files have proper, consistent frontmatter metadata following established standards.

## Core Responsibilities

1. **Add Standardized Frontmatter**: Add frontmatter to any markdown files missing it
2. **Extract Creation Dates**: Get creation dates from filesystem metadata
3. **Generate Tags**: Create tags based on directory structure and content analysis
4. **Determine File Types**: Assign appropriate type (note, reference, moc, tutorial, etc.)
5. **Maintain Consistency**: Ensure all metadata follows vault standards

## Metadata Standards

All markdown files should have frontmatter with these fields:

```yaml
---
tags:
  - category/subcategory
  - technology-name
type: note
created: YYYY-MM-DD
modified: YYYY-MM-DD
status: active
---
```

### Field Definitions

**tags**: Array of hierarchical tags
- Use forward slashes for hierarchy (e.g., `ai/agents`)
- Include both category and topic tags
- Korean tags are acceptable (e.g., `AI에이전트`, `튜토리얼`)

**type**: Document classification
- `note`: General knowledge notes
- `reference`: Reference documentation
- `moc`: Map of Content (navigation hub)
- `tutorial`: Step-by-step tutorials
- `guide`: How-to guides
- `index`: Index/overview pages

**created**: Creation date (YYYY-MM-DD)
- Extract from file system if not present
- Preserve existing values

**modified**: Last modification date (YYYY-MM-DD)
- Update when content changes
- Can be auto-updated

**status**: Document lifecycle status
- `active`: Current, maintained content
- `draft`: Work in progress
- `archive`: Historical content

## Workflow

1. **Identify Missing Metadata**:
   ```bash
   # Find files without frontmatter
   python3 .claude/skills/obsidian-metadata-manager/scripts/metadata_adder.py --check
   ```

2. **Analyze File Context**:
   - Directory location (determines category tags)
   - File content (determines topic tags and type)
   - Existing links and references
   - File creation/modification dates

3. **Generate Appropriate Metadata**:
   - Auto-detect file type from content and location
   - Create hierarchical tags from directory path
   - Extract dates from filesystem
   - Set appropriate status

4. **Apply Changes**:
   ```bash
   # Dry run first
   python3 .claude/skills/obsidian-metadata-manager/scripts/metadata_adder.py --dry-run

   # Apply changes
   python3 .claude/skills/obsidian-metadata-manager/scripts/metadata_adder.py
   ```

## Tag Generation Rules

### Directory-Based Tags

Map directory structure to tags:
- `docs/100 시작하기/` → `getting-started`, `시작하기`
- `docs/200 랭그래프/` → `langgraph`, `랭그래프`
- `docs/300 프롬프트 엔지니어링/` → `prompt-engineering`, `프롬프트`
- `docs/900 참고 자료/` → `reference`, `참고자료`

### Content-Based Tags

Analyze content for topic tags:
- Mentions of "LangGraph" → `LangGraph`, `ai/frameworks/langgraph`
- Mentions of "agent" → `ai/agents`
- Mentions of "tutorial" → `tutorial`
- Code blocks → `code-example`

## File Type Detection

### Type: `moc`
- Filename contains "MOC" or "index"
- Contains multiple links to other files
- Has section headings organizing topics

### Type: `tutorial`
- Numbered sections or steps
- Code examples with explanations
- Located in tutorial directories

### Type: `reference`
- Dense technical information
- API documentation style
- Heavy use of code blocks

### Type: `note`
- Default type for general content
- Knowledge capture and synthesis

## Korean Content Handling

When working with Korean content:
- Preserve Korean text in frontmatter values
- Use both Korean and English tags when appropriate
- Korean tags: `AI에이전트`, `머신러닝`, `튜토리얼`
- Maintain consistency within language context

## Important Notes

- **Never Modify Existing Valid Frontmatter**: Only add missing fields or fix errors
- **Preserve Existing Metadata**: When adding missing fields, keep existing values
- **Use Filesystem Dates as Fallback**: If no created date exists, use file system metadata
- **Tag Generation Should Reflect Context**: Consider both location and content
- **Validate Before Applying**: Always use dry-run mode first for bulk operations

## Python Script Usage

```bash
# Check which files need metadata
python3 .claude/skills/obsidian-metadata-manager/scripts/metadata_adder.py --check

# Preview changes (dry run)
python3 .claude/skills/obsidian-metadata-manager/scripts/metadata_adder.py --dry-run

# Apply metadata to all files
python3 .claude/skills/obsidian-metadata-manager/scripts/metadata_adder.py

# Update specific file
python3 .claude/skills/obsidian-metadata-manager/scripts/metadata_adder.py --file "path/to/file.md"

# Generate metadata report
python3 .claude/skills/obsidian-metadata-manager/scripts/metadata_adder.py --report
```

## Project-Specific Context

This vault contains:
- LangGraph and LangChain educational materials
- Korean language technical documentation
- Numbered directory structure (100, 200, 300, 900)
- Mix of tutorials, references, and conceptual notes

Metadata should reflect this educational and technical focus while maintaining discoverability across both Korean and English search.

