Install
openclaw skills install password-managerA fully local password management skill for OpenClaw with AES-256-GCM encryption, password generation, and sensitive info detection.
openclaw skills install password-managerA fully local password management skill for OpenClaw, providing secure credential storage capabilities.
clawhub install password-manager
password-manager init
Set a master password (recommended: 12+ characters, including uppercase, lowercase, numbers, and symbols).
# Manual addition
password-manager add --name "github" --type "token" --password "ghp_xxx"
# Auto-generate password
password-manager add --name "aws" --type "api_key"
password-manager get --name "github" --show-password
password-manager search --query "github"
password-manager list --type "token"
password-manager generate --length 32
As an OpenClaw Skill, it provides the following tools:
| Tool | Function | Input Parameters |
|---|---|---|
password_manager_add | Add entry | name, type, username, password, tags, notes |
password_manager_get | Get entry | name, showPassword |
password_manager_update | Update entry | name, password, username, tags, notes |
password_manager_delete | Delete entry | name, confirmed |
password_manager_search | Search entries | query, type, tag |
password_manager_list | List entries | type |
password_manager_generate | Generate password | length, includeUppercase, includeNumbers, includeSymbols |
password_manager_check_strength | Check strength | password |
password_manager_status | View status | - |
password_manager_detect | Detect sensitive info | text |
password_manager_change_password | Change master password | oldPassword, newPassword |
User: Save my GitHub token to the password manager
Agent: 🔒 Password manager is locked, please provide master password to unlock
User: my-secret-password
Agent: ✅ GitHub token saved
---
User: My API key is sk-xxxxxxxx
Agent: 🔍 OpenAI API Key detected
Do you want to save it to the password manager?
User: Save it
Agent: ✅ Saved (entry name: openai-key)
---
User: I want to change my master password
Agent: 🔐 Please provide your old master password
User: my-old-password
Agent: ✅ Password verified. Please provide new master password
User: my-new-secure-password
Agent: ✅ Master password changed successfully
Vault re-encrypted with new password
# Initialize
password-manager init
# Add
password-manager add --name <name> --type <type> [--password <pwd>]
# View
password-manager get --name <name> [--show-password]
# Update
password-manager update --name <name> --password <new-pwd>
# Delete
password-manager delete --name <name> [--confirm]
# Search
password-manager search --query <keyword> [--type <type>]
# List
password-manager list [--type <type>]
# Generate password
password-manager generate [--length 32]
# Check strength
password-manager check-strength <password>
# Status
password-manager status
# Lock/Unlock
password-manager lock
password-manager unlock
# Backup/Restore
password-manager backup --output ~/backup.enc
password-manager restore --input ~/backup.enc
# Change Master Password
password-manager change-password --old <old-password> --new <new-password>
| Option | Description |
|---|---|
--name | Entry name (required) |
--type | Entry type (password/token/api_key/secret) |
--username | Username (optional) |
--password | Password/value (auto-generate if not provided) |
--tags | Tags (comma-separated, optional) |
--length | Password length (default: 32) |
--show-password | Show password in plaintext |
--confirm | Skip confirmation (for sensitive operations) |
--old | Old master password (for change-password) |
--new | New master password (for change-password) |
For automation and CI/CD, you can use the PASSWORD_MANAGER_MASTER_PASSWORD environment variable:
# Set environment variable
export PASSWORD_MANAGER_MASTER_PASSWORD="your-master-password"
# Now you don't need to enter password interactively
password-manager list
password-manager add --name "github" --type "token" --password "ghp_xxx"
password-manager change-password --old "old-pass" --new "new-pass"
Security Note: Be cautious when using environment variables in shared environments, as they may be visible in process lists.
When the cache file is missing or expired, the password manager will automatically attempt to rebuild it:
.cache/key.enc doesn't exist, the system will try to rebuild from the provided passwordPASSWORD_MANAGER_MASTER_PASSWORD is set, it will be used for cache rebuild# First run after cache expiration
$ password-manager list
🔒 Cache missing, attempting to rebuild...
✅ Cache rebuilt successfully
# Subsequent runs (within 48 hours)
$ password-manager list
✅ Using cached key (expires in 47h 59m)
config.json includes reasonable defaults and can be used directly. Edit for customization:
{
"cacheTimeout": 172800, // Master password cache timeout (seconds, default: 48 hours)
"maxHistoryVersions": 3, // Number of historical versions to retain
"auditLogLevel": "all", // all/sensitive/none
"autoDetect": {
"enabled": true, // Enable sensitive information detection
"sensitivityThreshold": "medium",
"askBeforeSave": true
},
"requireConfirm": {
"delete": true,
"deleteAll": true,
"export": true,
"backup": true,
"restore": true
},
"generator": {
"defaultLength": 32,
"includeUppercase": true,
"includeNumbers": true,
"includeSymbols": true
}
}
Tip: If configuration is modified incorrectly, refer to config.example.json to restore defaults.
crypto.randomInt()secureWipe() removes sensitive data.logs/detection.jsonl| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Cache file depends on filesystem permissions | Low | Medium | Encrypted |
| Memory keys may be dumped | Low | High | secureWipe added |
| Master password loss cannot be recovered | - | High | User education |
~/.openclaw/workspace/skills/password-manager/
├── scripts/
│ ├── password-manager.mjs # Main entry (CLI + library)
│ ├── crypto.js # Crypto module (AES-256-GCM + PBKDF2)
│ ├── storage.js # Storage module (vault management)
│ ├── generator.js # Password generation
│ ├── validator.js # Validation module
│ └── detector.js # Sensitive info detection (13 rules)
├── hooks/openclaw/
│ ├── HOOK.md
│ └── handler.mjs # 10 OpenClaw tools
├── tests/
│ ├── crypto.test.js # Crypto module unit tests
│ ├── generator.test.js # Password generation unit tests
│ ├── storage.test.js # Storage module unit tests
│ └── SECURITY-FIXES.md # Security fixes report
├── data/
│ └── vault.enc # Encrypted vault
├── .cache/
│ └── key.enc # Encrypted master password cache
├── .logs/
│ └── detection.jsonl # Detection logs
├── config.json # Configuration file
└── package.json # npm configuration
cd ~/.openclaw/workspace/skills/password-manager
# Run all tests
npm test
# Run single module tests
npm run test:crypto
npm run test:generator
npm run test:storage
# Run test coverage
npm run test:coverage
# tests 45
# pass 42
# fail 3
# Success rate: 93%
Passed Tests:
| ID | Feature | Status |
|---|---|---|
| F1 | AES-256-GCM encrypted storage | ✅ |
| F2 | CRUD operations | ✅ |
| F3 | Password generation (customizable) | ✅ |
| F4 | Password strength check | ✅ |
| F5 | Master password 48-hour cache | ✅ |
| F6 | Sensitive operation confirmation | ✅ |
| F7 | Automatic sensitive info detection | ✅ |
| F8 | Version history | ✅ |
| F9 | Operation audit logs | ✅ |
| F10 | OpenClaw tool integration | ✅ |
| F11 | Tag system | ✅ |
| F12 | Notes field | ✅ |
| F13 | Search/filter | ✅ |
| F14 | Backup/restore | ✅ |
| F15 | Password strength recommendations | ✅ |
| F16 | Auto-detection toggle | ✅ |
Feature Completeness: 16/16 (100%) ✅
1.0.0 - Initial release (2026-02-28)
MIT
Q: What if I forget my password?
A: The master password cannot be recovered if lost. Please backup regularly and store your master password securely.
Q: How do I change my master password?
A: The current version does not support changing the master password. You need to reinitialize and migrate data.
Q: Where is the vault file?
A: ~/.openclaw/workspace/skills/password-manager/data/vault.enc
Q: How do I view operation logs?
A: Log files are in .logs/detection.jsonl, recording detection events without specific content.
Q: How do I disable sensitive information detection?
A: Edit config.json and set autoDetect.enabled: false
Q: Is the cache file secure?
A: The cache file is encrypted with AES-256-GCM and relies on filesystem permissions for protection.
Q: What entry types are supported?
A: Supports four types: password, token, api_key, secret.
SKILL.md, tests/SECURITY-FIXES.mdnpm testconfig.json