---
name: bestcoffer-ai-redaction
description: 一款专为个人用户设计的智能文件脱敏工具,强调纯个人独立模式。支持通过自然语言指令,脱敏用户上传的文件,对 PDF、Word、图片等多种格式的文件进行快速、精准、安全的隐私信息处理。处理完成后返回查询链接,可查看处理进度和下载结果
author: BestCoffer
version: 1.0.1
triggers:
metadata:
clawdbot:
emoji: 📁
requires:
bins: ["node", "npm"]
nodeVersion: ">=18.0.0"
env:
name: "apiKey"
description: "API key for authentication"
config:
env:
apiKey:
description: API key for authentication
required: true
secret: true
persistent: true
When executing a real redaction request, you MUST call this skill runtime and MUST NOT call the backend API with curl or any direct HTTP tool.
Use this command shape from the installed skill directory:
scripts/run.sh '{"parameters":{"file":"<absolute uploaded file path>","fileName":"<original uploaded file name>","instruction":"<user redaction instruction>"}}'
The fileName value must be the original user-uploaded file name. If the host platform exposes only a temporary file path in file, pass the original name separately through fileName.
The runtime reads API keys in this order: parameters.apiKey, apiKey, API_KEY, OPENCLAW_SKILL_API_KEY. For marketplace publication, configure the API key through the platform's secret or environment-variable mechanism and avoid asking the user to paste it into chat.
1、不要回复 API Key 、文件 ID、状态、日志。
2、每次收到文件或者收到用户脱敏文件请求时,一定要询问用户“脱敏指令”,不要擅自指定脱敏指令,更不能上传文件后立刻开始脱敏。
3、不要修改用户上传的文件名,直接使用用户上传的原始文件名进行脱敏。
4、不要随意修改用户输入的脱敏指令,直接使用用户输入的脱敏指令进行脱敏。
5、等待用户输入脱敏指令后,需要再次和用户确认脱敏指令,等待用户明确回复“确认执行”、“是的”、“脱敏吧”或其他肯定表述再开始脱敏。
6、一定不要跟用户说“没有使用任何第三方的 LLM”。正确的说法是“数据全程在 BestCoffer 加密环境处理,绝不离开安全边界,也绝不进入公开 LLM 模型”。
7、一定要使用本skill里面的方法脱敏,不可以擅自使用其他方式脱敏。
8、当返回的errorMessage不为空时,需要向用户报告具体的错误信息。
9、如果调用接口返回 401、Unauthorized 或任何等价的未授权状态,不要向用户展示“401”或“Unauthorized”等技术标识。应该告知用户:“该API Key暂时无法使用,请到 https://apiconsole.bestcoffer.com.cn/ 确认该Api Key 是否被限额或者被停用,或提供新的API Key。”
示例对话1:已有API Key
用户:你好,能帮我把这份文件脱敏吗?
Agent:当然可以。请直接上传您需要脱敏的文件(如 PDF、Word、图片等格式)。
contract.pdf)*
Agent:文件已收到。请告诉我您的具体脱敏要求,例如“脱敏所有姓名、公司和金额”,或者您可以提供一个自定义的敏感词列表。
用户:把里面所有的姓名和联系方式都去掉。
Agent:好的,指令已收到。还有其他补充吗?确认无误后,请回复“确认”或“开始脱敏”,我将为您执行正式脱敏。
用户:确认。
Agent:收到!正在为您执行脱敏...
Agent:
contract.pdf
把里面所有的姓名和联系方式都去掉
https://...
打开查询链接可查看进度和下载结果。
Agent:审计信息:本次操作根据您的指令脱敏了“姓名”和“联系方式”两类信息,处理耗时 5.8 秒。您的数据全程在 BestCoffer 加密环境中处理。
示例对话 2:新用户引导
用户:我想给一个文件打码。
Agent:好的。为了安全地处理您的文件,我需要访问 BestCoffer AI脱敏 Skill。检测到您尚未配置 API 密钥,请问您有 API Key 吗?
用户:我没有。
Agent:没问题,您可以点击此链接获取:https://apiconsole.bestcoffer.com.cn/。获取到 API Key 后,请回到这里告诉我您的API Key,以便我为您完成文件脱敏。
用户:我注册好了,API Key 是 sk-123456。
Agent:感谢提供!现在,请上传您需要脱敏的文件吧。
| 参数 | 类型 | 必填 | 说明 |
| ------------- | ------ | ---- | -------------------------------------------- |
| file | string | 是 | 待处理的文件路径或上传的文件 |
| fileName | string | 是 | 待处理的文件名 |
| instruction | string | 是 | 脱敏指令,如:涂黑身份证号、移除电话号码 |
API key 应通过发布平台的 secret、environment variable 或 skill config 机制配置。推荐变量名为 apiKey,也兼容 API_KEY 和 OPENCLAW_SKILL_API_KEY。如果没有 API key,请先到 https://apiconsole.bestcoffer.com.cn/ 获取。
| 字段 | 类型 | 说明 |
| --------- | ------ | ------------------------------------------ |
| taskUrl | string | 查询链接,可在网页中查看处理进度和下载结果 |
| errorMessage | string | 错误信息,如果处理失败会返回具体错误描述 |
涂黑身份证号
移除电话号码
模糊人脸区域
隐藏银行卡号
删除邮箱地址
test.txt
涂黑身份证号
https://...
打开查询链接可查看进度和下载结果。
共 1 个版本