agentleFS
chobizzychobizzy/llm-wiki/skills/wiki-switch/SKILL.md

wiki-switch

Skill3 starsChanged 11 days agoMITView on GitHub

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 ~/.llm-wiki/config.NAME and activates one by symlinking it to ~/.llm-wiki/config.

  • Reads credentials

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify ~/.llm-wiki/config.<name> exists.

    line 42
  2. Very specific:

    Read OBSIDIAN_VAULT_PATH from the newly active config.

    line 47
  3. Very specific:

    If a name is given, read ~/.llm-wiki/config.<name>.

    line 77
  4. Very specific:

    If no name given, read ~/.llm-wiki/config (the active vault).

    line 78
  5. Distinctive:

    If the file doesn't exist, tell the user and list what's available.

    line 79
  6. Very specific:

    Check ~/.llm-wiki/config.<name> doesn't already exist.

    line 88
  7. Very specific:

    Read the copied config. Config files use # --- Section name --- comment headers to group fields into sections (e.g., # --- Vault-specific …

    line 93
  8. Distinctive:

    If there are no section headers, present all fields and let the user decide which to change

    line 97
  9. Distinctive:

    Ask the user for updated values for the vault-specific fields.

    line 98
  10. Very specific:

    Write the updated values into ~/.llm-wiki/config.<name>.

    line 99
  11. Very specific:

    Update the top comment line to describe the new vault (e.g., # Obsidian Wiki — <name> vault).

    line 100
  12. Distinctive:

    Do not switch automatically — let the user decide when to activate.

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Wiki Switch — Manage Multiple Vault Profiles

Each vault is a complete config file at ~/.llm-wiki/config.<name>. The active vault is whichever file ~/.llm-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 ~/.llm-wiki/config.<name> for that one invocation and never re-points the symlink.

Dispatch

Parse the invocation and route to the right section:

InvocationAction
/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 ~/.llm-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 ~/.llm-wiki/config.<name> ~/.llm-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 ~/.llm-wiki/config.* (exclude config itself — that's the symlink).
  2. Resolve the current symlink target: readlink ~/.llm-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 ~/.llm-wiki/config.<name>.
  • If no name given, read ~/.llm-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 ~/.llm-wiki/config.<name> doesn't already exist. Abort if it does.
  2. Copy the active config:
    cp ~/.llm-wiki/config ~/.llm-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 ~/.llm-wiki/config.<name>.
  6. Update the top comment line to describe the new vault (e.g., # Obsidian Wiki — <name> vault).
  7. Confirm:
    Created: ~/.llm-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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.