
bitwarden-init
Generates Bitwarden-standard CLAUDE.md files for repository, workspace, and user scopes.
- version
- 1.2.2
- GitHub stars
- 165
What it does
- Adds
/bitwarden-init:init,/bitwarden-init:enhance,/bitwarden-init:init-user,/bitwarden-init:init-workspace, and their enhance counterparts for user and workspace scopes - Runs a two-phase repo setup: Anthropic's
/initanalyzes the codebase, then/enhancerestructures it into an 11-section project template - Shows a unified diff preview and requires an explicit Apply before writing, saving a timestamped
.bakcopy of any overwritten file - Designed for engineers setting up Claude Code across multiple locally cloned Bitwarden repositories
Initialize Claude Code configuration with Bitwarden's standardized template format
Add marketplace
/plugin marketplace add bitwarden/ai-pluginsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install bitwarden-init@bitwarden-marketplaceRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceRefresh 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
-
Read existing file. Read
~/.claude/CLAUDE.md. If missing, exit with the message above. -
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.
-
Offer missing modules. Use
AskUserQuestionwithmultiSelect: trueshowing 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-userfor the full table). -
Render new content.
- Start from the existing file content.
- For each selected missing module, read
${CLAUDE_PLUGIN_ROOT}/templates/user/<slug>.mdand 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.
-
Diff + confirm. Write the rendered content to a temp file. Run
diff -u "$HOME/.claude/CLAUDE.md" <temp>and display. UseAskUserQuestionwith Apply, Show diff again, Cancel. -
Backup, then write.
- Copy the existing file to
~/.claude/CLAUDE.md.bak-$(date -u +%Y%m%dT%H%M%SZ). - Use
Editto update~/.claude/CLAUDE.mdwith the full rendered content. (Writeworks as a fallback ifEdit's old-string match fails for any reason — the file always exists at this point.) - Clean up the temp preview.
- Copy the existing file to
-
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-userwith the Replace option. - Preserve
[YOUR-PREFERENCE]placeholders verbatim in any newly-added modules.
Readme
Bitwarden Init Plugin
Generates CLAUDE.md files at three scopes — repository, workspace, and user — using Bitwarden's templates.
What It Does
Claude Code reads CLAUDE.md files by walking up the directory tree from the current working directory and concatenating every file it finds. That makes three scopes useful:
| Scope | Path | Applies to |
|---|---|---|
| User | ~/.claude/CLAUDE.md | Every project, every conversation |
| Workspace | <bw-source-root>/.claude/CLAUDE.md | Every Bitwarden repo cloned under that root |
| Repository | <repo>/CLAUDE.md | One specific repo |
This plugin has commands for all three.
Installation
/plugin install bitwarden-init@bitwarden-marketplace
Restart Claude Code after installation.
Commands
Repository scope
/bitwarden-init:init
Generates a new repository-level CLAUDE.md. Runs both phases automatically:
- Anthropic's
/initanalyzes the codebase. /enhancerestructures and extends the output using the 11-section project template (see below).
/bitwarden-init:enhance
Enhances an existing repository-level CLAUDE.md. Reads the current file, performs supplementary codebase research, and reorganizes content into the 11 project sections.
User scope
/bitwarden-init:init-user
Walks you through a Q&A to assemble ~/.claude/CLAUDE.md from opt-in behavioral modules (intellectual honesty, simplicity, surgical changes, code-review mutation lockdown, …). The modules are a starting point assembled from one engineer's preferences — pick what fits you and edit freely.
/bitwarden-init:enhance-user
Detects which behavioral modules are already present in ~/.claude/CLAUDE.md and offers to append any that are missing.
Workspace scope
/bitwarden-init:init-workspace
Walks you through a Q&A to assemble <workspace-root>/.claude/CLAUDE.md for the folder where you keep all your locally-cloned Bitwarden repos. Auto-detects the workspace root by walking up from cwd looking for an ancestor with two or more sibling git repositories. Always asks for confirmation before writing. Modules include the zero-knowledge invariant, security principles P01–P06, core vocabulary, and operating defaults like worktrees and plan mode.
/bitwarden-init:enhance-workspace
Detects which Bitwarden domain modules are already present in the workspace-level file and offers to append any that are missing.
Safety guardrails for user / workspace scopes
Both new init and enhance flows for the user and workspace scopes:
- Show a unified diff preview before any write.
- Require an explicit
Applyconfirmation. - Create a timestamped
*.bak-<ISO-timestamp>copy of the existing file before overwriting. - Surface the backup path in the success message.
Usage
Typical first-time setup, in order:
# 1. Set up your user-level CLAUDE.md (applies to every project)
/bitwarden-init:init-user
# 2. From any directory under the folder where you keep your cloned Bitwarden repos
/bitwarden-init:init-workspace
# 3. In each repo, set up the repo-level CLAUDE.md
/bitwarden-init:init
Later, to refresh a CLAUDE.md after the plugin adds new modules:
/bitwarden-init:enhance-user # append any missing user-scope modules
/bitwarden-init:enhance-workspace # append any missing workspace-scope modules
/bitwarden-init:enhance # refresh a repo CLAUDE.md against the 11-section template
All four user/workspace commands open an interactive Q&A: pick the modules you want, review a unified diff against the existing file (if any), then confirm Apply. A timestamped *.bak-<...> is written before any overwrite.
Repository Template Structure
The generated CLAUDE.md includes these sections:
- Overview - Project purpose, key concepts
- Architecture & Patterns - System diagrams, code organization, implementation patterns
- Development Guide - Step-by-step instructions with code templates
- Data Models - Types, validation schemas, domain entities
- Security & Configuration - Security rules, authentication, environment variables
- Testing - Test structure, writing tests, running tests
- Code Style & Standards - Formatting, naming conventions, pre-commit hooks
- Anti-Patterns - DO/DON'T lists
- Deployment - Build and deployment instructions
- Troubleshooting - Common issues and solutions
- References - Documentation links
Requirements
claudeCLI in PATH- Write permissions for CLAUDE.md
Contributing
See CONTRIBUTING.md.
Changelog
See CHANGELOG.md.
License
See LICENSE.txt.
Details
- Marketplace
- bitwarden/ai-plugins
- Source
- plugins/bitwarden-init
- Category
- Community
More from bitwarden/ai-plugins
All 25- bitwarden-mailcatcher-toolsv1.0.0
- bitwarden-product-analystv0.1.7
- bitwarden-retrospective-toolsv1.2.0
- bitwarden-security-engineerv2.1.0
- bitwarden-shepherdv1.0.1
- bitwarden-software-engineerv1.1.0
- bitwarden-stripe-toolsv1.0.0
- bitwarden-tech-leadv3.1.0
- bitwarden-testing-toolsv1.5.1
- bitwarden-testmo-toolsv1.0.0
- claude-config-validatorv2.3.1
- claude-retrospectivev1.1.1
- atlassian-readerv1.2.1
- bitwarden-abacusv0.2.0
- bitwarden-abacus-toolsv1.3.0
- bitwarden-adr-toolsv1.0.0
- bitwarden-ai-telemetryv1.5.1
- bitwarden-atlassian-toolsv2.9.1
- bitwarden-code-reviewv3.1.0
- bitwarden-delivery-toolsv4.0.1
- bitwarden-design-toolsv0.1.0
- bitwarden-designerv0.1.0
- bitwarden-devops-engineerv0.3.1
- bitwarden-doc-parityv1.1.0
Similar to bitwarden-init
More Development Tools
reamorluto/rea466.8K starsReverse engineer anything with agents, from app behavior down to native binaries.
superpowersobra/superpowers319.5K starsCore skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
claude-apianthropics/skills196.9K starsClaude API and SDK documentation skill for building LLM-powered applications
prompts.chatf/prompts.chat178.2K starsAccess thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.
agent-sdk-devanthropics/claude-code156.1K starsDevelopment kit for working with the Claude Agent SDK
ui-ux-pro-maxnextlevelbuilder/ui-ux-pro-max-skill152.6K starsProfessional UI/UX design intelligence for AI coding assistants. Includes searchable databases of styles, colors, typography, charts, and UX guidelines for Reac