Bagman Skill — AI skill for Claude Code
Secure key management patterns for AI agents - storage, session keys, leak prevention, prompt injection defense.
How to install Bagman Skill
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open zscole/bagman-skill and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Bagman Skill does
Secure key management patterns for AI agents - storage, session keys, leak prevention, prompt injection defense.
Alternatives in AI
- Hol Guard — Open-source antivirus for AI agents: block risky tools, secret access, prompt injection, malicious packages, M 485 ★
- Prismor — Self-hosted runtime control plane for AI agents 334 ★
- AI Claude Start — Multi-profile Claude Code launcher with secure credential management 219 ★
README
Bagman
Secure key management patterns for AI agents handling wallets, private keys, and secrets.
**Bagman** solves the three critical problems of agentic key management:
- Key Loss — Agents forget credentials between sessions
- Accidental Exposure — Keys leaked to GitHub, logs, or outputs
- Prompt Injection — Malicious prompts extracting secrets
Quick Start
Choose Your Backend
Bagman supports multiple secret storage backends. **No 1Password required.**
| Backend | Setup | Best For |
|---|---|---|
| macOS Keychain | None (native) | macOS users, zero setup |
| 1Password CLI | brew install 1password-cli |
Teams, rich metadata |
| Encrypted File | brew install age |
Portable, git-friendly |
| Environment Vars | None | CI/CD, containers |
Bagman auto-detects the best available backend.
Install
# Clone
git clone https://github.com/zscole/bagman-skill.git
cd bagman-skill
# Optional: Install backend dependencies
brew install age # For encrypted file backend
brew install 1password-cli # For 1Password backend
Usage
from examples.secret_manager import get_secret, get_session_key
# Auto-detects backend
api_key = get_secret("openai-key")
# With session metadata
creds = get_session_key("trading-bot")
if creds.is_expired():
raise ValueError("Session expired")
print(f"Backend: {creds.backend}")
print(f"Expires: {creds.time_remaining()}")
Force Specific Backend
from examples.backends import get_backend
# Force macOS Keychain
backend = get_backend("keychain")
# Force 1Password
backend = get_backend("1password", vault="My-Vault")
# Force encrypted file
backend = get_backend("encrypted_file", path="~/.secrets.age")
# Force environment variables
backend = get_backend("env")
Or via environment variable:
export BAGMAN_BACKEND=keychain
Backends
macOS Keychain (Default on macOS)
Zero setup required. Uses native `
Related Skills
Secure Agent
🔐 Egress inspection & secret-leak firewall for local AI agents — see what your agents send, catch secrets bef
Dsh Output Styles
Claude Code outputStyles for DeepSeek Harness - session-scoped, durable, runtime-switchable model output style
Secure AI Customer Support Platform
Secure LLM-powered customer support platform: an AI agent (Claude) with grounded RAG answers, authorization-en
Local Secure Prompt Agent
Browser extension that redacts PII (emails, phone numbers, Aadhaar/PAN, API keys, names, locations) from promp
Prompt Injection Scanner
A zero-dependency Python CLI that scans READMEs, SKILL files, and source code for prompt-injection patterns ta
Peace
A zero-server, browser-based AI chat UI with "forced thinking" routing and Claude-like skills. Bring your own
Related Agents
Adk Reviewer
Reviews Google ADK 1.29.0 agent code. Checks ADK-specific patterns, tool contracts, session management, SSE st
Kavach LLM
KAVACH LLM/AI security specialist. Audits prompt injection (direct + indirect/RAG), jailbreak/persona/system-p
Security Architecture
Boucle implements a defense-in-depth security model to protect against prompt injection attacks and maintain t