---
name: php186-skill-23492
description: "在 Windows 上存储 Obsidian 库，并通过 WSL 访问。直接通过挂载路径（如 /mn...）读取、搜索、创建和编辑 Markdown 笔记。"
---

# obsidian-wsl-vault-access

## Obsidian Vault (WSL)

 

Use this skill when the vault lives on Windows but is being accessed from WSL through ` /mnt/<drive> `.

 

## Workflow

 

1. Identify the vault root from the user-provided path before doing broad searches or edits.
2. Operate on the filesystem path directly; Obsidian does not require a special API for normal note work.
3. Preserve existing frontmatter, wiki-links, embeds, headings, and folder structure unless the user asks to change them.

 

## Vault Location

 

Do not assume a fixed vault path.

 

Common patterns:

 

- Windows: ` C:Users<user>Documents<vault> `
- Windows: ` D:Notes<vault> `
- WSL: ` /mnt/c/Users/<user>/Documents/<vault>/ `
- WSL: ` /mnt/d/Notes/<vault>/ `

 

Treat the vault root as the directory containing the Obsidian note tree.

 

## Path Translation

 

```
Windows -> WSL: C:pathtofile -> /mnt/c/path/to/file
Windows -> WSL: D:pathtofile -> /mnt/d/path/to/file
WSL -> Windows: /mnt/c/path     -> C:/path
WSL -> Windows: /mnt/d/path     -> D:/path
```

 

Replace backslashes with forward slashes and lowercase the drive letter under ` /mnt/<drive> `.

 

## Common Operations

 

### Read a note

 

```
cat "/mnt/<drive>/<vault>/<path>/<filename>.md"
```

 

### Search the vault

 

Prefer ` rg ` for speed:

 

```
rg "search term" "/mnt/<drive>/<vault>/"
```

 

### Edit a note

 

Edit the markdown file in place with targeted changes instead of rewriting the whole note when possible.

 

### Create a new note

 

Use a minimal template when metadata is needed:

 

```
---
title: Note Title
tags: []
---

# Note Title
```

 

## Obsidian Conventions

 

- Notes are markdown files ending in ` .md `
- YAML frontmatter is commonly used for metadata such as ` title `, ` tags `, and ` aliases `
- Internal links use ` [[Note Name]] `
- Embeds use ` ![[Note Name]] `
- Callouts use ` > [!type] `

 

## Working Rules

 

- Confirm the vault root before making broad searches or bulk changes
- Prefer targeted edits over full-file rewrites
- Keep filenames, wiki-links, and folder structure consistent with the existing vault
