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
- LongHorizon Harness — The long-horizon computer-use harness 1.3k ★
- Phantom — An AI co-worker with its own computer 1.3k ★
- Shuorenhua — 说人话|Chinese-first AI writing refinement skill that reduces boilerplate and AI tone while preserving facts, ter 262 ★
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
AI Credential Safety
Guide to protecting API keys and credentials from AI agent exposure — .env safety, secret scanning, and Secret
Motus
Keep API keys and tokens out of your AI coding agent. Redacts exact secret values from tool output and session
MemoryGuard
Local-first Context Sync for AI coding agents. Keeps AGENTS.md, CLAUDE.md, MEMORY.md, and Cursor rules current
Claude Code Secret Guard
Claude Code mod that keeps API keys, tokens and passwords out of the model's context: gitleaks scans every too
Token Proxy
Local AI API gateway for OpenAI / Gemini / Anthropic. Runs on your machine, keeps tokens counted (SQLite), off
Related Agents
Deeplink Clipboard Auditor
Audits deep link / Universal Link / App Link handling for parameter trust and hijack risk, and clipboard usage
Feedback Fact
Feedback subagent 1. Decides whether one piece of human feedback becomes a long-lasting fact, rule or hint, an
Secret Field Auditor
Audits ZAQ Ecto schemas for sensitive fields (api_key, token, password, secret, credential) that are stored in