ClaudeMods
☰
ZH-TW
● 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.

其他同名作品

更多類似作品