Agent skill
obsidian-file-manager
This skill should be used when managing documentation files in an Obsidian vault, including creating session artifacts, moving planning documents from project directories to the vault, updating document lifecycle states (active → processed → archived), searching for documents by tags or content, and automating archival of old documents. Integrates with task-startup/task-wrapup workflows for any coding project.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/obsidian-file-manager
SKILL.md
Obsidian File Manager Skill
Automated file management for Obsidian vault integration via the Local REST API.
Triggers
This skill should be used when:
- Creating session artifacts or documentation in the vault
- Moving planning documents from project directories to vault
- Updating document lifecycle states (active → processed → archived)
- Searching for documents by tags, project, or content
- Automating archival of old documents based on retention policies
- Managing documentation during task-startup/task-wrapup workflows
Quick Start
Prerequisites
- Obsidian with Local REST API plugin installed and enabled
- Ruby 2.7+ installed
- API key configured in
config/.env
Setup
# Configure API key (get from Obsidian → Settings → Local REST API)
echo "OBSIDIAN_API_KEY=your-key" > ~/.claude/skills/obsidian-file-manager/config/.env
chmod 600 ~/.claude/skills/obsidian-file-manager/config/.env
Operations
create - Create new document
~/.claude/skills/obsidian-file-manager/scripts/create_in_vault.rb \
--type session \
--project myproject \
--subject "feature implementation" \
--content "# Session Notes\n\n..." \
--lifecycle active
move - Move file to vault
~/.claude/skills/obsidian-file-manager/scripts/move_to_vault.rb \
--source /path/to/project/docs/plan.md \
--type plan \
--project myproject
update-lifecycle - Change document state
~/.claude/skills/obsidian-file-manager/scripts/update_lifecycle.rb \
--path sessions/myproject/session_myproject_20251124.md \
--lifecycle processed
search - Find documents
~/.claude/skills/obsidian-file-manager/scripts/search_vault.rb \
--query "project:myproject lifecycle:active type:session"
archive - Auto-archive old documents
~/.claude/skills/obsidian-file-manager/scripts/auto_archive.rb --dry-run
Project Partitioning
Files are organized by type first, then by project:
{type}/{project}/filename.md
This enables multi-project support within a single vault. For example:
planning/softtrak/plan_softtrak_auth_system.mdplanning/myotherproject/plan_myotherproject_api_design.md
Document Types
| Type | Directory Pattern | Purpose |
|---|---|---|
| session | sessions/{project}/ | Development session artifacts |
| plan | planning/{project}/ | Implementation plans |
| prd | projects/{project}/ | Product requirements |
| adr, decision | decisions/{project}/ | Architecture decisions |
| investigation | investigations/{project}/ | Research and analysis |
| resource | resources/{project}/ | Reference materials |
Lifecycle States
| State | Description | Auto-Archive |
|---|---|---|
| master | Reference docs | Never |
| active | Currently in use | Never |
| processed | Work complete | After 30 days |
| trash | Abandoned | After 7 days |
| archived | Long-term storage | N/A |
Error Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Configuration error |
| 3 | API error |
| 4 | Validation error |
| 5 | File operation error |
Resources
For detailed documentation, see references/:
references/operations.md- Full parameter documentationreferences/configuration.md- Config file referencereferences/integration.md- Workflow integration patternsreferences/troubleshooting.md- Common issues and solutions
Scripts
All scripts are in scripts/:
create_in_vault.rb- Create new documentsmove_to_vault.rb- Move files to vaultupdate_lifecycle.rb- Change lifecycle statesearch_vault.rb- Search vaultauto_archive.rb- Automatic archival
Core libraries in scripts/lib/:
obsidian_client.rb- REST API wrapperfile_namer.rb- Naming conventionstag_manager.rb- Tag/frontmatter utilities
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?