Skip to content

JuneYaooo/xhs-writer-skill

xhs-writer

Verified

生成小红书(RedNote)笔记:把主题或用户提供的素材(文字/图片/视频)做成一套竖版卡片(图文) 或一段带分镜脚本的视频稿(视频),配 caption + hashtags,落盘到 output/小红书/。 使用时机:用户说 写小红书 / 做小红书笔记 / 小红书图文 / 小红书种草 / 出一套 xhs 卡片 / 小红书视频 / write a Xiaohongshu note / make a RedNote post。

FileKindSize
SKILL.mdskill md14.7 KB
agents/openclaw.yamlconfig930 B
references/humanizer-zh.mdmarkdown15.4 KB
references/image-sourcing.mdmarkdown3.7 KB
references/material-intake.mdmarkdown5.4 KB
references/meta-schema.mdmarkdown4.5 KB
references/output-spec.mdmarkdown4.2 KB
references/reference-search.mdmarkdown2.9 KB
references/xiaohongshu-viral-methodology.mdmarkdown17.1 KB
scripts/analyze_material.pyexecutablescript4.9 KB
scripts/collage_3x4.pyexecutablescript3.4 KB
scripts/crop_watermark.pyexecutablescript1.6 KB
scripts/image_generator.pyscript17.5 KB
scripts/normalize_slug.pyexecutablescript2.1 KB
scripts/text_on_image.pyexecutablescript5.0 KB
scripts/validate_meta.pyexecutablescript5.8 KB

scripts/normalize_slug.py

View on GitHub
#!/usr/bin/env python3
"""Normalize a Chinese/English title into a file-system-safe slug.

Rules (aligned with references/output-spec.md):
- strip special chars 冒号/问号/感叹号/引号/斜杠/星号/尖括号/竖线/省略号/破折号
- replace space with "_"
- collapse consecutive "_"
- truncate to max 15 CJK-aware chars (default)
- emit slug on stdout; never exit non-zero on normal input

Usage:
    python3 normalize_slug.py "GPT-5.4深夜炸场:OpenAI 大一统模型来了" [--max 15]
    python3 normalize_slug.py --timestamp   # just print YYYYMMDDHHmm in Asia/Shanghai
    python3 normalize_slug.py "..." --with-ts   # "<slug>_YYYYMMDDHHmm"
"""
from __future__ import annotations
import argparse
import re
import sys
from datetime import datetime, timezone, timedelta

STRIP_CHARS = '::??!!""' + "''" + "/\\*<>|"
STRIP_SEQS = ("……", "...", "——", "--")
SHANGHAI = timezone(timedelta(hours=8))


def shanghai_ts() -> str:
    return datetime.now(SHANGHAI).strftime("%Y%m%d%H%M")


def normalize(title: str, max_chars: int = 15) -> str:
    s = title.strip()
    for seq in STRIP_SEQS:
        s = s.replace(seq, "_")
    s = "".join("_" if c in STRIP_CHARS else c for c in s)
    s = s.replace(" ", "_")
    s = re.sub(r"_+", "_", s).strip("_")
    # CJK-aware truncation by code point count
    if len(s) > max_chars:
        s = s[:max_chars].rstrip("_")
    return s or "untitled"


def main() -> int:
    p = argparse.ArgumentParser()
    p.add_argument("title", nargs="?", default="")
    p.add_argument("--max", type=int, default=15)
    p.add_argument("--timestamp", action="store_true",
                   help="only print YYYYMMDDHHmm")
    p.add_argument("--with-ts", action="store_true",
                   help="append _YYYYMMDDHHmm")
    args = p.parse_args()

    if args.timestamp:
        print(shanghai_ts())
        return 0
    if not args.title:
        print("error: title required", file=sys.stderr)
        return 2
    slug = normalize(args.title, args.max)
    if args.with_ts:
        slug = f"{slug}_{shanghai_ts()}"
    print(slug)
    return 0


if __name__ == "__main__":
    sys.exit(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