Opensecretmask — AI skill for Claude Code
Secret masking for Claude Code.
How to install Opensecretmask
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open pratikbin/opensecretmask and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Opensecretmask does
Secret masking for Claude Code. Every credential becomes a format-preserving fake before the model reads it, and the real value is restored on the way into a tool call — so Claude keeps working, without ever seeing your keys.
Alternatives in AI
- Context Engineering Intro — GitHub Repo stars Context engineering - the new way of AI coding assistants Context engineering guide 12.8k ★
- LongHorizon Harness — The long-horizon computer-use harness 1.3k ★
- Phantom — An AI co-worker with its own computer 1.3k ★
README
osm
**Keep your API keys out of the model, without breaking what the model can do.**
A [Claude Code](https://claude.com/claude-code) plugin. It swaps every secret for a format-preserving fake before Claude reads it, and puts the real value back on the way into a tool call.

A real session, not a mock-up: the plugin is installed, a file holding `sk-ant-api03-Kv8Tz2…` is written and `cat`-ed, and the model answers with a *different* 74-character key of the same shape. `/osm-secrets` prints the pair. Recorded by [`scripts/record-demo.sh`](scripts/record-demo.sh).
flowchart LR
ENV[".env / tool output
sk-ant-api03-Kv8Tz2…"]
MASK["mask"]
MODEL["Claude
sk-ant-bpc23-VpONd6…"]
REST["restore"]
SHELL["your shell
sk-ant-api03-Kv8Tz2…"]
VAULT[("vault
fake ⇄ real")]
ENV --> MASK --> MODEL --> REST --> SHELL
MASK -.-> VAULT
VAULT -.-> REST
classDef real fill:#1f6f43,stroke:#2ea16a,color:#fff
classDef fake fill:#7a4b16,stroke:#c98a3a,color:#fff
class ENV,SHELL real
class MODEL fake
Why a fake and not `[REDACTED]`
A fake keeps the vendor prefix, the length and the character classes of the real value: `sk-ant-api03-Xk9…` becomes `sk-ant-nvd59-RAT…`.
`[REDACTED]` tells the model something is *missing* — it stops treating the value as an Anthropic key and starts treating it as a hole. A same-shaped fake preserves the plan, so the model writes the command it would have written anyway. This is the whole point of the project.
Install
Needs Claude Code **2.1.272+**. Function hooks are early-access, so the flag is required.
claude plugin marketplace add pratikbin/opensecretmask
claude plugin install osm@opensecretmask
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude
Running from a clone (for working on the plugin itself)Related Skills
GitHub Demand Radar
AI Agent Skill to scan GitHub issues/PRs with JTBD + RICE scoring, find high-value market gaps, and generate f
MemoryGuard
Local-first Context Sync for AI coding agents. Keeps AGENTS.md, CLAUDE.md, MEMORY.md, and Cursor rules current
Token Proxy
Local AI API gateway for OpenAI / Gemini / Anthropic. Runs on your machine, keeps tokens counted (SQLite), off
Ajolote AI
Shared AI agent configuration for multi-tool teams. ajolote keeps a single canonical config (.agents/config.js
Ag.Sh
Command-line ADE tooling to run multiple Claude Code/AI agents in parallel - each in its own isolated git work
Undead AI Sessions
Your AI sessions refuse to die: Claude Code and Codex sessions come back in restored iTerm2 and Terminal.app t
Related Agents
Secret Purist
The paranoid sentinel of credential security. Use this agent to scan codebases and git history for leaked secr
Byok Token Security Expert
BYOK (Bring-Your-Own-Key) and OAuth token security expert. Deep on cross-platform OS keychain integration (mac
Gagarin CI
Wires a repository's CI pipeline to deploy to Gagarin Cloud on push — mints a scoped deploy credential, stores