osm
by pratikbin · ★ 2 · updated 17 Oct 2026
Replaces a secret with a format-preserving fake before the model reads it, and restores the real credential on the way into a tool call. The map lives in memory; turn persist on to carry it across a resume or a reload.
Install
/plugin marketplace add pratikbin/opensecretmask/plugin install osm@opensecretmaskThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
session.starttool.callagent.spawnsession.sendprompt.submitskill.promptsession.receiveprompt.contextprompt.sectionsession.compactsession.appendcommand.run- API calls
$.command.register$.fs.read$.store.get$.store.set$.ui.log$.ui.status- Can see
every tool callsubagent spawnsevery promptevery skillthe system promptcompaction- Reach
- level 1 of 3 reads filespersists statedraws
Origin
- How it got here
- Found through a post on X by @pratikbin, then checked on GitHub: the repo has a plugin manifest and function hooks. Listed .
- Repository
- github.com/pratikbin/opensecretmask
- Path in repo
- repository root
- Source commit
ec6dffdthe exact code the scan read- Author
- @pratikbin
- License
- MIT
- First published
- Last pushed
- First listed here
- On X
- Mentioned in 1 post on X
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.
Posts about this repo
@bcherny Mods are amazing, Since this was in alpha a month back, I created mod which will mask secrets with similar strings locally, so none of the credentials will make it to the API servers of Anthropic or any other https://github.com/pratikbin/opensecretmask