Context Management Skill
Purpose: Seamless integration between your Obsidian knowledge base and Claude Code sessions. Find relevant notes, load project context, and manage captures from Telegram.
Quick Reference
obs CLI Commands
Search
obs search "query" # Full-text search obs search --tag "project/pai" # Tag-based search obs semantic "concept" # Semantic similarity search
Read/Write
obs read "Note Title" # Read a specific note obs write "Title" --tag inbox # Create a new note
Browse
obs tags # List all tags obs tags --counts # Tags with usage counts obs recent # Recently modified notes obs incoming # Unprocessed inbox items
Context
obs context project-name # Load project context
Embeddings
obs embed # Build/update embeddings obs stats # Embedding statistics
ingest CLI Commands
Telegram capture
ingest poll # Fetch new messages ingest process # Process pending → notes ingest status # View message states
Maintenance
ingest retry # Retry failed messages ingest clear # Clear all (testing)
Workflows
- load-context.md
Purpose: Load project-specific context into current session Trigger: "load context for X", "get project context", "what do I know about X"
- search-notes.md
Purpose: Search personal notes using text, tags, or semantic similarity Trigger: "search my notes for", "find notes about", "semantic search"
- process-incoming.md
Purpose: Review and process captured content from Telegram Trigger: "check incoming", "process captures", "what's in my inbox"
- capture-content.md
Purpose: Capture new content to Obsidian via direct write Trigger: "save this to obsidian", "capture this", "add to my notes"
Routing Logic
User Intent → Workflow Selection
"Load context for PAI project" → load-context.md "Search notes about embeddings" → search-notes.md "What's in my inbox?" → process-incoming.md "Save this to my notes" → capture-content.md
Integration with Claude Code
This skill enables context-aware coding sessions:
-
Start of session: Load relevant project context
-
During coding: Search notes for reference material
-
After research: Capture findings to Obsidian
-
End of session: Auto-saved via hooks
Example Session Flow
User: "Load context for the API redesign project" → obs context api-redesign → Returns: Related notes, decisions, meeting notes
User: "What did we decide about authentication?" → obs semantic "authentication decision" → Returns: Relevant note excerpts
User: "Save this architecture decision to my notes" → obs write "API Auth Decision" --tag "project/api" --tag "decision" → Creates note in vault
Vault Structure
Expected Obsidian vault organization:
~/Documents/personal/ ├── Inbox/ # New captures land here ├── Projects/ # Project-specific notes │ └── project-name/ ├── Reference/ # Technical references ├── Archive/ # Completed/old items └── attachments/ # Images, PDFs, etc.
Tag Conventions
Tag Pattern Purpose
project/<name>
Project association
incoming
Unprocessed captures
decision
Architectural decisions
meeting
Meeting notes
reference
Reference material
todo
Action items
Configuration
Environment variables (in ~/.claude/.env ):
OBSIDIAN_VAULT_PATH=~/Documents/personal OPENAI_API_KEY=sk-... # For embeddings & vision
State databases:
-
Embeddings: ~/.claude/embeddings.db
-
Ingest state: ~/.claude/ingest-state.db
Troubleshooting
Semantic search not working
obs stats # Check if embeddings exist obs embed # Rebuild embeddings
Telegram captures not appearing
ingest test # Verify bot connection ingest poll # Fetch new messages ingest status # Check message states
Note not found
obs tags --counts # See what tags exist obs recent # Check recent files
Related Skills
-
research - Multi-source web research
-
fabric - Pattern-based content processing
References
-
Obsidian: https://obsidian.md
-
OpenAI Embeddings: https://platform.openai.com/docs/guides/embeddings