Unlock Skill
Automatically unlock your Bitwarden vault and load project-specific secrets into the current environment. Fully automated - no manual password entry required.
Purpose
This skill provides a one-command workflow for accessing project secrets:
- •Reads master password from
~\.claude\.env - •Unlocks Bitwarden vault automatically (if locked)
- •Auto-detects current project name from working directory
- •Loads secrets from Bitwarden into environment variables
Security Model
Automated approach:
- •Master password stored in
~\.claude\.env(local file, not in repo) - •Password is passed via environment variable, immediately cleared after use
- •Session tokens are cached for subsequent operations
Implementation
When the user invokes /unlock, execute the unlock-and-load script:
powershell
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:USERPROFILE\.claude\scripts\unlock-and-load.ps1"
The script will:
- •Check Bitwarden vault status
- •If locked, read password from
~\.claude\.envand unlock automatically - •Auto-detect project name from current directory
- •Load secrets from
dev/<PROJECT_NAME>/api-keysin Bitwarden - •Set them as environment variables in the current session
Error Handling
Password File Not Found
If ~\.claude\.env doesn't exist or doesn't contain BITWARDEN_MASTER_PASSWORD:
- •Create the file with:
BITWARDEN_MASTER_PASSWORD=your-password-here
Project Not Found in Bitwarden
If no secrets exist for the current project:
- •Script will show available
dev/*items - •Create new item via:
~\.claude\scripts\store-secrets.ps1 <PROJECT_NAME>
Usage Examples
powershell
cd C:\projects\slide-generator /unlock # Vault unlocked successfully! # Loaded 3 secret(s) for 'slide-generator'
Related Scripts
- •
~\.claude\scripts\unlock-and-load.ps1- Combined unlock + load script - •
~\.claude\scripts\get-secrets.ps1- Load secrets (requires unlocked vault) - •
~\.claude\scripts\store-secrets.ps1- Create/update Bitwarden items - •
~\.claude\.env- ContainsBITWARDEN_MASTER_PASSWORD