ZJU-REAL/Easel / skills/builtin/xhs-note-creator
xhs-note-creator
Verified小红书内容总入口:生成标题、正文、caption、hashtags,以及 3-9 张图文卡片或短视频分镜,覆盖素材分析、卖点评估、去 AI 味和质检。 当用户说“写/做小红书笔记、小红书图文/种草/文案、出一套卡片、小红书视频”时使用。 整套笔记用本 SKILL;仅渲染卡片用 card-xiaohongshu;其他平台的通用文案用 social-content。
| File | Kind | Size |
|---|---|---|
| EASEL-META.md | markdown | 554 B |
| SKILL.md | skill md | 8.0 KB |
| references/image-sourcing.md | markdown | 3.8 KB |
| references/material-intake.md | markdown | 5.4 KB |
| references/meta-schema.md | markdown | 4.6 KB |
| references/output-spec.md | markdown | 2.3 KB |
| references/reference-search.md | markdown | 2.9 KB |
| references/xiaohongshu-viral-methodology.md | markdown | 7.3 KB |
| scripts/analyze_material.pyexecutable | script | 4.9 KB |
| scripts/collage_3x4.pyexecutable | script | 3.4 KB |
| scripts/crop_watermark.pyexecutable | script | 1.6 KB |
| scripts/normalize_slug.pyexecutable | script | 2.1 KB |
| scripts/text_on_image.pyexecutable | script | 5.0 KB |
| scripts/validate_meta.pyexecutable | script | 5.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())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |