---
title: "Redact Restore - 開源 Claude Code 模組，可遮蔽敏感資料並在本機還原"
url: "https://claudemods.dev/zh-tw/builds/redact-restore-open-source-claude-code-mod-that-masks-sensit-840b1a"
source: "https://www.reddit.com/r/coolgithubprojects/comments/1x3qzhe/redact_restore_opensource_claude_code_mod_that"
source_type: "reddit"
author: "lidedax657"
author_handle: "lidedax657"
stars: 0
category: "安全與隱私"
categories: ["security"]
tags: ["hooks", "privacy", "redaction", "secrets", "typescript"]
permission_level: null
scan_complete: false
added: "2026-10-16T16:50:05.872Z"
updated: "2026-10-16T16:50:05.872Z"
locale: "zh-tw"
content_locale: "zh-tw"
---

# Redact Restore - 開源 Claude Code 模組，可遮蔽敏感資料並在本機還原

一個開源的 TypeScript Claude Code 模組，可在敏感資料（如 API 金鑰和電子郵件）到達模型之前將其遮蔽，並在本機還原原始值。

## Description

Redact Restore 是一個免費、開源的 TypeScript 模組，適用於 Claude Code，可在敏感資訊到達模型之前自動將其遮蔽，並在需要時在本機還原。功能包括針對常見機密和敏感資訊的 240 多條偵測規則、自訂遮蔽值、可逆預留位置、帶有本機掃描器和傳送前檢查的隱私控制、工作階段範圍的對應，以及與 Pro/Max 訂閱登入的原生 Claude Code 整合。授權為 AGPL-3.0。GitHub：isandrel/redact-restore。

## Original README

I've been building Redact Restore , a free, open-source TypeScript Mod for Claude Code that automatically redacts sensitive information before it reaches the model and restores it locally when needed. When working with AI coding tools, things like API keys, email addresses, and other personal information can easily end up in prompts, files, and tool outputs. I wanted to reduce that exposure while keeping the normal development workflow intact. What it does: 240+ detection rules for common secrets and sensitive information. Custom redaction: Add your own values or strings you want to protect. Reversible placeholders: The model works with masked values, while the originals can be restored locally in the UI and supported tool operations. Privacy controls: Configurable rules, a local scanner, and pre-send checks for detectable unmasked information. Session-scoped mappings: Keep redaction and restoration consistent throughout a conversation. Native Claude Code integration: Works with the official Pro/Max subscription login. A simple example: Your original text: Contact alice@example.com What the model receives: Contact {{PRIVATE:EMAIL#...}} The original value can then be restored locally when needed. Tech stack: TypeScript, Claude Code Mods API License: AGPL-3.0 — free and open source. GitHub: isandrel/redact-restore I'd love to hear your feedback, especially about usability, potential privacy or security issues, and features you'd find useful. Contributions are welcome too!   submitted by   /u/lidedax657   to   r/coolgithubprojects [link]   [comments]
