Skip to content
Security
Command

/enhance-user

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

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

Command definition

enhance-user.md
description: Refresh an existing user-level ~/.claude/CLAUDE.md by adding missing modules from the Bitwarden init template library
allowed-tools: Read, Write, Edit, Bash(diff:*), Bash(cp:*), Bash(date:*), Bash(rm:*), Glob

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

Prerequisites

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

Steps

1. **Read existing file.** Read `~/.claude/CLAUDE.md`. If missing, exit with the message above.

2. **Detect installed modules.** For each module in `${CLAUDE_PLUGIN_ROOT}/templates/user/`, read its file and extract the top-level `## Heading`. A module is considered "installed" if its exact heading (case-insensitive match on the first `## ` line) appears anywhere in the existing file.

Build two lists:

  • **Installed**: modules whose heading is present.
  • **Missing**: modules whose heading is not present.

3. **Offer missing modules.** Use `AskUserQuestion` with `multiSelect: true` showing only the **missing** modules. If the missing list is empty, tell the user all known modules are already present and exit cleanly. Each option's description should be the one-line summary (see `/bitwarden-init:init-user` for the full table).

4. **Render new content.**

  • Start from the existing file content.
  • For each selected missing module, read `${CLAUDE_PLUGIN_ROOT}/templates/user/<slug>.md` and append it to the end of the file, separated by a single blank line.
  • Do not modify any of the existing content. Do not reorder existing sections.

5. **Diff + confirm.** Write the rendered content to a temp file. Run `diff -u "$HOME/.claude/CLAUDE.md" <temp>` and display. Use `AskUserQuestion` with **Apply**, **Show diff again**, **Cancel**.

6. **Backup, then write.**

  • Copy the existing file to `~/.claude/CLAUDE.md.bak-$(date -u +%Y%m%dT%H%M%SZ)`.
  • Use `Edit` to update `~/.claude/CLAUDE.md` 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.

7. **Summary.** Report which modules were added, the backup path, and a reminder to revisit any `[YOUR-PREFERENCE]` placeholders.

Notes

  • This command **only adds** modules. It never rewrites or removes existing content. If the user wants a from-scratch rebuild, they should use `/bitwarden-init:init-user` with the **Replace** option.
  • Preserve `[YOUR-PREFERENCE]` placeholders verbatim in any newly-added modules.
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

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