Skip to content

serejaris/telegram-skills / skills/tg-sticker-pack

tg-sticker-pack

Verified

Use when making static Telegram stickers or a sticker pack from a meme frame, photo or video: cut the person out, put a caption on top (WordArt, Impact, label tags), check the 512 px PNG/WEBP format offline, and publish the set from a user account through @Stickers or from a bot through createNewStickerSet / addStickerToSet.

FileKindSize
SKILL.mdskill md4.2 KB
scripts/check_sticker.pyscript3.6 KB
scripts/cut.pyscript1023 B
scripts/sticker.pyscript8.6 KB
tests/test_check_sticker.pyscript3.3 KB

scripts/cut.py

View on GitHub
#!/usr/bin/env python3
import argparse

from PIL import Image
from rembg import new_session, remove


def main():
    p = argparse.ArgumentParser(description="Cut a person out of a video frame")
    p.add_argument("frame")
    p.add_argument("out", help="lossless .webp or .png with alpha")
    p.add_argument("--box", help="x0,y0,x1,y1 crop before cutting")
    p.add_argument("--model", default="birefnet-portrait")
    a = p.parse_args()
    im = Image.open(a.frame).convert("RGB")
    if a.box:
        im = im.crop(tuple(int(v) for v in a.box.split(",")))
    res = remove(im, session=new_session(a.model))
    res = res.crop(res.getchannel("A").point(lambda v: 255 if v > 40 else 0).getbbox())
    res.save(a.out, lossless=True) if a.out.endswith(".webp") else res.save(a.out)
    bg = Image.new("RGBA", res.size, (40, 160, 90, 255))
    bg.alpha_composite(res)
    preview = a.out.rsplit(".", 1)[0] + "-green.jpg"
    bg.convert("RGB").save(preview)
    print(a.out, preview)


if __name__ == "__main__":
    main()
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall