Skip to content
Back to search

stamp-edge-skill

Agent skill: turn any image into a postage-stamp style card with perforated edges and true transparent background

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/xianxie6--stamp-edge-skill/badge.svg)](/listings/xianxie6--stamp-edge-skill)

HTML

<a href="/listings/xianxie6--stamp-edge-skill"><img src="/api/listings/xianxie6--stamp-edge-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 63 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: stamp-edge
  3. description: 把任意图片处理成邮票风格——直接在原图四周边缘打半圆锯齿孔洞 + 柔和投影,默认无白边、输出真透明背景 PNG(锯齿孔洞和四周 alpha=0),可直接叠加到任何背景;可选加白色纸边;还能把多张邮票拼成等宽列瀑布流合集图(stamp sheet)。当用户提到"邮票边"、"邮票风格"、"邮票质感"、"锯齿边"、"打孔边"、"perforated edge"、"stamp style"、"postage stamp"、"邮票合集"、"邮票排版"、"stamp sheet",或要求把截图/帖子/图片做成邮票效果时使用。
  4. version: 1.2.0
  5. ---
  6. # 邮票风格边框 Skill
  7. 把图片处理成邮票样式:**默认直接在原图四周边缘打半圆锯齿孔洞(无白边)**,底部柔和投影,**输出真透明背景 PNG**(孔洞与四周 alpha=0),可直接当贴纸/素材叠加使用。需要白色纸边时加 `margin` 选项。
  8. ## 使用方式
  9. 直接运行本目录下的脚本(依赖 Pillow):
  10. ```bash
  11. python3 ~/.agents/skills/stamp-edge/stamp_effect.py <输入图> <输出图.png> # 无白边 + 透明背景(默认)
  12. python3 ~/.agents/skills/stamp-edge/stamp_effect.py <输入图> <输出图.png> margin # 加白边
  13. python3 ~/.agents/skills/stamp-edge/stamp_effect.py <输入图> <输出图.png> bg # 浅灰白背景
  14. ```
  15. 选项可组合,如 `margin bg`。
  16. - 输入:任意常见格式截图/图片(PNG/JPG 等)
  17. - 输出:PNG;默认 RGBA 真透明,加 `bg` 参数则为浅灰白底成品图
  18. - 输出文件默认建议存到 `~/Desktop/`,文件名用内容语义命名(如 `analytics_stamp.png`)
  19. ## 拼合集图(stamp_sheet.py)
  20. 多张邮票生成后,用本目录下的 `stamp_sheet.py` 拼成一张合集:**等宽列瀑布流,每张邮票撑满列宽、无留白,列高自动贪心均衡**:
  21. ```bash
  22. python3 ~/.agents/skills/stamp-edge/stamp_sheet.py ~/Desktop/stamp_grid.png *_stamp.png # 默认 4 列深色底
  23. python3 ~/.agents/skills/stamp-edge/stamp_sheet.py ~/Desktop/sheet.png --cols 3 --bg "#f5f2ea" -- *_stamp.png # 自定义列数/底色
  24. ```
  25. - `--cols`:列数(默认 4);`--bg`:背景色 hex(默认 `#0e0e0e` 近黑,配投影效果好;米白纸面风用 `#f5f2ea`);`--colw`:列宽 px(默认 780)
  26. - 邮票默认真透明背景,直接叠任意底色;排完后用 ReadMediaFile 读回确认效果
  27. - 注意:贪心均衡会打乱传入顺序以平衡列高,这是预期行为
  28. ## 工作流
  29. 1. 从用户消息中定位输入图片路径(用户粘贴的图片通常在 `~/.kimi-code/files/` 下取最新文件)
  30. 2. 运行脚本生成邮票图(默认:无白边、透明背景;用户明确要白边时加 `margin`)
  31. 3. 用 ReadMediaFile 读回成品确认效果(透明背景可先在脚本外套棋盘格预览验证)
  32. 4. 告知用户输出路径
  33. ## 可调参数(脚本顶部)
  34. | 参数 | 默认值 | 说明 |
  35. |------|--------|------|
  36. | `margin` | 0(传 `margin` 选项时 46) | 内容到锯齿边的白边宽度 |
  37. | `hole_r` | 14 | 打孔半圆半径 |
  38. | `pitch` | 46 | 打孔间距(= hole_r*2+18) |
  39. | `outer_pad` | 90 | 邮票外留白(投影空间) |
  40. | `shadow_alpha` | 70 | 投影不透明度 |
  41. 用户要求"孔更密/更疏、白边更宽、投影更淡"等时,改对应参数重跑即可,不要重写脚本。
  42. ## 注意事项
  43. - 投影是半透明灰色,叠深色背景无压力;叠纯白背景会看到淡影(正常设计)
  44. - 微信等平台直接发图会把透明 PNG 压成 JPG 丢失透明,需要保透明时提醒用户以文件形式发送
  45. - 批量处理多张图时,逐张调用脚本,不要改脚本去支持批量
README.md · README · 49 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # stamp-edge
  2. 把任意图片处理成邮票风格的 Agent Skill:四周半圆打孔锯齿边 + 柔和投影,**默认无白边、输出真透明背景 PNG**(锯齿孔洞与四周 alpha=0),可直接叠加到任意背景上当贴纸/素材使用;可选加白色纸边。还能把多张邮票一键拼成等宽列瀑布流合集图(stamp sheet)。
  3. ![example](example.png)
  4. ## 用法
  5. ```bash
  6. pip install Pillow
  7. # 无白边 + 透明背景(默认)
  8. python3 stamp_effect.py <输入图> <输出图.png>
  9. # 加白色纸边
  10. python3 stamp_effect.py <输入图> <输出图.png> margin
  11. # 浅灰白底成品图(可与 margin 组合)
  12. python3 stamp_effect.py <输入图> <输出图.png> bg
  13. ```
  14. ## 拼合集图
  15. 多张邮票生成后,用 `stamp_sheet.py` 拼成一张合集:等宽列瀑布流,每张邮票撑满列宽、无留白,列高自动贪心均衡。
  16. ```bash
  17. python3 stamp_sheet.py sheet.png *_stamp.png # 默认 4 列深色底
  18. python3 stamp_sheet.py sheet.png --cols 3 --bg "#f5f2ea" -- *_stamp.png
  19. ```
  20. ![example sheet](example_sheet.jpg)
  21. ## 作为 Skill 安装
  22. 把整个目录放到你的 Agent skills 目录(如 `~/.agents/skills/stamp-edge/`),之后对 Agent 说"把这张图做成邮票边"即可触发。
  23. ## 可调参数(脚本顶部)
  24. | 参数 | 默认值 | 说明 |
  25. |------|--------|------|
  26. | `margin` | 0(传 `margin` 选项时 46) | 内容到锯齿边的白边宽度 |
  27. | `hole_r` | 14 | 打孔半圆半径 |
  28. | `pitch` | 46 | 打孔间距 |
  29. | `outer_pad` | 90 | 邮票外留白(投影空间) |
  30. | `shadow_alpha` | 70 | 投影不透明度 |
  31. ## 注意
  32. - 微信等平台直接发图会把透明 PNG 压成 JPG 导致透明丢失,需保透明请以文件形式发送

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.