Skip to main content
subagent

moc-agent — Claude Code subagent: Obsidian maps of content

A Claude subagent that builds and maintains maps of content (MOCs) in an Obsidian vault. Useful once notes pile up in folders with no navigation.

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

What moc-agent does

moc-agent handles navigation inside an Obsidian vault. It spots directories that hold plenty of notes but no map of content, generates a new MOC from a template, and wires it into the rest of the network. Stale maps get repaired too: missing note links are added, dead ones dropped, and topic areas that deserve their own MOC are flagged.

The hierarchy has three tiers, following the LYT system: a home MOC acting as the index, topic maps beneath it, and sub-MOCs for narrow subjects. Every map lives in map-of-content/, is named like MOC - [Topic Name].md, and carries type: moc in its frontmatter. The template ships with a Dataview block that pulls in tagged notes; drop that block if the Dataview plugin is not installed.

Auditing runs on Glob and Grep, so no external scripts are required. When a vault happens to contain moc_generator.py, the agent can invoke it from the vault root instead. Orphaned images are a separate job: PNG, JPG, GIF and SVG files with no incoming links get grouped into gallery notes by category and attached to Visual_Assets_MOC. Nothing is moved on disk. Before writing, the agent confirms that map-of-content/ exists and adapts to whatever folder layout the vault actually uses.

What it helps with

  • create a MOC for a folder full of unlinked notes
  • refresh stale maps after a bulk note import
  • find notes that no map links to
  • group orphaned images into gallery notes
  • keep the MOC network tied to a home index

Example prompts for the agent

  • My vault has a pile of new AI notes and no top-level MOC for them. Sort it out.
  • There are screenshots and diagrams in the attachments folder that nothing links to. Build galleries for them.
  • I imported notes from Notion and my MOCs are out of date. Diff them against the current file tree and fix them.

How to install moc-agent

1claude-code-templates

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

2Manually: put the files in place

.claude/agents/moc-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 moc-agent

How do I install moc-agent in Claude Code?

Run npx claude-code-templates@latest --agent obsidian-ops-team/moc-agent, then make sure the agent file sits at .claude/agents/moc-agent.md.

What does moc-agent do?

It creates new maps of content in an Obsidian vault, updates existing ones, finds notes and images nothing links to, and keeps the MOC network connected.

Does moc-agent need Python or external scripts?

No. The audit uses Glob and Grep. The moc_generator.py script is only used when a vault already provides it.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set361

The whole set →
context7-auto-research This skill retrieves current library and framework references through the Context7 API. Use it when a Claude Code answer needs documentation for React, Next.js, Prisma, or another library. 709installs nextjs-performance-audit This command checks a Next.js project’s Lighthouse results, bundle size, and runtime performance. Use it to find performance issues and get optimization suggestions. 694installs figma-implement-design Turns a Figma node into code that fits your project: pulls the design context, a screenshot and assets over Figma MCP, then maps them onto your components and tokens. 689installs security-audit A workflow skill that walks a web app or API through recon, vulnerability scanning, pentesting, hardening and reporting. 673installs performance-audit Audits codebase performance, locating slow database queries, nested loops, and build bottlenecks. Prioritizes optimizations by system impact and implementation effort. 661installs dependency-audit Audits project dependencies for known CVEs, license compliance issues, and outdated packages across multiple ecosystems. 658installs setup-development-environment A slash command that builds out a dev environment: runtimes, tooling, build setup, linters, configs. Handy when you spin up a project on a fresh machine. 651installs unreal-engine-developer This subagent supports Unreal Engine work in C++ and Blueprints, from project architecture to rendering, multiplayer, and performance profiling. 650installs

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