agentleFS
tboome33tboome33/obsidian-mcp-router/skills/lock/SKILL.md

lock

Skill1 starsChanged 7 months agoApache-2.0View on GitHub

Restrict the router to a single vault for the current session (single-vault isolation mode). While locked, tool calls targeting any other vault are refused, cross-vault fan-out (`vault: "*"`) is refused, and tool calls without an explicit `vault` resolve to the locked one. Lift the lock with `/obsidian-router:unlock`. Pass "persist" to make the lock survive a restart: it is recorded on this workspace's binding in the user's own config, since a lock named only by a project `.env` is no longer applied at start-up.

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify the named vault is in the active set (the tool itself does this and refuses otherwise — surface the error clearly to the user, …

    line 26
  2. Very specific:

    If the user phrased it persistently ("permanently", "de manière permanente", "à chaque démarrage") but didn't explicitly say "persist", …

    line 28
  3. Very specific:

    If the user phrased it temporarily ("just for now", "juste pour cette session", "pour l'instant"), default persist=false.

    line 29

≈ “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

lock

Invoke the lock_vault MCP tool.

Argument parsing from $ARGUMENTS

  • bare vault name → vault=<name>, persist defaults to false
  • <name> --persist or "permanently" / "persist" / "de manière permanente" / "qui survit au restart" → persist=true
  • vault=X persist=true — explicit form

Always

  • Verify the named vault is in the active set (the tool itself does this and refuses otherwise — surface the error clearly to the user, including the list of known vaults).
  • After a successful lock, confirm to the user: which vault, whether the lock is volatile or persisted, and where the .env hint was written if persisted. Read persisted from the result, do not infer it from persist: true — it means "will survive a restart", so it is false when the router config could not be written even though the .env line was. In that case the result also carries hintWritten: true and a message saying the lock does NOT survive; relay that rather than reporting success.
  • If the user phrased it persistently ("permanently", "de manière permanente", "à chaque démarrage") but didn't explicitly say "persist", default persist=true — that's clearly their intent.
  • If the user phrased it temporarily ("just for now", "juste pour cette session", "pour l'instant"), default persist=false.

Push back if

  • The vault name is missing or ambiguous → ask for the explicit name.
  • The user is already locked to a different vault → tell them, ask if they want to switch (which means re-running lock with the new name) or unlock first.

Homedir refusal caveat (persist mode only)

If the user asks for a persistent lock from their home directory (e.g., they launched Claude Code from ~ rather than a project folder), the tool refuses with an explicit error and the in-memory lock still applies for the session. Surface the message verbatim — it tells them how to fix it (run from a real project directory, or set OBSIDIAN_ROUTER_LOCKED=<vault> in their shell profile / PowerShell $PROFILE). Do not retry the persist call from the same cwd.

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.