---
name: vault
description: Connect external knowledge bases (Obsidian, Logseq, markdown folders) to Oracle. Use when user says "vault", "connect vault", "obsidian", "knowledge base", "search notes", or wants to link external note systems to Oracle context.
argument-hint: "[connect <path> | disconnect <name> | search <query> | list]"
zombie: true
archived_reason: 'moved to zombie tier via #327 (usage audit, 3,685 sessions mined)'
archived_date: 2026-05-13
metadata:
  internal: true
---

# /vault - External Knowledge Connection

> "AI จะเก่งกับเราจริง ก็ต่อเมื่อมันได้เข้าถึงความรู้ของเรา"

Connect external knowledge bases so Oracle can think from ALL your accumulated knowledge, not just the current repo.

## Step 0: Ground (date-stamp + root capture)

Run before any mode — current-time reference for the AI (#301) plus absolute
`$PSI` for the registry path (CONVENTIONS.md).

```bash
date "+🕐 %H:%M %Z (%A %d %B %Y)"
ORACLE_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
PSI="$ORACLE_ROOT/ψ"
VAULT_REGISTRY="$PSI/vault.json"
```

## Usage

```
/vault                                    # list connected vaults
/vault list                               # same
/vault connect ~/obsidian-vault           # register a vault
/vault connect ~/notes --name "personal"  # with label
/vault disconnect personal                # remove
/vault search "topic"                     # search across all vaults
/vault search "topic" --vault personal    # search specific vault
```

## Registry: `ψ/vault.json`

```json
{
  "vaults": [
    { "name": "obsidian", "path": "~/Documents/obsidian-vault", "type": "obsidian" },
    { "name": "notes", "path": "~/notes", "type": "markdown" }
  ],
  "updated": "2026-04-10T12:00:00Z"
}
```

---

## Mode 1: List (default)

Read `ψ/vault.json`. Display connected vaults:

```
📚 Connected Vaults (2)

  #  Name        Type       Path                          Files
  ── ─────────── ────────── ───────────────────────────── ──────
  1  obsidian    obsidian   ~/Documents/obsidian-vault    1,234
  2  notes       markdown   ~/notes                       89

  /vault connect <path>    — add a new vault
  /vault search "topic"    — search across all
```

If no vaults connected:
```
📚 No vaults connected.

  /vault connect ~/path/to/notes    — connect your first vault
```

## Mode 2: Connect

### `/vault connect <path> [--name <label>]`

1. Verify path exists and is a directory
2. Auto-detect vault type:

| Type | Detection | Special handling |
|------|-----------|-----------------|
| `obsidian` | Has `.obsidian/` dir | Parse `[[wikilinks]]`, respect `.obsidian/app.json` |
| `logseq` | Has `logseq/` dir | Parse `((block refs))` |
| `markdown` | Default | Plain .md files |
| `notion` | Has Notion export structure | Handle nested folders |

3. Count .md files: `find <path> -name "*.md" | wc -l`
4. Auto-generate name from directory basename if `--name` not given
5. Save to `ψ/vault.json`

```
📚 Connected: obsidian (1,234 files)
   Path: ~/Documents/obsidian-vault
   Type: obsidian (auto-detected)
```

### Validation

- Path must exist and be readable
- Warn if path is inside current repo (use ψ/ instead)
- Warn if >10,000 files (large vault — search may be slow)

## Mode 3: Disconnect

### `/vault disconnect <name>`

Remove from `ψ/vault.json` with confirmation:

```
Remove vault "obsidian" (~/Documents/obsidian-vault)?
  (Only removes the connection — your files are untouched)
  [Y/n]
```

## Mode 4: Search

### `/vault search "topic" [--vault <name>]`

Search across all connected vaults (or a specific one):

```bash
# Search all vaults
for vault in $(cat ψ/vault.json | jq -r '.vaults[].path'); do
  grep -rl --include="*.md" "topic" "$vault" 2>/dev/null
done
```

Display results grouped by vault:

```
📚 Search: "oracle" across 2 vaults

  obsidian (3 matches):
    ~/obsidian/projects/oracle-notes.md (5 mentions)
    ~/obsidian/daily/2026-03-15.md (2 mentions)
    ~/obsidian/ideas/ai-collaboration.md (1 mention)

  notes (1 match):
    ~/notes/oracle-setup.md (3 mentions)

  💡 Read a file: just ask me to read any of these paths
```

### Context reading

After search, if user asks about a result, read the file directly:

```bash
# Read matched file for context
cat ~/obsidian/projects/oracle-notes.md
```

## Integration with Other Skills

| Skill | How vault helps |
|-------|----------------|
| `/trace --deep` | Include vault search results alongside ψ/ and git |
| `/learn` | Output study notes to a vault |
| `/recap` | Pull from vault's daily notes for context |
| `/rrr` | Reference vault learnings in retrospectives |

When these skills search for context, they should check `ψ/vault.json` and include vault paths in their search scope.

---

## Rules

- Never modify vault files without explicit user permission
- Vault paths are stored as-is (with `~`) — expand at search time
- Connection is one-way: Oracle reads from vaults, doesn't write to them (unless user asks)
- `ψ/vault.json` is committable — shared across sessions

ARGUMENTS: $ARGUMENTS


---
Source attribution: Soul-Brews-Studio
Original project: https://github.com/Soul-Brews-Studio/arra-oracle-skills-cli/blob/ea0e758759b56621ee3907089ed48476b88379e4/src/skills/.archive/vault/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2025-2026 Nat Weerawan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: Soul-Brews-Studio
Original project: https://github.com/Soul-Brews-Studio/arra-oracle-skills-cli/blob/ea0e758759b56621ee3907089ed48476b88379e4/src/skills/.archive/vault/SKILL.md
Attribution basis: Source repository record

Fields of work: Design, Education & Research, Marketing
Roles: Content Marketer, Researcher, UX Writer
Specialties: API
Tools: Obsidian, Logseq
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 8c27b1ab7eb32c42144785b4f975b66675047676da09802039cf13fe23d7f3f8
