agentleFS
flavien-iaflavien-ia/hypervibe-harness/skills/_ensure-vault/SKILL.md

_ensure-vault

Skill50 starsChanged 21 days agoApache-2.0View on GitHub

Internal preflight - make sure the Bitwarden vault is unlocked before a skill reads any global key. Run at the start of every skill that will consume a vault secret (Cloudflare, Neon, Resend/Brevo, Hostinger, Anthropic…), so the unlock window pops once up-front instead of a key-read silently failing mid-flow. Not meant to be invoked directly by users.

1 other project uses 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, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use plain, non-technical business language.

    line 12
  2. Distinctive:

    When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.

    line 13
  3. Distinctive:

    Only one unlock window opens at a time on the machine: a call made while another is open waits for it, and exits 0 if the vault opened, 1 …

    line 38

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

_ensure-vault - "the vault is open" preflight

Communication

  • Detect the user's language from the conversation (the user's own messages, anywhere in the session - not just this invocation: a bare slash command like /bootstrap carries no language signal by itself). If nothing in the conversation gives a signal, fall back to the OS locale (node -e "console.log(Intl.DateTimeFormat().resolvedOptions().locale)") before defaulting to English. ALWAYS reply in that language for every user-facing message: questions, progress, confirmations, summaries, errors - including any example text quoted in this skill, which is illustrative and must be translated, never sent verbatim.
  • Use plain, non-technical business language. Never expose internal script names (*.mjs) or jargon; describe actions in human terms.
  • When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
  • Show progress as a short natural-language checklist (in-progress and done states).

To run at the start of any skill that will read a key from the vault. Goal: open the unlock window once up-front rather than letting a key-read silently fail later (notably the case of scripts that go through readUserEnv, which returns null without flagging "locked").

Since the vault stays open for 6h and then locks itself for real, this preflight triggers a window at most every 6 hours, on first need.

Snippet (run as-is)

VAULT="${CLAUDE_SKILL_DIR}/../../scripts/vault/vault.mjs"
ST=$(node "$VAULT" status 2>/dev/null)
echo "vault:$ST"

Depending on ST:

  • unlocked → vault ready, continue the skill normally.
  • locked or expired → notify the user in the chat, then open the unlock window (blocking), then re-check:

    "Your key vault is closed - a window will open for your master password (the vault then stays open 6 hours)."

    node "${CLAUDE_SKILL_DIR}/../../scripts/vault/launch.mjs" unlock --lang <LANG>
    node "$VAULT" status   # should return "unlocked"
    The window asks for the master password up to 3 times before giving up, so a typo is fixed on the spot. If it still exits non-zero, the three attempts were wrong: say so in the chat and ask the user before opening another window. Never reopen one on your own - that is how a mistyped password turns into an endless chain of windows. Only one unlock window opens at a time on the machine: a call made while another is open waits for it, and exits 0 if the vault opened, 1 if not.
  • Empty output / error (no bw, no account connected → vault never configured) → the vault does not exist yet: delegate to _add-keyring (installs bw + creates the account + login + unlock), then re-check. If the user declines to set up the vault, flag it and stop cleanly (the skill will not be able to retrieve its keys).

When to use it

Any skill that, directly or via a script (check-deps, setup-db, setup-email, wrangler-env-init, quotas-fetch, count-cf-cron-slots, gsc-token, run-sql…), will need a global key (Cloudflare, Neon, Resend/Brevo, Hostinger, Anthropic). Do it before the bulk of the work.

(Note: the read helpers stay non-interactive - they never open a window themselves. It is this preflight, orchestrated by Claude, that guarantees the vault is open at the right moment.)

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.