Execution-grade Xiaohongshu studio workflow for agencies and operators running account launches, daily operations, and low-traffic diagnosis.
This repository packages an agent skill (runnable from Codex, OpenClaw, and similar runtimes) plus supporting references, templates, evals, and Python utilities. The workflow is designed around file-backed client workspaces so delivery can continue across sessions without losing state.
- Initializes a distilled client workspace under
~/.growth/vault/<profile>/xiaohongshu/ - Keeps reusable Xiaohongshu corpus under
~/.growth/vault/_library/xiaohongshu/ - Uses
xiaohongshu-clifor live Xiaohongshu search, note reads, comments, and account evidence - Generates structured delivery artifacts for launch and daily ops
- Scores note performance from
metrics.csvand writes a health report - Diagnoses incomplete or stale client workspaces
- Learns recurring client edits and turns them into playbook rules
- Builds a distributable OpenClaw bundle in
dist/openclaw/
The vault separates reusable platform corpus from profile-specific execution state:
~/.growth/vault/
├── _library/
│ ├── xiaohongshu/
│ │ ├── raw/
│ │ ├── evidence/
│ │ ├── personas/
│ │ ├── content-patterns/
│ │ ├── platform-rules/
│ │ └── benchmarks/
│ └── _shared/
│ ├── offers/
│ ├── brand-assets/
│ └── cross-platform-insights/
└── <profile>/
└── xiaohongshu/
Use _library/xiaohongshu/ for reusable Xiaohongshu market research, app-specific personas, benchmark patterns, and platform rules. A future Facebook skill should use _library/facebook/ for Facebook-specific personas and benchmarks instead of sharing a generic persona folder.
Use _library/_shared/ only for true cross-platform inputs such as offers, brand assets, and cross-platform observations. Do not put platform-specific user personas there.
Every distilled Xiaohongshu client workspace lives in one directory:
~/.growth/vault/<profile>/xiaohongshu/
├── 01-client-brief.md
├── 02-competitor-analysis.md
├── 03-account-strategy.md
├── 04-content-calendar.md
├── 05-daily-ops.md
├── 06-health-report.md
├── metrics.csv
├── playbook.md
├── xhs-action-log.md
├── xhs-evidence/
└── lessons/
Workspaces and libraries live outside the skill repo under the system user home, so operator data does not ship with the skill itself.
- Python 3.10+ for the
xiaohongshu-cliruntime xiaohongshu-cli>=0.6.4with thexhscommand available onPATH- No third-party Python packages are imported by the bundled scripts; live Xiaohongshu access is delegated to the external
xhsprocess
Install or upgrade the hard dependency:
uv tool install xiaohongshu-cli
uv tool upgrade xiaohongshu-cliIf uv is unavailable, pipx install xiaohongshu-cli is a fallback. This repo does not vendor the upstream CLI.
Preflight:
# read-only research path: search/read/comments/user/user-posts/etc.
python3 scripts/check_xhs_dependency.py --research --auth
# write-capable workflows such as publishing still require full command coverage
python3 scripts/check_xhs_dependency.py --auth--auth requires a valid local Xiaohongshu session. Use xhs login or xhs login --qrcode; do not paste raw cookies into project files or chat logs.
Initialize a new client workspace:
python3 scripts/init_client_workspace.py \
--client "Clear Skin Lab" \
--profile "clear-skin-lab" \
--industry "Skincare" \
--root .Check what is missing for one client:
python3 scripts/diagnose_workspace.py --client-dir ~/.growth/vault/clear-skin-lab/xiaohongshuCheck the full studio queue:
python3 scripts/diagnose_workspace.py --allCollect live Xiaohongshu research into the competitor analysis:
python3 scripts/collect_xhs_research.py \
--brief ~/.growth/vault/clear-skin-lab/xiaohongshu/01-client-brief.md \
--output ~/.growth/vault/clear-skin-lab/xiaohongshu/02-competitor-analysis.mdIf the research is a reusable market corpus rather than a client-specific task, place raw or semi-raw evidence under ~/.growth/vault/_library/xiaohongshu/evidence/<date>-<topic>/ and distill only selected takeaways into the client workspace.
Generate or refresh a health report:
python3 scripts/score_health.py \
--metrics ~/.growth/vault/clear-skin-lab/xiaohongshu/metrics.csv \
--output ~/.growth/vault/clear-skin-lab/xiaohongshu/06-health-report.mdBuild the OpenClaw distribution:
python3 scripts/build_openclaw.py- Initialize the workspace with
init_client_workspace.py - Complete
01-client-brief.md - Generate
02-competitor-analysis.md - Run
check_xhs_dependency.py --research --authandcollect_xhs_research.pywhen live evidence is available - Generate
03-account-strategy.md - Generate
04-content-calendar.md - Generate
05-daily-ops.md - Leave
06-health-report.mdpending until metrics exist
- Start with
diagnose_workspace.py - Continue from the first incomplete artifact
- Refresh stale live research through
xhswhen authenticated - Regenerate downstream files when upstream inputs change
- Append note performance data to
metrics.csv - Refresh
06-health-report.mdonce there are at least 5 populated note rows
- Normalize recent note performance into
metrics.csv - Run
score_health.py - Use the generated report to identify traffic tier, weakest notes, and next actions
- Feed client revisions back into
playbook.mdusinglearn_client_edits.py
metrics.csv remains the source of truth for diagnosis. Only use xhs my-notes --json to fill own-note identifiers or visible live data when the user explicitly authorizes using the logged-in account.
Read-only commands (search, read, comments, user, user-posts, my-notes, topics, hot) may run as part of live research after auth preflight.
Write commands (post, delete, like, favorite, comment, reply, follow, unfollow) require an explicit user request for that specific action. For publishing, keep review drafts in Markdown but use scripts/publish_note.py as the publish boundary: dry-run first, convert Markdown to Xiaohongshu-native plain text, reject leaked Markdown markers, then run with --post only after explicit authorization. Other write commands must confirm the active account with xhs whoami --json; after any write, append the result or error code to ~/.growth/vault/<profile>/xiaohongshu/xhs-action-log.md.
Dashboard-managed auto-reply must default to draft-only mode. It may send xhs reply only when the operator explicitly switches that profile to send mode in the dashboard settings.
.
├── SKILL.md
├── VERSION
├── LICENSE
├── agents/
├── assets/templates/
├── dist/openclaw/
├── evals/evals.json
├── references/
├── scripts/
└── tests/
Key files:
SKILL.md: operating protocol, mode router, workflow contractreferences/: positioning, research, copywriting, compliance, diagnosis, and learning guidesassets/templates/: starter artifacts used to create client workspacesscripts/: automation for workspace creation, planning, diagnosis, health scoring, and packagingtests/: source-repo verification for thexhsintegration wrappers and generatorsevals/evals.json: descriptive scenario checks for external eval harnesses; this repo does not ship a runner that executes them
scripts/init_client_workspace.py: create a standard client folder from templatesscripts/check_xhs_dependency.py: verifyxiaohongshu-cli>=0.6.4, read-only research commands via--research, full write-capable commands by default, and optional authscripts/xhs_cli_utils.py: runxhs --jsonand validate theok/schema_version/data/errorenvelopescripts/publish_note.py: publish an approved Markdown draft safely; converts Markdown to Xiaohongshu-native plain text, dry-runs by default, requires--postfor the actual write action, logs the result, verifies viamy-notes, and appends initial metricsscripts/collect_xhs_research.py: collect live search, note, and comment evidence into02-competitor-analysis.mdscripts/prepare_competitor_analysis.py: generate a research brief for02-competitor-analysis.mdscripts/generate_account_strategy.py: generate03-account-strategy.mdscripts/generate_content_calendar.py: generate04-content-calendar.mdscripts/build_daily_ops.py: generate05-daily-ops.mdscripts/score_health.py: write06-health-report.mdfrom metricsscripts/diagnose_workspace.py: inspect missing, incomplete, or stale workscripts/migrate_workspace.py: move legacy workspace layouts into~/.growth/vault/(dry-run by default,--applyto move)scripts/learn_client_edits.py: capture repeat client preferences into lessons and playbook rulesscripts/build_playbook.py: rebuildplaybook.mdfrom captured lessonsscripts/build_openclaw.py: assemble the shipping bundle indist/openclaw/
scripts/build_openclaw.py copies the shipping subset of the repository into dist/openclaw/:
SKILL.mdVERSIONLICENSEassets/references/scripts/
It intentionally skips source-repo tests, local caches such as __pycache__, .DS_Store, and the build script itself.
dist/ is a build artifact and is not committed; run the build script at release time. CI verifies the bundle builds on every push.