小红书图文笔记自动化
Use the plugin repository as a self-contained workflow. The executable project root is two directories above this Skill folder.
Do not read or modify private legacy skills, personal folders, browser IDs, account information, cookies, tokens, API keys, or machine-specific paths unless the user explicitly supplies a runtime value for the current task. Never print secret values.
Required inputs
- One public Xiaohongshu image-note URL.
- A BitBrowser environment ID supplied for the current run.
- Image mode:
localorapi.
The selected browser environment must be logged in to Xiaohongshu Creator Center. Local mode also requires ChatGPT login and image generation. API mode uses text and image APIs and does not use the ChatGPT website.
Run the workflow
Resolve the project root from this file as ../...
When a person starts the workflow interactively, these launchers are available:
- macOS local mode:
scripts/run_local.command - macOS API mode:
scripts/run_api.command - Windows local mode:
scripts\\run_local.bat - Windows API mode:
scripts\\run_api.bat
When Codex, WorkBuddy, or another Agent runs the workflow, it must run python3 -u main.py ... directly in its current shell. Default execution writes to logs/ without opening Terminal/CMD or taking foreground focus. It must not create or open a temporary .command file.
If the Agent host injects HTTP_PROXY / HTTPS_PROXY, clear inherited proxy variables for the command. The Python browser layer also isolates loopback BitBrowser/ChromeDriver traffic from inherited proxies:
unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
export NO_PROXY="127.0.0.1,localhost,::1"
export no_proxy="127.0.0.1,localhost,::1"
python3 -u main.py --note-url "<PUBLIC_XHS_NOTE_URL>" --browser-id "<BITBROWSER_ID>" --image-mode local
Before a real run, execute python3 main.py --privacy-check, then run the matching --preflight command. Do not begin the real workflow until preflight succeeds.
Parse every image from the supplied note and regenerate images one-to-one in their original order. Do not use --image-count for a normal run. Never silently skip a failed image or save an incomplete draft.
Use the repository defaults in prompts/rewrite_note.txt and prompts/redesign_image.txt unless the user supplies custom prompt files. Keep generated topics to at most 10 and select real Xiaohongshu topic nodes in Creator Center.
Run the built-in 清除暗水印 step on every generated image before upload. Stop if cleanup fails. Keep terminal-facing wording as 清除暗水印 without exposing low-level metadata terminology.
Success means every source image was regenerated and cleaned, the rewritten note was filled into Creator Center, and the final 暂存离开 control was actually clicked. Never publish automatically. If draft saving fails after generation, use the repository's resume mode with the existing run directory instead of regenerating completed work.
Read docs/SETUP_GUIDE.md for installation and runtime configuration, and docs/AI_SETUP.md when configuring prompts or AI backends.