ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 Fazzani

secret-mask

在 Claude Code transcript 中遮蔽秘密(API 密钥、token、密码、私钥);将鼠标悬停在被遮蔽的值上即可显示。

Fazzani@Fazzani

Fazzani/claude-mods/tree/main/plugins/secret-mask

已翻译

关于这个 mod

在 Claude Code transcript 中遮蔽秘密。将鼠标移到被遮蔽的值上即可显示。

● 你的密钥是 sk-a•••••••• ← 悬停 → sk-ant-api03-AbCd…

检测内容:私钥区块、Anthropic / OpenAI / GitHub / GitLab / Slack / Google / Stripe / npm token、AWS 访问密钥和秘密密钥、JWT、Azure AccountKey= / SharedAccessKey= / sig=、URL 中的密码(postgres://user:pass@host)、Bearer token,以及通用赋值(password=…、api_key: …、client_secret=…)。引用和占位符(${TOKEN}、<key>、process.env.X、xxxx)会保持原样。规则位于 hooks/patterns.ts。

遮蔽位置:assistant 回复和提示(遮蔽后可悬停显示)、bash 输出和文本结果(遮蔽前 12 行;ctrl+o 显示其余内容)、工具调用参数 / 结构化结果 / 其他代理发送的消息(遮蔽,不可显示)。遮蔽只改变屏幕显示;模型和 transcript 文件仍然看到真实值。悬停需要能够报告指针的界面:桌面应用或终端的全屏布局。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add Fazzani/claude-mods
claude plugin install secret-mask
原文 / README

secret-mask

Masks secrets in the Claude Code transcript. Hover a masked value with the mouse to reveal it.

● Your key is sk-a••••••••      ← hover → sk-ant-api03-AbCd…

What is detected

Private key blocks, Anthropic / OpenAI / GitHub / GitLab / Slack / Google / Stripe / npm tokens, AWS access keys and secret keys, JWTs, Azure AccountKey= / SharedAccessKey= / sig=, passwords in URLs (postgres://user:pass@host), Bearer tokens, and generic assignments (password=…, api_key: …, client_secret=…). References and placeholders (${TOKEN}, <key>, process.env.X, xxxx) are left alone. The rules live in hooks/patterns.ts.

Where

| Row | Behaviour | | --- | --- | | Assistant replies, your prompts | Masked, with hover reveal (a reply that contains a secret is drawn as plain text, not markdown) | | Bash output and other text results | Masked, with hover reveal (first 12 lines; ctrl+o shows the rest) | | Tool call arguments, structured results, messages from other agents | Masked, no reveal |

Masking only changes what the screen shows. The model and the transcript file still see the real values.

Hover needs a surface that reports the pointer: the desktop app, or the terminal's fullscreen layout.

其他同名作品

更多类似作品