Obsidian Code Vault
Add information to the Obsidian vault at ~/obsidian/vaults/code/.
Vault Structure
The vault uses a topic-based organization:
- •Topic files at root:
python.md,css.md,authentication.md, etc. - •Topic folders for larger subjects:
typescript/with subtopic files likebasics.md,tsconfig.json.md - •Project folders:
Fusion/,reviewsion/, etc.
Workflow
- •
Understand the content - What topic does this information belong to?
- •
Search for existing location - Use Glob and Grep to find:
- •Existing topic file that matches (e.g.,
python.mdfor Python content) - •Existing topic folder with relevant subtopics (e.g.,
typescript/) - •Related content that suggests where this belongs
- •Existing topic file that matches (e.g.,
- •
Read for context - Before writing, read the target file to:
- •Understand the existing format and style
- •Find the appropriate section or heading
- •Avoid duplicating existing content
- •
Determine placement:
- •If a matching topic file exists → append to appropriate section
- •If a topic folder exists → add to relevant subtopic file or create new one
- •If no match → create new topic file at root
- •If unclear → use AskUserQuestion to clarify
- •
Write the content - Match the existing format of the target file
Format Guidelines
Observe the target file's format. Common patterns in this vault:
- •Headers use
##for main sections - •Code blocks with language tags
- •Tables for comparisons
- •Bullet lists for collections
- •Links in format
[Title](URL)or- [Title](URL)
Callouts
Use Obsidian callouts for highlighting important information:
> [!tip] Always expanded > Content here > [!note]- Collapsed by default > Content here > [!warning]+ Expanded by default > Content here
Types: tip, note, warning, error, bug, info, question, example
Modifiers:
- •No suffix: always expanded
- •
-: collapsed by default - •
+: expanded by default
Use callouts for:
- •Important warnings or gotchas
- •Tips and best practices
- •Code examples that need context
- •Errors and bugs to watch out for
Examples
<example> Context: User learned about Python virtual environmentsUser: "Add to notes: uv is faster than pip for creating venvs"
Steps:
- •Search: Find
python.mdexists - •Read: See it has sections on Python environment, venv, uv
- •Write: Append to the relevant section matching existing format </example>
User: "Note this down - tsconfig paths need baseUrl set first"
Steps:
- •Search: Find
typescript/tsconfig.json.mdexists - •Read: Check existing content and format
- •Write: Add to appropriate section </example>
User: "Add to notes: Docker compose healthcheck syntax"
Steps:
- •Search: No docker.md or docker/ found
- •Ask: "Should I create a new
docker.mdfile, or add this to an existing file?" - •Write: Based on user response </example>
Error Handling
- •File not found: Create new topic file at vault root
- •Unclear placement: Ask user with AskUserQuestion
- •Format mismatch: Adapt to target file's existing style