Safe Share
Use this skill to produce a safe-to-share copy of text. Prefer deterministic local sanitization over model-only guessing.
Workflow
- 1. Confirm the user wants a shareable copy, not a forensic analysis.
- Determine the output mode:
-
placeholder: best default for docs, issues, READMEs, and tutorials
-
redact: best when preserving shape is not important
-
mask: best when keeping a hint of the original value is useful
- 3. Run
scripts/sanitize_text.py on the exact text the user provided. - Return:
-
sanitized_text
-
findings_summary
-
review_notes
- 5. Never echo the original sensitive value back to the user.
Operating Rules
- - Default to
placeholder mode unless the user asks for something else. - Treat secrets and credentials as higher priority than general PII.
- Replace with stable labels such as
<OPENAI_API_KEY> or [REDACTED:BEARER_TOKEN]. - Keep summaries high level. Report type and count, not the captured value.
- State clearly that sanitization reduces risk but does not guarantee complete detection.
- Do not scan unrelated files or repositories unless the user explicitly asks for that broader scope.
- Do not send text to external services for classification or validation.
High-Risk Patterns
Prioritize these categories:
- - API keys and secret tokens
- Authorization headers and bearer tokens
- Cookies and session identifiers
- INLINECODE10 -style credentials and password assignments
- Private key blocks and PEM material
- Sensitive URL query parameters
Then handle lower-risk identifiers:
- - Email addresses
- Phone numbers
- IP addresses
- National ID or payment-card-like strings when confidence is high
Output Contract
Use the JSON contract from references/output-format.md when returning structured results from the script. If answering in prose, include the same three sections in human-readable form.
Resources
- - Detection and replacement behavior: INLINECODE12
- Output structure and reviewer guidance: INLINECODE13
- Smoke-test inputs and expected behavior: INLINECODE14
- Deterministic local sanitizer: INLINECODE15
安全分享
使用此技能生成可安全分享的文本副本。优先采用确定性本地脱敏处理,而非仅依赖模型猜测。
工作流程
- 1. 确认用户需要的是可分享副本,而非取证分析。
- 确定输出模式:
- 占位符:文档、问题反馈、README和教程的最佳默认选项
- 涂黑:当保留文本形状不重要时的最佳选择
- 掩码:当需要保留原始值提示信息时的最佳选择
- 3. 对用户提供的原始文本运行scripts/sanitize_text.py脚本。
- 返回:
- 脱敏文本
- 发现摘要
- 审核备注
- 5. 切勿将原始敏感值回显给用户。
操作规则
- - 默认使用占位符模式,除非用户另有要求。
- 将密钥和凭证的优先级置于常规个人身份信息之上。
- 使用稳定标签进行替换,例如APIKEY>或[已涂黑:BEARER_TOKEN]。
- 保持摘要的概括性。报告类型和数量,而非捕获的具体值。
- 明确说明脱敏处理可降低风险,但无法保证完全检测。
- 除非用户明确要求扩大范围,否则不扫描无关文件或代码库。
- 不将文本发送至外部服务进行分类或验证。
高风险模式
优先处理以下类别:
- - API密钥和秘密令牌
- 授权标头和持有者令牌
- Cookie和会话标识符
- .env格式的凭证和密码赋值
- 私钥块和PEM材料
- 敏感的URL查询参数
其次处理低风险标识符:
- - 电子邮件地址
- 电话号码
- IP地址
- 高置信度下的国民身份证或支付卡类字符串
输出规范
从脚本返回结构化结果时,使用references/output-format.md中的JSON规范。若以散文形式回答,请以人类可读格式包含相同的三个部分。
资源
- - 检测与替换行为:references/patterns.md
- 输出结构与审核指南:references/output-format.md
- 冒烟测试输入与预期行为:references/test-cases.md
- 确定性本地脱敏器:scripts/sanitize_text.py