From onebrain
Create or update the vault portal (MOC.md) at the vault root : a Map of Content with live Dataview queries, AI summary, and user Pinned section.
npx claudepluginhub kengio/onebrain --plugin onebrainThis skill uses the workspace's default tool permissions.
Creates or updates `MOC.md` at the vault root : a hybrid Map of Content with:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Performs token-optimized structural code search using tree-sitter AST parsing to discover symbols, outline files, and unfold code without reading full files.
Creates or updates MOC.md at the vault root : a hybrid Map of Content with:
Usage:
/moc : create or refresh MOC.md and open it in ObsidianRead vault.yml from the current working directory. Extract folder paths with these defaults if keys are absent:
| Key | Default |
|---|---|
folders.inbox | 00-inbox |
folders.projects | 01-projects |
folders.areas | 02-areas |
folders.knowledge | 03-knowledge |
folders.resources | 04-resources |
folders.agent | 05-agent |
folders.archive | 06-archive |
folders.logs | 07-logs |
If vault.yml does not exist, use all defaults and warn the user:
"vault.yml not found : using default folder paths. Run
/onboardingto set up your vault configuration."
If vault.yml exists but cannot be read or parsed, stop immediately and tell the user:
"vault.yml exists but could not be parsed : aborting. Check vault.yml for syntax errors and try again. Error: [error]."
Store moc_path = {vault_root}/MOC.md.
Collect the following using Glob to count .md files:
.md files under [folders.projects]/ (recursive).md files under [folders.areas]/ (recursive).md files under [folders.knowledge]/ (recursive).md files under [folders.resources]/ (recursive).md files directly in [folders.inbox]/ (non-recursive, direct children only).md file across projects, areas, knowledge, and resources folders. Store its display name (filename without .md extension) and its vault-relative path for use as a wikilink.If a folder does not exist on disk, use count 0 for that folder : this is expected for new vaults.
If the Glob tool returns an error or cannot enumerate a folder that appears to exist, stop immediately and tell the user:
"Could not scan [folder] : MOC.md was not written. Error: [error]. Resolve the issue and try again."
Do not write MOC.md with potentially incorrect counts.
If MOC.md exists:
"Could not read existing MOC.md at [moc_path] : aborting to protect your Pinned section. Error: [error]. Resolve the file access issue and try again."
created: from the frontmatter : store as created_date (fall back to today if absent)is_new_file = false## ๐ Pinnedpinned_content## ๐ Pinned is not found in the existing file, warn the user before continuing:
"Warning: Pinned section (
## ๐ Pinned) not found in existing MOC.md : the default placeholder will be used instead. Any content you added below the last recognized section header may not be preserved." Then use the default pinned block.
If MOC.md does not exist:
created_date to todayis_new_file = trueWrite the complete file. Replace every placeholder in the template with actual values before writing.
Placeholder reference:
| Placeholder | Value |
|---|---|
CREATED_DATE | preserved created: date or today |
TODAY | today's date (YYYY-MM-DD) |
PROJECTS_FOLDER | folders.projects value |
AREAS_FOLDER | folders.areas value |
KNOWLEDGE_FOLDER | folders.knowledge value |
RESOURCES_FOLDER | folders.resources value |
AGENT_FOLDER | folders.agent value |
LOGS_FOLDER | folders.logs value |
ARCHIVE_FOLDER | folders.archive value |
PROJECTS_COUNT | projects_count |
AREAS_COUNT | areas_count |
KNOWLEDGE_COUNT | knowledge_count |
RESOURCES_COUNT | resources_count |
INBOX_COUNT | inbox_count |
FOCUS_LINK | [[vault-relative-path|display-name]] of focus_note : e.g. [[01-projects/alpha/Project Alpha|Project Alpha]]. Use : if no notes found. |
FIRST_RUN_LINE | If is_new_file is true: > ๐ก Install the [Dataview plugin](https://github.com/blacksmithgu/obsidian-dataview) to activate live query sections. : otherwise remove this line entirely from the output; do not insert a blank line where it was. |
PINNED_CONTENT | preserved pinned section (or default below) |
Template:
---
tags: [dashboard, moc]
created: CREATED_DATE
updated: TODAY
---
# ๐ง Vault Portal
> [!info] Agent Summary : updated TODAY
> **PROJECTS_COUNT** projects : **AREAS_COUNT** areas : **KNOWLEDGE_COUNT** knowledge notes : **RESOURCES_COUNT** resources : **INBOX_COUNT** inbox items
> ๐บ Focus: FOCUS_LINK
FIRST_RUN_LINE
## โก Tasks
```tasks
not done
path does not include LOGS_FOLDER
path does not include ARCHIVE_FOLDER
due before in 8 days
sort by priority
sort by due
```
## ๐ Recently Modified
```dataview
TABLE file.mtime AS "Modified"
FROM ""
WHERE !startswith(file.folder, "LOGS_FOLDER") AND !startswith(file.folder, "AGENT_FOLDER") AND !startswith(file.folder, "ARCHIVE_FOLDER") AND file.name != "MOC" AND file.name != "TASKS"
SORT file.mtime DESC
LIMIT 10
```
## ๐ Projects
```dataview
LIST
FROM "PROJECTS_FOLDER"
SORT file.mtime DESC
```
## ๐ Areas
```dataview
LIST
FROM "AREAS_FOLDER"
SORT file.name ASC
```
## ๐ง Knowledge
```dataview
TABLE length(rows) AS "Notes"
FROM "KNOWLEDGE_FOLDER"
GROUP BY file.folder
SORT key ASC
```
## ๐ Resources
```dataview
LIST
FROM "RESOURCES_FOLDER"
SORT file.mtime DESC
```
## ๐ Bookmarks
[[Bookmarks]] : saved URLs and references.
PINNED_CONTENT
Default PINNED_CONTENT (used when no existing Pinned section is found):
## ๐ Pinned
<!-- Add your own permanent links and notes here. The agent will never overwrite this section. -->
If the write fails, stop immediately and tell the user:
"Could not write MOC.md at [moc_path]. Error: [error]. Vault root used: [vault_root]"
MOC.md updated.