agentleFS
iurykriegeriurykrieger/claude-bedrock/skills/vaults/SKILL.md

vaults

Skill104 starsChanged 7 months agoMITView on GitHub

Manage registered Bedrock vaults. List all vaults, set a default vault, or remove a vault from the registry. The registry lives in the plugin directory and maps vault names to filesystem paths. Use when: "bedrock vaults", "bedrock-vaults", "/bedrock:vaults", "list vaults", "set default vault", "remove vault", "show vaults", "which vault", "my vaults", or when a user wants to manage their registered vaults.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 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.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the "Base directory for this skill" provided at invocation to resolve paths:

    line 19
  2. Distinctive:

    If the input doesn't match any pattern, default to list mode.

    line 49
  3. Distinctive:

    Read the registry file:

    line 61
  4. Very specific:

    If any vault has status missing, add a note:

    line 114
  5. Very specific:

    If not found: display "Vault <TARGET_NAME> is not registered.

    line 124
  6. Very specific:

    Write the updated registry back to REGISTRY_PATH

    line 128
  7. Very specific:

    Remove the entry from VAULTS

    line 136
  8. Distinctive:

    If the removed vault was the default AND other vaults remain, mark the first remaining vault as default and inform the user

    line 137
  9. Very specific:

    When writing the registry (set-default or remove modes), use the Write tool to overwrite REGISTRY_PATH with the updated JSON:

    line 145

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

/bedrock:vaults — Vault Management

Plugin Paths

The vault registry lives in the plugin root directory, not in any vault. Use the "Base directory for this skill" provided at invocation to resolve paths:

  • Vault registry: <base_dir>/../../vaults.json
  • Plugin CLAUDE.md: <base_dir>/../../CLAUDE.md (auto-injected into context)

Where <base_dir> is the path shown in "Base directory for this skill".


Overview

This skill manages the global vault registry — the file that maps vault names to filesystem paths and tracks which vault is the default.

You are a management agent. This skill is read-only with respect to vaults themselves — it never reads or modifies vault entities, never runs git operations inside vaults, and never touches .bedrock/config.json. It only reads and writes the registry file (vaults.json).


Phase 0 — Parse Input

Parse the user's input to determine the command mode:

Input patternModeVariables
No flags / empty / listlist—
--set-default <name>set-defaultTARGET_NAME = <name>
--remove <name>removeTARGET_NAME = <name>

If the input doesn't match any pattern, default to list mode.


Phase 1 — Read Registry

Resolve the registry path:

REGISTRY_PATH = <base_dir>/../../vaults.json

Read the registry file:

cat <REGISTRY_PATH> 2>/dev/null

If the file does not exist or is empty:

  • For list mode: display "No vaults registered. Run /bedrock:setup in a vault directory to register your first vault."
  • For set-default and remove modes: display "No vaults registered. Nothing to modify." and exit.

If the file exists: parse the JSON. Expected schema:

{
  "vaults": [
    {
      "name": "<string>",
      "path": "<absolute-path>",
      "default": true | false
    }
  ]
}

Store the parsed vaults array as VAULTS.


Phase 2 — Execute Command

2.1 List Mode

For each vault in VAULTS, check if the path still exists on disk:

test -d "<vault_path>" && echo "exists" || echo "missing"

Present a table:

## Registered Vaults

| Name | Path | Default | Status |
|---|---|---|---|
| my-vault | /Users/me/vaults/my-vault | * | ok |
| team-vault | /Users/me/vaults/team-vault | | ok |
| old-vault | /Users/me/vaults/old-vault | | missing |
  • The Default column shows * for the default vault
  • The Status column shows ok if the directory exists, missing if it does not

If any vault has status missing, add a note:

> Vaults marked as "missing" have paths that no longer exist on disk.
> Run `/bedrock:vaults --remove <name>` to clean up, or re-create the vault at the registered path.

2.2 Set-Default Mode

  1. Find the vault with name == TARGET_NAME in VAULTS
  2. If not found: display "Vault <TARGET_NAME> is not registered. Available vaults:" followed by a list of names. Exit.
  3. If found:
    • Set "default": false on all vaults
    • Set "default": true on the matching vault
    • Write the updated registry back to REGISTRY_PATH
    • Display: "Default vault set to <TARGET_NAME> (<path>)."

2.3 Remove Mode

  1. Find the vault with name == TARGET_NAME in VAULTS
  2. If not found: display "Vault <TARGET_NAME> is not registered. Available vaults:" followed by a list of names. Exit.
  3. If found:
    • Remove the entry from VAULTS
    • If the removed vault was the default AND other vaults remain, mark the first remaining vault as default and inform the user
    • Write the updated registry back to REGISTRY_PATH
    • Display: "Vault <TARGET_NAME> removed from registry. Files on disk were NOT deleted (<path>)."

Phase 3 — Write Registry

When writing the registry (set-default or remove modes), use the Write tool to overwrite REGISTRY_PATH with the updated JSON:

{
  "vaults": [
    { "name": "...", "path": "...", "default": true },
    { "name": "...", "path": "...", "default": false }
  ]
}

Format the JSON with 2-space indentation for readability.


Critical Rules

#Rule
1NEVER modify vault files — this skill only touches vaults.json
2NEVER run git operations — no git pull, commit, push, or any git command
3NEVER delete files on disk — --remove only removes the registry entry
4ALWAYS validate vault name exists before set-default or remove
5ALWAYS check path existence when listing vaults — flag missing paths
6ALWAYS maintain exactly one default — if the default is removed, auto-assign the first remaining vault
7Vault names are kebab-case — lowercase, no spaces, no special characters beyond hyphens

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.