Skip to content
Security
Command

/enhance-workspace

Refresh an existing workspace-level CLAUDE.md by adding missing Bitwarden domain modules

From plugin
ai-plugins
1656 skills4 agents6 commands2 MCP
> /plugin marketplace add bitwarden/ai-plugins

Command definition

enhance-workspace.md
description: Refresh an existing workspace-level CLAUDE.md by adding missing Bitwarden domain modules
allowed-tools: Read, Write, Edit, Bash(diff:*), Bash(cp:*), Bash(date:*), Bash(rm:*), Glob

Refresh an existing workspace-level CLAUDE.md by detecting which Bitwarden domain modules are already present and offering to add the missing ones. Same safety guardrails as `/bitwarden-init:init-workspace` — backup before overwrite, diff preview, explicit Apply confirmation.

Prerequisites

A workspace-level CLAUDE.md must already exist. If it doesn't, stop and point the user at `/bitwarden-init:init-workspace` instead.

Steps

1. **Ask the user for the workspace root.** Use `AskUserQuestion` with options pre-filled as common candidates (e.g. `~/Source/bw`, `~/dev/bitwarden`, `~/code/bw`) — the "Other" affordance lets them type anything. Validate that the resolved `<workspace-root>/.claude/CLAUDE.md` exists; if not, re-ask. No auto-detection — a user invoking `enhance-workspace` has already chosen where this file lives during a prior `init-workspace` session.

2. **Locate the target file.** Target is `<workspace-root>/.claude/CLAUDE.md`. If it does not exist, exit with the message above.

3. **Detect installed modules.** For each module in `${CLAUDE_PLUGIN_ROOT}/templates/workspace/`, extract the top-level `## Heading` and check whether it appears in the existing file.

Build **Installed** and **Missing** lists.

4. **Offer missing modules.** Use `AskUserQuestion` with `multiSelect: true` showing only **Missing** modules. If empty, tell the user all known modules are already present and exit cleanly. Use the one-line summaries from `/bitwarden-init:init-workspace`.

5. **Render new content.**

  • Start from the existing file content.
  • For each selected missing module, append its body to the end, separated by a single blank line.
  • Do not modify or reorder existing content.

6. **Diff + confirm.** Write the rendered content to a temp file. Run `diff -u <target> <temp>` and display. Use `AskUserQuestion` with **Apply**, **Show diff again**, **Cancel**.

7. **Backup, then write.**

  • Copy the existing target to `<target>.bak-$(date -u +%Y%m%dT%H%M%SZ)`.
  • Use `Edit` to update the target with the full rendered content. (`Write` works as a fallback if `Edit`'s old-string match fails for any reason — the file always exists at this point.)
  • Clean up the temp preview.

8. **Summary.** Report which modules were added, the backup path, and a reminder that this file applies to every Bitwarden repo under `<workspace-root>`.

Notes

  • This command **only adds** modules. For a from-scratch rebuild, use `/bitwarden-init:init-workspace` with the **Replace** option.
  • If the user added the `sources-of-truth.md` module, newly-appended modules will continue to use the same bracketed reference numbers. The numbers stay meaningful as long as `sources-of-truth.md` is present.
Read more
@bitwarden
Ships withai-plugins

A curated collection of plugins for AI-assisted development at Bitwarden. Enables discovery and distribution of quality-controlled plugins for use with Claude Code.

16585 skills4 agents2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
165
Star history of bitwarden/ai-plugins on GitHub, a chart by star-history.com

Other commands on ai-plugins.

enhance-user

enhance-user

Command

Refresh an existing user-level ~/.claude/CLAUDE.md by adding missing modules from the Bitwarden init template library

@bitwarden@bitwardenInstall Command
enhance

enhance

Command

Enhance an existing CLAUDE.md with Bitwarden's standardized template structure and supplementary research

@bitwarden@bitwardenInstall Command
init-user

init-user

Command

Set up a user-level ~/.claude/CLAUDE.md with opt-in Bitwarden behavioral modules through a guided Q&A

@bitwarden@bitwardenInstall Command
init-workspace

init-workspace

Command

Set up a workspace-level CLAUDE.md (Bitwarden domain context) for the folder containing all locally-cloned Bitwarden repos

@bitwarden@bitwardenInstall Command
init

init

Command

Initialize a Claude Code CLAUDE.md file with Bitwarden's standardized template format

@bitwarden@bitwardenInstall Command

More commands from other plugins.

deslop-reborn

deslop-reborn

Command

One iteration of the IronClaw Reborn de-slop loop — take ONE Reborn crate, fan out parallel review sub-agents (thermo-nuclear…

ironclaw13d13k
@nearai@nearaiInstall Command
audit

audit

Command

Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open…

skills10d8.2k
@trailofbits@trailofbitsInstall Command
autopilot

autopilot

Command

Run autonomous hunt loop on a target — scope check → recon → rank surface → hunt → validate → report with configurable…

@elementalsouls@elementalsoulsInstall Command