Skip to content

webkubor/charmoji-sticker-skill

charmoji

Verified

微信表情开放平台静态表情投稿全流程 SOP —— 一张 IP 正面照进,整套可提交素材出。覆盖 IP 命名与简介文案、9 情绪选题、museav 中台批量出图、240×240 表情图 / 750×400 详情页横幅 / 240×240 封面 / 50×50 聊天面板图标切图、透明背景与白描边机检、含义词字数校验、赞赏三件套、付费表情(10 微信豆)、审核红线与高频拒因;上架后还能一条命令出 1080×1920 竖版推广视频(合成走 reel-kit)。触发词:微信表情、表情包、表情专辑、表情投稿、提交表情、表情形象、微信表情开放平台、sticker、表情审核、含义词、赞赏引导图、付费表情、微信豆、表情封面、聊天面板图标、表情推广视频、表情包宣传片、表情串成视频。

FileKindSize
SKILL.mdskill md19.3 KB
examples/album.ymlconfig1.1 KB
examples/submit.mdmarkdown2.1 KB
references/animated.mdmarkdown8.8 KB
references/audit.mdmarkdown8.1 KB
references/ip-design.mdmarkdown4.4 KB
references/pitfalls.mdmarkdown15.1 KB
references/platform.mdmarkdown6.1 KB
references/specs.mdmarkdown9.7 KB
scripts/check_assets.pyexecutablescript12.9 KB
scripts/fit_assets.pyexecutablescript8.2 KB
scripts/gen_album.shexecutablescript7.5 KB
scripts/install_skill.pyexecutablescript9.0 KB
scripts/ip.pyscript34.8 KB
scripts/lint.shexecutablescript4.5 KB
scripts/make_gif.pyscript6.8 KB
scripts/make_promo.pyexecutablescript6.7 KB
scripts/make_submit.pyexecutablescript5.6 KB
scripts/new_album.shexecutablescript10.7 KB
scripts/page_tpl.pyscript10.9 KB
scripts/restyle.pyscript8.3 KB
templates/album.ymlconfig1.5 KB

scripts/lint.sh

View on GitHub
#!/usr/bin/env bash
# 脚本自检门禁 —— 改完脚本先跑这个,再跑真流程
#
#   lint.sh
#
# 检的都是 references/pitfalls.md 里真踩过的坑。写进文档拦不住重犯,
# 做成能跑的检查才拦得住 —— 第 1 条我在写完文档之后又犯了一次,所以有了这个脚本。
set -uo pipefail

S="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$S"
FAIL=0
# 只检业务脚本,不检门禁自身(它的提示文本里就带着这些反面写法)
TARGETS="gen_album.sh new_album.sh"

say() { printf '%s %s\n' "$1" "$2"; }

# 1) 变量名紧跟全角标点 → 标点字节被吞进变量名,set -u 报 unbound variable
hits=$(grep -nP '\$\{?[A-Za-z_][A-Za-z0-9_]*[^\x00-\x7F]' $TARGETS 2>/dev/null | grep -v '${' || true)
if [[ -n "$hits" ]]; then
  say "❌" "变量名后紧跟全角标点,须写 \${VAR}:"
  echo "$hits" | sed 's/^/     /'
  FAIL=$((FAIL + 1))
else
  say "✅" "变量与全角标点边界"
fi

# 2) 独立的 (( i++ )) → i=0 时返回 1,set -e 静默终止脚本
hits=$(grep -nE '^[[:space:]]*\(\([^)]*\+\+[^)]*\)\)[[:space:]]*$' $TARGETS 2>/dev/null || true)
if [[ -n "$hits" ]]; then
  say "❌" "独立的 (( i++ )) 在 i=0 时会终止脚本,改 i=\$((i + 1)):"
  echo "$hits" | sed 's/^/     /'
  FAIL=$((FAIL + 1))
else
  say "✅" "算术自增写法"
fi

# 3) wait -n 需要 bash 4.3+,macOS 自带 3.2
hits=$(grep -n 'wait -n' $TARGETS 2>/dev/null | grep -vE '#|say ' || true)
if [[ -n "$hits" ]]; then
  say "❌" "wait -n 需 bash 4.3+(macOS 是 3.2),改分批 wait:"
  echo "$hits" | sed 's/^/     /'
  FAIL=$((FAIL + 1))
else
  say "✅" "并发等待兼容性"
fi

# 4) 命令替换里只有一个外部命令且没 || true → 它失败就带走整个子 shell
hits=$(grep -nE '^[[:space:]]*[A-Za-z_]+=\$\((museav|curl|gh|glab|cs) [^|]*\)[[:space:]]*$' $TARGETS 2>/dev/null | grep -vE '\|\| *true' || true)
if [[ -n "$hits" ]]; then
  say "❌" "命令替换缺 || true,命令失败会被 set -e 静默带走:"
  echo "$hits" | sed 's/^/     /'
  FAIL=$((FAIL + 1))
else
  say "✅" "命令替换的失败兜底"
fi

# 5) pipefail 下含 grep 的管道赋值缺 || true → 无匹配即整个管道失败
hits=$(grep -nE '^[[:space:]]*[A-Za-z_]+=\$\(.*\| *grep [^)]*\)[[:space:]]*$' $TARGETS 2>/dev/null | grep -vE '\|\| *true' || true)
if [[ -n "$hits" ]]; then
  say "❌" "pipefail 下 grep 无匹配会让管道失败,赋值需 || true:"
  echo "$hits" | sed 's/^/     /'
  FAIL=$((FAIL + 1))
else
  say "✅" "pipefail 下的 grep 管道"
fi

# 6) 2>/dev/null 吞掉外部命令的错误原文 → 排障时看不到根因
hits=$(grep -nE '(museav|curl|gh|glab) [^|]*2>/dev/null' $TARGETS 2>/dev/null || true)
if [[ -n "$hits" ]]; then
  say "❌" "别静音外部命令的 stderr,改 2>&1 后提取原文:"
  echo "$hits" | sed 's/^/     /'
  FAIL=$((FAIL + 1))
else
  say "✅" "外部命令的错误可见性"
fi

# 7) 数据分层:不允许在数据根下随手新建旁挂目录
# 加这条的原因:新增能力时容易「就近落盘」——加推广文案就建 captions/、
# 加平台状态就写 ip.yml,每一步单看都合理,攒起来就是配置散落一地。
# 约定:形象级 → ips/<形象>/;系列级 → albums/<形象>/<系列>/album.yml;
#       全局依赖 → 白名单里的那几个。新增位置要先改这里的白名单。
H="${STICKER_HOME:-$HOME/.wechat-stickers}"
if [[ -d "$H" ]]; then
  ALLOW="ips albums outbox bgm"
  stray=""
  for d in "$H"/*/; do
    n=$(basename "$d")
    [[ " $ALLOW " == *" $n "* ]] || stray="$stray $n"
  done
  if [[ -n "$stray" ]]; then
    say "❌" "数据根下有未登记的目录:$stray"
    echo "     形象级配置进 ips/<形象>/,系列级配置进 albums/<形象>/<系列>/album.yml," 
    echo "     确实是全局依赖才加进 lint.sh 的 ALLOW 白名单"
    FAIL=$((FAIL + 1))
  else
    say "✅" "数据分层无旁挂目录"
  fi
fi

# 8) 语法
for f in ./*.sh; do
  bash -n "$f" || { say "❌" "$f 语法错误"; FAIL=$((FAIL + 1)); }
done
python3 - <<'PY' || FAIL=$((FAIL + 1))
import ast, glob, sys
bad = []
for f in glob.glob('*.py'):
    try:
        ast.parse(open(f, encoding='utf-8').read())
    except SyntaxError as e:
        bad.append(f'{f}:{e.lineno} {e.msg}')
if bad:
    print('❌ Python 语法错误:'); [print('    ' + b) for b in bad]; sys.exit(1)
print('✅ 全部脚本语法')
PY

echo
if [[ "$FAIL" -eq 0 ]]; then
  echo "门禁通过。"
else
  echo "$FAIL 项待修(每条对应 references/pitfalls.md 里的一次真实翻车)。"
fi
exit "$FAIL"
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated 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: 196kUpdated Claude CodeCodexVerifiedInstall