---
title: "Redact Restore - 开源 Claude Code 模组，可遮蔽敏感数据并在本地恢复"
url: "https://claudemods.dev/zh-cn/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-cn"
content_locale: "zh-cn"
---

# 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]
