agentleFS
hajekt2hajekt2/bitwarden-secrets-manager-cli/SKILL.md

bitwarden-secrets-manager-cli

Skill1 starsChanged 3 months agoMITView on GitHub

Check Bitwarden access, create generated secrets, and inject selected secrets into scripts or commands. Use for bws and Bitwarden-backed tasks without displaying credentials.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use secrets for the authorized task without displaying their values.

    line 8
  2. Distinctive:

    No script allowlist, named recipe, hash pin, version pin, or separate script approval is required.

    line 10
  3. Distinctive:

    Use the bundled Linux wrapper:

    line 16
  4. Very specific:

    Use --secret-name ENV=NAME when the exact name identifies one accessible entry.

    line 22
  5. Distinctive:

    Read application credentials from environment variables inside the script.

    line 42
  6. Distinctive:

    Keep credentials out of arguments, tool responses, chat, logs, and temporary files.

    line 43

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

Bitwarden Secrets Manager

Use secrets for the authorized task without displaying their values. The agent may choose or create any script or command that consumes application secrets. No script allowlist, named recipe, hash pin, version pin, or separate script approval is required. Authorization for the actual task still controls external writes and destructive actions.

Inject secrets into a command

Use the bundled Linux wrapper:

scripts/with-bws-token.sh run --secret-name API_TOKEN=project/secret-name -- python3 /absolute/path/task.py

Use --secret-name ENV=NAME when the exact name identifies one accessible entry. Qualify duplicate names as PROJECT/NAME. If that is still ambiguous, or the name contains /, use --secret ENV=UUID. Name lookup uses the SDK's identifier endpoint. It defaults to US; pass --region eu when bws is configured for EU. Repeat either flag for each required credential. The wrapper fetches only those secrets and puts their values in the command's environment. It accepts any executable and arguments, including an interpreter and an agent-created script. Run from the task's working directory, using the wrapper's absolute path when needed.

The command inherits the caller's environment except BWS_* variables. The Bitwarden machine-account token goes only to the internal bws requests, never to the application command. The token comes from the Linux keyring under service bws account access-token, or from an operator-declared environment credential.

The wrapper discards command stdout and stderr, including failures. It returns only a fixed completion status. The default timeout is 300 seconds; set --timeout SECONDS before -- for longer tasks. It terminates the command's process group when execution ends. Use foreground commands, not service launchers.

Read application credentials from environment variables inside the script. Keep credentials out of arguments, tool responses, chat, logs, and temporary files. Write credentials only to runtime destinations required by the task, with appropriate access controls. Verify completion through non-secret results. A failed or timed-out command can have made partial writes; inspect the task's state before retrying.

Other operations

scripts/with-bws-token.sh check-auth
scripts/with-bws-token.sh projects
scripts/with-bws-token.sh secret-names REGION

check-auth returns a fixed read-only status. projects returns project IDs and names. secret-names us or secret-names eu returns secret key names and project names through the SDK identifier-only endpoint, without values.

The keyring is the default credential source. An operator selects an inherited token instead by declaring BWS_ACCESS_TOKEN_SOURCE=environment; the declaration is authoritative on any host. Without that exact declaration an inherited non-empty BWS_ACCESS_TOKEN is refused. The token is still excluded from the application environment. If no credential source resolves, ask the user to repair it in their own session, never to paste credentials. See operator setup.

Existing provision-generated RECIPE, run-approved RECIPE, and inspect-approved RECIPE remain available for workflows that use recipes. Their recipe validation applies only to those legacy operations, not to run. See generated provisioning and recipe operations when using them.

run-approved also supports the existing repeatable opentofu-state-inventory-v1 result contract. Its validation and private result-file cleanup remain unchanged.

Boundary

This wrapper prevents accidental output disclosure. It does not sandbox scripts or an agent running as the same OS user. The selected command can access its injected secrets, write them, or send them over the network. Choose commands and secret scope according to the authorized task. Raw secret output through bws secret get, bulk bws secret list, or environment dumps exposes credentials to the agent; use the wrapper for credential injection.

An isolated credential service is optional when stronger protection against the agent itself is required. See isolation requirements.

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.