bap-identity
# ClaudeWave: bap-identity The bap-identity skill manages Bitcoin Attestation Protocol identity files through bap-cli and bbackup command-line tools, supporting creation of encrypted identity backups, decryption of .bep files, listing and extracting member identities, and generation of test fixtures. Use this skill when users need to create new BAP identities, work with encrypted backup files, extract member identities from master backups, or perform encryption and decryption operations on JSON backup data.
git clone --depth 1 https://github.com/Microck/ordinary-claude-skills /tmp/bap-identity && cp -r /tmp/bap-identity/skills_all/bap-identity ~/.claude/skills/bap-identitySKILL.md
# BAP Identity Management
## Overview
This skill enables comprehensive management of BAP (Bitcoin Attestation Protocol) identity files using two complementary command-line tools:
- **bap-cli**: High-level BAP identity operations (create, list, extract member identities)
- **bbackup**: Low-level encryption/decryption of any JSON backup data
Use this skill when working with encrypted BAP identity backups (.bep files), creating new identities, extracting member identities, encrypting/decrypting JSON files, or generating test fixtures.
## Prerequisites
### Required Tools
Verify both tools are installed:
```bash
bap --version
bbackup --version
```
### Installing bap-cli
```bash
git clone https://github.com/b-open-io/bap-cli.git
cd bap-cli
bun install
bun run build
bun link
```
### Installing bbackup
```bash
git clone https://github.com/rohenaz/bitcoin-backup.git
cd bitcoin-backup
bun install
bun run build
bun link
```
## Tool Selection Guide
Choose the appropriate tool based on the task:
### Use bap-cli when:
- Creating new BAP identities
- Listing identities in a master backup
- Extracting member identities from master backup
- Working specifically with BAP identity structures
- Generating test fixtures for automated tests
### Use bbackup when:
- Encrypting arbitrary JSON data to .bep format
- Decrypting .bep files to inspect contents
- Upgrading encryption strength (100k → 600k iterations)
- Working with non-BAP backup formats (WifBackup, OneSatBackup, VaultBackup)
- Need lower-level control over encryption parameters
### Use both when:
- Inspecting BAP identities created by bap-cli
- Re-encrypting backups with different passwords
- Migrating between encryption strengths
- Debugging backup file issues
## Core Operations with bap-cli
### Creating New Identity Backups
When users request a new BAP identity, use the `bap new` command with appropriate backup type:
**Type42 backups** (recommended for simplicity):
- Use random root private key
- Simpler key management
- Suitable for most use cases
```bash
bap new --type type42 --password <password> --name "<name>" --output <file.bep>
```
**Legacy (BIP32) backups** (for hierarchical deterministic wallets):
- Use HD derivation from mnemonic
- Generates BIP32 mnemonic phrase
- Required when mnemonic recovery is needed
```bash
bap new --type legacy --password <password> --name "<name>" --output <file.bep>
```
**Important**: Always use strong passwords. The password encrypts the backup file and cannot be recovered if lost.
### Listing Identities
When users need to see what identities are in a backup file, use `bap list`:
```bash
bap list <backup.bep> --password <password>
```
This displays:
- All identity keys with their indices
- Backup type (Type42 or Legacy)
- Number of identities in the backup
Use this before extracting member identities to determine the correct index.
### Extracting Member Identities
When users need to extract a single identity from a master backup (common for distributing individual identities), use `bap member`:
```bash
bap member <master.bep> --password <password> --index <index> --output <member.bep>
```
The index is zero-based. To find the correct index:
1. First run `bap list` on the master backup
2. Note the index of the desired identity
3. Extract using that index
### Decrypting and Inspecting Backups
When users need to view the contents of an encrypted backup, use `bap export`:
```bash
bap export <backup.bep> --password <password>
```
This outputs the decrypted JSON structure. Use this to:
- Debug backup issues
- Verify backup contents
- Inspect identity structure
Optionally save re-encrypted version:
```bash
bap export <backup.bep> --password <password> --output <new.bep>
```
## Core Operations with bbackup
### Encrypting JSON Files
When users have JSON data that needs encryption:
```bash
bbackup enc <input.json> -p <password> [-o <output.bep>]
```
**Use cases:**
- Encrypting manually created backup JSON
- Encrypting exported identity data
- Creating custom encrypted payloads
**Example:**
```bash
# Create JSON file
echo '{"wif":"L5EZftvrYa...","label":"My Key"}' > wallet.json
# Encrypt it
bbackup enc wallet.json -p "strongpass" -o wallet.bep
```
### Decrypting to JSON
When users need to inspect encrypted .bep files:
```bash
bbackup dec <input.bep> -p <password> [-o <output.json>]
```
**Use cases:**
- Inspecting backup contents
- Debugging encrypted files
- Extracting data for processing
**Example:**
```bash
# Decrypt to JSON
bbackup dec identity.bep -p "password" -o identity.json
# View contents
cat identity.json
```
### Upgrading Encryption Strength
When users have older backups with weaker encryption (100k iterations):
```bash
bbackup upg <old.bep> -p <password> -o <upgraded.bep>
```
This upgrades to 600,000 PBKDF2 iterations (NIST recommended).
**Use cases:**
- Strengthening security of existing backups
- Migrating legacy backups
- Preparing backups for long-term storage
## Combined Workflows
### Inspect BAP Identity Using bbackup
When users need to examine a BAP identity created by bap-cli:
```bash
# Create identity with bap-cli
bap new --type type42 --password pass123 --name "Alice" --output alice.bep
# Decrypt with bbackup to inspect
bbackup dec alice.bep -p pass123 -o alice.json
# View the JSON structure
cat alice.json
# Shows: { "ids": "...", "rootPk": "...", "label": "Alice", "createdAt": "..." }
```
This is useful for:
- Understanding the internal structure
- Debugging identity issues
- Verifying backup contents
- Extracting specific fields programmatically
### Change Password on BAP Identity
When users need to re-encrypt a backup with a different password:
```bash
# Decrypt with old password
bbackup dec identity.bep -p "oldpass" -o identity.json
# Re-encrypt with new password
bbackup enc identity.json -p "newpass" -o identity-new.bep
# Clean up temporary file
rm identity.json
```
### Upgrade Security of BAP Backup
When users have older BTesting patterns for PHPUnit and Playwright E2E tests. Use when writing tests, debugging test failures, setting up test coverage, or implementing test patterns for ActivityPub features.
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use for submitting experiments via API, tracking experiment status, downloading results, optimizing protein sequences for better expression using computational tools (NetSolP, SoluProt, SolubleMPNN, ESM), or managing protein design workflows with wet-lab validation.
Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.