PhilRobinluo/ai-coevolution-skills / skills/lls-image-privacy-redactor
lls-image-privacy-redactor
Verified在截图、照片和教程图片公开前,建立敏感信息清单,按人工确认坐标生成不覆盖原图的脱敏副本,并输出遮挡范围、哈希和复核报告。用于隐藏账号、路径、密钥、身份信息、客户资料、二维码或界面侧栏时;高风险文本默认使用带边距的纯色遮挡,模糊和像素化只用于低风险视觉匿名,发布前必须重新查看整张成品。
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 1.8 KB |
| SKILL.md | skill md | 6.5 KB |
| references/redaction-review.md | markdown | 662 B |
| scripts/redact_image.pyexecutable | script | 3.8 KB |
| tests/test_redact_image.py | script | 1.2 KB |
tests/test_redact_image.py
View on GitHubimport json,subprocess,sys,tempfile,unittest
from pathlib import Path
from PIL import Image,ImageDraw
ROOT=Path(__file__).resolve().parents[1]
class TestRedact(unittest.TestCase):
def test_solid_redaction_and_report(self):
with tempfile.TemporaryDirectory() as d:
d=Path(d); src=d/'in.png'; out=d/'out.png'; rep=d/'report.json'
im=Image.new('RGB',(200,120),'white'); ImageDraw.Draw(im).text((50,40),'TOKEN-123',fill='black'); im.save(src)
subprocess.run([sys.executable,str(ROOT/'scripts/redact_image.py'),str(src),str(out),'--box','45,30,100,35','--padding','0','--report',str(rep)],check=True,capture_output=True,text=True)
got=Image.open(out); self.assertEqual(got.getpixel((50,40)),(17,17,17)); self.assertNotEqual(src.read_bytes(),out.read_bytes())
data=json.loads(rep.read_text()); self.assertTrue(data['review_required']); self.assertEqual(len(data['boxes']),1)
def test_refuses_in_place(self):
with tempfile.TemporaryDirectory() as d:
p=Path(d)/'in.png'; Image.new('RGB',(20,20),'white').save(p)
r=subprocess.run([sys.executable,str(ROOT/'scripts/redact_image.py'),str(p),str(p),'--box','1,1,5,5'],capture_output=True,text=True)
self.assertNotEqual(r.returncode,0)
if __name__=='__main__': unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |