Agent SkillsAr9av/obsidian-wiki › wiki-switch

wiki-switch

GitHub

管理多个 Obsidian Wiki 配置档案。支持切换默认激活的 Vault、列出所有可用档案、查看配置详情及创建新档案,通过符号链接实现持久化切换。

.skills/wiki-switch/SKILL.md Ar9av/obsidian-wiki

Trigger Scenarios

/wiki-switch NAME switch to my work wiki switch vault change wiki which wiki am I on list my wikis show my vaults create a new vault config add a new wiki profile

Install

npx skills add Ar9av/obsidian-wiki --skill wiki-switch -g -y
More Options

Non-standard path

npx skills add https://github.com/Ar9av/obsidian-wiki/tree/main/.skills/wiki-switch -g -y

Use without installing

npx skills use Ar9av/obsidian-wiki@wiki-switch

指定 Agent (Claude Code)

npx skills add Ar9av/obsidian-wiki --skill wiki-switch -a claude-code -g -y

安装 repo 全部 skill

npx skills add Ar9av/obsidian-wiki --all -g -y

预览 repo 内 skill

npx skills add Ar9av/obsidian-wiki --list

SKILL.md

Frontmatter
{
    "name": "wiki-switch",
    "description": "Switch between multiple Obsidian wiki vault profiles. Use this skill when the user says \"\/wiki-switch NAME\", \"switch to my work wiki\", \"switch vault\", \"change wiki\", \"which wiki am I on\", \"list my wikis\", \"show my vaults\", \"create a new vault config\", or \"add a new wiki profile\". The skill manages named config files at ~\/.obsidian-wiki\/config.NAME and activates one by symlinking it to ~\/.obsidian-wiki\/config."
}

Wiki Switch — Manage Multiple Vault Profiles

Each vault is a complete config file at ~/.obsidian-wiki/config.<name>. The active vault is whichever file ~/.obsidian-wiki/config symlinks to. Switching vaults means re-pointing that symlink.

Switch vs. inline targeting. /wiki-switch <name> changes your persistent default (re-points the symlink, affecting all future requests). To touch a different vault for just one request without changing your default, use the inline @name override in any request (e.g. @work save this, wiki-query @personal about X). The @name override is handled by the Config Resolution Protocol in llm-wiki/SKILL.md, not by this skill — it resolves ~/.obsidian-wiki/config.<name> for that one invocation and never re-points the symlink.

Dispatch

Parse the invocation and route to the right section:

Invocation Action
/wiki-switch <name> Switch
/wiki-switch list List
/wiki-switch show [name] Show
/wiki-switch new <name> New
/wiki-switch (no args) List (treat as list)
@<name> … (inline, in any request) → Not this skill — the Config Resolution Protocol resolves that vault for one invocation without re-pointing the symlink

Switch (default action)

Activate a named vault profile.

  1. Verify ~/.obsidian-wiki/config.<name> exists. If not, tell the user the vault doesn't exist and list what's available (run List).
  2. Run:
    ln -sf ~/.obsidian-wiki/config.<name> ~/.obsidian-wiki/config
    
  3. Read OBSIDIAN_VAULT_PATH from the newly active config.
  4. Confirm to the user:
    Switched to vault: <name>
    Vault path: <value of OBSIDIAN_VAULT_PATH from the config>
    

List

Show all registered vault profiles and which is active.

  1. Find all files matching ~/.obsidian-wiki/config.* (exclude config itself — that's the symlink).
  2. Resolve the current symlink target: readlink ~/.obsidian-wiki/config
  3. For each config file, read the first non-empty comment line (lines starting with #) as a human description of the vault. Fall back to the file's suffix as the label if no comment exists.
  4. Display:
    Vaults:
      personal   My personal research wiki    ← active
      work       Work projects wiki
    
    Mark the active one with ← active. If the symlink is broken or config doesn't exist, show (none active).

Show

Print the full config for a vault.

  • If a name is given, read ~/.obsidian-wiki/config.<name>.
  • If no name given, read ~/.obsidian-wiki/config (the active vault).
  • If the file doesn't exist, tell the user and list what's available.
  • Print the file contents verbatim (redact any lines containing API_KEY or SECRET — show *** instead of the value).

New

Scaffold a new vault config from the current active config as a template.

  1. Check ~/.obsidian-wiki/config.<name> doesn't already exist. Abort if it does.
  2. Copy the active config:
    cp ~/.obsidian-wiki/config ~/.obsidian-wiki/config.<name>
    
  3. Read the copied config. Config files use # --- Section name --- comment headers to group fields into sections (e.g., # --- Vault-specific ---, # --- Vault-independent ---, # --- Secrets ---). Use these sections to determine what to ask about:
    • Fields in sections labeled "vault-specific", "paths", or similar → ask the user for new values
    • Fields in sections labeled "vault-independent", "global", "shared" → keep as-is (copy over unchanged)
    • Fields in sections labeled "secrets" → ask if the new vault uses the same credentials or different ones
    • If there are no section headers, present all fields and let the user decide which to change
  4. Ask the user for updated values for the vault-specific fields. Use the current values as visible defaults — the user only needs to supply what differs.
  5. Write the updated values into ~/.obsidian-wiki/config.<name>.
  6. Update the top comment line to describe the new vault (e.g., # Obsidian Wiki — <name> vault).
  7. Confirm:
    Created: ~/.obsidian-wiki/config.<name>
    Run `/wiki-switch <name>` to activate it, then run `wiki-setup` to initialise the new vault.
    
    Do not switch automatically — let the user decide when to activate.

Version History

  • 1f290b0 Current 2026-07-05 15:00

Same Skill Collection

.skills/codex-history-ingest/SKILL.md
.skills/daily-update/SKILL.md
.skills/hermes-history-ingest/SKILL.md
.skills/openclaw-history-ingest/SKILL.md
.skills/pi-history-ingest/SKILL.md
.skills/skill-creator/SKILL.md
.skills/wiki-context-pack/SKILL.md
.skills/wiki-dashboard/SKILL.md
.skills/wiki-history-ingest/SKILL.md
.skills/wiki-import/SKILL.md
.skills/wiki-rebuild/SKILL.md
.skills/wiki-research/SKILL.md
.skills/wiki-setup/SKILL.md
.skills/wiki-stage-commit/SKILL.md
.skills/wiki-synthesize/SKILL.md
.skills/wiki-update/SKILL.md
.skills/claude-history-ingest/SKILL.md
.skills/copilot-history-ingest/SKILL.md
.skills/cross-linker/SKILL.md
.skills/graph-colorize/SKILL.md
.skills/impl-validator/SKILL.md
.skills/llm-wiki/SKILL.md
.skills/memory-bridge/SKILL.md
.skills/tag-taxonomy/SKILL.md
.skills/vault-skill-factory/SKILL.md
.skills/wiki-agent/SKILL.md
.skills/wiki-capture/SKILL.md
.skills/wiki-dedup/SKILL.md
.skills/wiki-digest/SKILL.md
.skills/wiki-export/SKILL.md
.skills/wiki-ingest/SKILL.md
.skills/wiki-lint/SKILL.md
.skills/wiki-query/SKILL.md
.skills/wiki-status/SKILL.md

Metadata

Files
0
Version
1f290b0
Hash
8e9b6c8c
Indexed
2026-07-05 15:00

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-09 11:08
浙ICP备14020137号-1 $Carte des visiteurs$