← 返回 Skills 市场
134
总下载
1
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install universal-watermarker
功能描述
Adds customizable text watermarks with adjustable opacity and layout to PDFs and images, saving results with wm_ prefix in the original folder.
使用说明 (SKILL.md)
Universal Watermarker Skill
一款具有高度工程化水准的文件防伪处理工具。支持 PDF 与图片混批,内置响应式排版引擎,字体自动映射与文件全内置,彻底解决乱码、水印移位与缩放兼容性问题。
核心模式 (Modes)
diagonal(对角单水印 - 默认):水印从画面左下角贯穿至右上角。极客级三角函数计算,无论文档是横是竖,均能保证完美端对端覆盖。center(居中单水印):水平放置于文档核心视角的正中央。tile(全图平铺):满屏交叉斜向覆盖,极致防伪。
运行环境
- Language: Python 3.8+
- Dependencies: pypdf, reportlab, Pillow
- OS Support: Windows, macOS, Linux (无系统级底层 GUI 依赖)
参数定义 (Parameters)
| 参数名 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
files |
list/string | 是 | 无 | 待处理的文件路径(支持单个路径字符串或路径列表)。 |
text |
string | 是 | 无 | 水印文字内容(如 "内部机密")。 |
opacity |
float | 否 | 0.3 |
水印不透明度,范围 0.0 到 1.0。 |
scale |
float | 否 | None (智能默认) |
响应式字体比例 (0.0~1.0)。\x3Cbr>diagonal 默认 0.8(占据对角线 80%)\x3Cbr>center 默认 0.5(占据画面宽度 50%)\x3Cbr>tile 默认 0.25。 |
mode |
string | 否 | "diagonal" |
渲染模式:"diagonal", "center", "tile"。 |
angle |
int | 否 | 30 |
水印倾斜角度(仅在 mode="tile" 时生效)。 |
auto_adjust |
bool | 否 | True |
自动背景亮度感应,在 color 为 None 时智能切换深色/浅色水印。 |
color |
string/tuple | 否 | None |
自定义水印颜色,可传入十六进制 "#FF0000" 或 RGB 元组 (255,0,0)。若设置,将无视自动亮度调节。 |
font_path |
string | 否 | "./fonts/AlibabaPuHuiTi-3-65-Medium.ttf" |
字体文件路径,支持 .ttf 和 .ttc。 |
输入与输出规范 (I/O)
- 存储位置: 处理后的文件直接保存在原文件所在目录下。
- 命名约定: 输出文件名为
wm_前缀加上原文件名。
AI 调用指令参考 (Instructions for LLM)
- 语义推断:如果用户要求“防伪”、“机密保护”、“铺满”,请自动设置
mode="tile"。如果用户要求“淡一点”,请将opacity调低至 0.1-0.2。 - 确认闭环:执行
process_files完毕后,必须向用户明确播报输出文件的确切路径和名称,不要让用户自己去寻找。
安全使用建议
This skill appears to do what it claims (watermark images/PDFs). Before installing: 1) Review the complete main.py (the provided excerpt is truncated) to confirm there are no additional network endpoints or unexpected behavior. 2) Note it will download a font at first run from https://raw.githubusercontent.com — verify that URL and the font license are acceptable for you. 3) Install dependencies (pypdf, reportlab, Pillow) in an isolated virtualenv or sandbox and run tests on non-sensitive files first. 4) Confirm output naming/paths (wm_ prefix, saved next to originals) are acceptable and that no unrelated files are modified. If you cannot review the full source, run it in a restricted environment or decline installation.
功能分析
Type: OpenClaw Skill
Name: universal-watermarker
Version: 2.0.0
The skill is a legitimate utility for watermarking PDF and image files using standard libraries like Pillow, pypdf, and reportlab. The code in main.py implements responsive watermarking logic (diagonal, center, and tile modes) and includes a setup function to download a necessary font file from the author's GitHub repository (raw.githubusercontent.com/cribug/universal-watermarker). The instructions in SKILL.md are well-aligned with the tool's purpose, providing helpful guidance for the AI agent without any signs of prompt injection or malicious intent.
能力评估
Purpose & Capability
Name, description, SKILL.md, requirements.txt, and main.py all align: the code implements text watermarks for images and PDFs and saves outputs with a prefix in the original folder.
Instruction Scope
SKILL.md keeps scope to watermarking behavior (modes, parameters, and confirming output paths). It does not instruct reading unrelated system files or requiring unrelated credentials.
Install Mechanism
There is no install spec (instruction-only from registry), but main.py will at runtime fetch a font from raw.githubusercontent.com into ./fonts. Using raw.githubusercontent.com is a common, generally acceptable pattern for static assets, but it is an external network fetch and should be noted.
Credentials
The skill requests no environment variables or credentials. The code shown does not access secrets or unrelated system config; its write access is limited to creating a ./fonts folder and writing output files next to inputs.
Persistence & Privilege
Skill is not always-enabled, does not request persistent system-wide privileges, and does not modify other skills' configs. Its file writes are confined to fonts/ and the original file directories.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install universal-watermarker - 安装完成后,直接呼叫该 Skill 的名称或使用
/universal-watermarker触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
Universal Watermarker 2.0.0 is a major upgrade with expanded features and more precise customization:
- 新增 `diagonal` 模式,默认采用左下至右上的对角水印,自动完美覆盖各类文档。
- 支持 `scale` 参数,实现水印自动响应式缩放。
- 增加 `color` 参数,可自定义水印颜色,或启用智能亮度水印切换(`auto_adjust`)。
- 支持自定义字体文件路径(`font_path`),实现全内嵌兼容,杜绝乱码与移位。
- 详细完善模式说明,支持 PDF 与主流图片混批操作。
v1.1.0
- Added new parameter: `auto_adjust` (bool, default: True) — automatically switches watermark color (black/white) based on background brightness.
- Existing features and parameter behaviors remain unchanged.
v1.0.0
Universal Watermarker v1.0.0 – Initial Release
- Add customizable text watermarks to PDF, JPG, PNG, and BMP files.
- Supports both single-center and anti-counterfeit tiling watermark modes.
- Adjustable font size, opacity, angle (for tiling), and smart cross-platform Chinese font recognition.
- Watermarked files are output with a wm_ prefix in the source file’s directory.
- Fully cross-platform; no system-level GUI dependencies required.
元数据
常见问题
Universal Watermarker 是什么?
Adds customizable text watermarks with adjustable opacity and layout to PDFs and images, saving results with wm_ prefix in the original folder. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 134 次。
如何安装 Universal Watermarker?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install universal-watermarker」即可一键安装,无需额外配置。
Universal Watermarker 是免费的吗?
是的,Universal Watermarker 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Universal Watermarker 支持哪些平台?
Universal Watermarker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Universal Watermarker?
由 cribug(@cribug)开发并维护,当前版本 v2.0.0。
推荐 Skills