Vault Manager
Relevant source files
The following files were used as context for generating this wiki page:
The Vault Manager is a system component responsible for the installation, organization, and maintenance of Obsidian-based knowledge repositories (vaults). It facilitates the deployment of structured skill collections into local environments, ensuring that markdown files, property schemas, and specialized database-like views (Bases) are correctly initialized.
The system's primary scope includes managing the lifecycle of a vault, from directory creation to the injection of core assets and configurations. Within the context of the OpenCode Skills Collection, it ensures that technical documentation and agent-specific instructions are accessible and rendered correctly within the Obsidian ecosystem.
Core Architecture and Installation Logic
The Vault Manager utilizes a specialized installer to handle the physical setup of vault resources. This process involves directory validation, file system operations, and the management of skill-specific pointers.
Installation Flow
The installation logic follows a strictly defined path to ensure vault integrity. It checks for existing directories, prompts for overwrite confirmations if necessary, and executes the transfer of bundled skills and metadata.
The diagram shows the logic flow for initializing a new vault or updating an existing one.
Sources: src/skill-pointer/vault-installer.ts, src/__tests__/vault-installer.test.ts
Key Components
| Component | Description |
|---|---|
VaultInstaller | Orchestrates the creation of the vault directory and the copying of source files. |
SkillPointer | Creates symbolic links or references between the vault and the system's global skill registry. |
Bases Manager | Configures .base files for data-driven views within the vault. |
Markdown Processor | Ensures Obsidian Flavored Markdown compatibility during asset transfer. |
Sources: src/skill-pointer/vault-installer.ts, bundled-skills/obsidian-bases/SKILL.md
Data Structure and Content Standards
The Vault Manager enforces specific content standards to ensure compatibility with Obsidian's rendering engine and query capabilities.
Metadata and Properties
Every document managed within the vault must adhere to frontmatter requirements. This metadata is used by the obsidian-bases system to filter, sort, and group information.
This diagram illustrates the relationship between files, their metadata properties, and the database-like views that consume them.
Sources: bundled-skills/obsidian-bases/SKILL.md, bundled-skills/obsidian-markdown/SKILL.md
Obsidian Flavored Markdown (OFM) Integration
The manager supports specialized syntax including:
- Wikilinks: Internal vault connections using
[[Note]]. - Callouts: Highlighted information blocks (e.g.,
> [!info]). - Bases: YAML-based files that render as tables, cards, or lists.
Sources: bundled-skills/obsidian-markdown/SKILL.md:1-120
Visual Documentation and Export
The Vault Manager supports the generation and transformation of vault content into external formats, such as static sites, through integration with VitePress.
Transformation Pipeline
When exporting vault content, the system processes Mermaid diagrams and markdown syntax to ensure high-fidelity rendering in browser environments.
The sequence shows the transformation of internal vault files into a web-ready format.
Sources: bundled-skills/wiki-vitepress/SKILL.md:1-80
Configuration and Formula Management
Vault Manager utilizes the obsidian-bases engine to compute values dynamically within the vault. This involves parsing properties and applying arithmetic or conditional logic.
| Configuration Element | Type | Function |
|---|---|---|
filters | YAML Logic | Defines the scope of files visible in a specific view. |
formulas | Expression | Computes dynamic values like days_until_due. |
views | List | Configures display types such as table, cards, or list. |
Sources: bundled-skills/obsidian-bases/SKILL.md:15-100
Example Formula Implementation
formulas:
days_old: '(now() - file.ctime).days'
status_icon: 'if(done, "✅", "⏳")'
Sources: bundled-skills/obsidian-bases/SKILL.md:140-155
Conclusion
The Vault Manager acts as the bridge between raw skill definitions and a structured, navigable knowledge base. By automating the installation and ensuring adherence to Obsidian-specific standards, it provides a consistent environment for developers and agents to interact with the project's documentation and automated skills.