Content Engine
by @dizhu
Content Engine (Xiaohongshu). Two modes: ① Deconstruct (v1) — input a viral XHS link, get an 18-field structured card. ② Generate (v2) — combine the deconstr...
System requirements
| Dependency | Purpose | Install |
|---|---|---|
| Python ≥ 3.10 | Run all scripts | macOS: brew install python@3.12
Linux: apt install python3.12 or pyenv
Windows: python.org |
| ffmpeg | Video frame extraction (optional for image-only) | macOS: brew install ffmpeg
Linux: apt install ffmpeg (or dnf / pacman)
Windows: choco install ffmpeg |
> No pip dependencies — scripts use Python stdlib only.
API tokens
v1 deconstruct needs TIKHUB_API_TOKEN (required for deconstruct)
v2 generate needs OFOX_API_KEY (required for generate; covers LLM + Nano Banana image gen)
v0.3.0+ real video needs ARK_API_KEY (required when video type runs in default mode; --no-real-video bypasses)
# v1 deconstruct: TikHub
mkdir -p ~/.config/content-engine
echo 'TIKHUB_API_TOKEN=your_tikhub_token' >> ~/.config/content-engine/.envv2 generate: Ofox (LLM text + Nano Banana images)
echo 'OFOX_API_KEY=ofox-your_key' >> ~/.config/content-engine/.envv0.3.0+ video generation: Volcengine Ark (Seedance 2.0)
echo 'ARK_API_KEY=your_ark_key' >> ~/.config/content-engine/.env
| Token | Sign up | Use | Required? |
|---|---|---|---|
| TIKHUB_API_TOKEN | tikhub.io | XHS API (raw deconstruct data) | v1 deconstruct |
| OFOX_API_KEY | ofox.ai | LLM + Nano Banana images | v2 generate |
| ARK_API_KEY | Volcengine Ark Console | Seedance 2.0 video generation | required for v0.3.0+ real video; --no-real-video bypasses |
| OPENROUTER_API_KEY | openrouter.ai | (optional) alternate LLM provider | optional |
> ⚠️ The ARK API Key is not the same as a Volcengine IAM AK/SK (both are UUID-shaped but use different auth). Create it under "API Key Management" in the Ark console, then enable Doubao-Seedance-2.0-fast under "Activation → Vision Models" (default 5M tokens free).
>
> Switch model: export ARK_VIDEO_MODEL=doubao-seedance-1-5-pro-251215 (or any other Ark model id).
Token lookup order (first found wins):
1. Corresponding env var (TIKHUB_API_TOKEN / OFOX_API_KEY / ARK_API_KEY / OPENROUTER_API_KEY)
2. $CWD/.env
3. ~/.config/content-engine/.env (XDG standard)
4. Skill-root .env
Verify
python3 scripts/extract_xhs.py --check
Reports each check ✅/❌/⚠️ with fix instructions.
Mainland China users
api.tikhub.io requires a proxy from inside Chinaapi.tikhub.dev (no proxy needed) — set TIKHUB_BASE_URL=https://api.tikhub.dev in .envFeishu / Lark publishing (OpenClaw users only)
This skill does not bundle Feishu API code. To enable auto-publishing of deconstruction cards to Feishu Docx, install the OpenClaw Lark official plugin:
npx -y @larksuite/openclaw-lark install
Details: OpenClaw Lark official plugin docs
Once installed:
Claude Code or other environments: deconstruction cards save to local docs/deconstructions/; copy to Feishu manually if needed.
clawhub install qianxun-content-engine-en