code-review-local
Review a GitHub pull request or local changes and write the review to local files instead of posting
Set up a workspace-level CLAUDE.md (Bitwarden domain context) for the folder containing all locally-cloned Bitwarden repos
> /plugin marketplace add bitwarden/ai-pluginsHow it fires
How this command gets triggered: by you, by Claude, or both.
/init-workspaceContext preview
What this command does when you run it.
Set up a workspace-level CLAUDE.md (Bitwarden domain context) for the folder containing all locally-cloned Bitwarden repos
description: Set up a workspace-level CLAUDE.md (Bitwarden domain context) for the folder containing all locally-cloned Bitwarden repos allowed-tools: Read, Write, Edit, Bash(find:*), Bash(wc:*), Bash(tr:*), Bash(dirname:*), Bash(mkdir:*), Bash(diff:*), Bash(cp:*), Bash(date:*), Bash(rm:*), Glob
Walk the user through a guided Q&A to assemble a workspace-level CLAUDE.md at `<workspace-root>/.claude/CLAUDE.md`, where `<workspace-root>` is the directory the user keeps all their cloned Bitwarden repos in. Claude Code automatically loads this file in any subdirectory of that root, so it's the right home for cross-repo Bitwarden domain context (zero-knowledge invariant, P01–P06, vocabulary, operating defaults).
This represents one engineer's opinion. Modules are opt-in; the user picks which to include and is free to edit afterward.
1. **Detect workspace root.** Starting from `cwd`, walk up the directory tree. For each ancestor, count how many of its immediate subdirectories contain a `.git` entry (file or directory). If any ancestor has **2 or more** such subdirectories, propose that ancestor as the workspace root.
Use a Bash one-liner like:
dir="$PWD"
while [ "$dir" != "/" ]; do
if [ "$dir" = "$HOME" ]; then break; fi
count=$(find "$dir" -mindepth 2 -maxdepth 2 -name .git 2>/dev/null | wc -l | tr -d ' ')
if [ "$count" -ge 2 ]; then echo "$dir"; break; fi
dir=$(dirname "$dir")
doneThe `$HOME` guard prevents the loop from proposing `~` as the workspace root for engineers who keep multiple git repos directly under their home directory (dotfiles, config repos, personal projects) — `~/.claude/CLAUDE.md` is reserved for the user-scope file managed by `/bitwarden-init:init-user`.
When the user picks "type a different path", ask them for an absolute path via `AskUserQuestion` with options pre-filled as common candidates (e.g. `~/Source/bw`, `~/dev/bitwarden`, `~/code/bw`) — the AskUserQuestion "Other" affordance lets them type anything. Validate that the path exists. If not, re-ask.
2. **Confirm target path.** The actual file path is `<workspace-root>/.claude/CLAUDE.md`. Display this resolved path and ask `AskUserQuestion`: **Proceed writing to `<full-path>`?** with **Yes** / **Cancel**.
3. **Detect existing file.** Read the target file. If it exists, ask:
Default: Abort. If it doesn't exist, proceed.
4. **Module selection.** Use `AskUserQuestion` with `multiSelect: true`. Options (each with the listed one-line description):
| Module file | One-line summary | | -------------------------------- | -------------------------------------------------------- | | `overview.md` | Bitwarden's mission and what this workspace file is for | | `zero-knowledge-invariant.md` | The foundational client-side encryption invariant | | `cryptography-choices.md` | AES-CBC + HMAC-SHA-256, RSA-OAEP, EK-1 | | `security-principles.md` | P01–P06 verbatim | | `core-vocabulary.md` | Vault Data, Protected Data, Secure/Trusted Channel, etc. | | `agent-planning-requirements.md` | Plans and subagents must use the vocabulary | | `operating-defaults.md` | Worktrees + plan mode for non-trivial work | | `sources-of-truth.md` | Reference links for future refinement |
5. **Render preview.** For each selected module:
Concatenate in the order shown above, separated by single blank lines. Prepend:
# Bitwarden
<!-- Generated by bitwarden-init v{VERSION} on {YYYY-MM-DD}.
Workspace-level context for every Bitwarden repo cloned under this folder.
This is a starting point assembled from opt-in modules — not a Bitwarden standard.
Edit freely. -->Read the current plugin version from `${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json` to substitute `{VERSION}`.
6. **Diff + confirm.**
Use `AskUserQuestion` with **Apply**, **Show diff again**, **Cancel**.
7. **Backup, then write.**
8. **Summary.** Report:
A curated collection of plugins for AI-assisted development at Bitwarden. Enables discovery and distribution of quality-controlled plugins for use with Claude Code.
Review a GitHub pull request or local changes and write the review to local files instead of posting
Review a GitHub pull request and post findings directly to GitHub
Refresh an existing user-level ~/.claude/CLAUDE.md by adding missing modules from the Bitwarden init template library
Refresh an existing workspace-level CLAUDE.md by adding missing Bitwarden domain modules
Enhance an existing CLAUDE.md with Bitwarden's standardized template structure and supplementary research
Set up a user-level ~/.claude/CLAUDE.md with opt-in Bitwarden behavioral modules through a guided Q&A