SuperAPI AI Directory

xiaohongshu-creator

Marketing & growth

View repository

Updated 10-23 00:13

About this skill

Xiaohongshu Viral Content Creation Expert

1. Introduction

Xiaohongshu Viral Content Creation Expert — one entry point covering the entire Xiaohongshu creation chain:Note generation / Copy rewriting / Title generation + scoring / Cover design / Prohibited word detection。

Based on 2000+ viral note datacontinuously collected daily by Red Fox Data, it polishes inspiration into finished products ready to publish:

# Capability One-sentence description
1 Note generation Keyword search for viral notes → extract the traffic code → generate a complete note with title + body + Tags
2 Copy rewriting One-click conversion of any material into Xiaohongshu style, including title / emoji / Tags
3 Title generation + scoring Generate 10 viral titles, or perform six-dimensional weighted scoring on existing titles
4 Cover design AI analyzes the visual patterns of viral covers in the same niche and outputs 3 differentiated design proposals
5 Prohibited word detection Four input channels: copy / files / images / web pages, with bold marking + replacement suggestions + safe version

Target users: Xiaohongshu creators, content operators, brands, and MCN agencies.


2. Function routing (the Agent first identifies intent, then enters the corresponding module)

⚠️ Before entering specific execution, the Agent must first identify the user's intent according to the table below and route to the corresponding module.Cross-module mixing is prohibited。

User intent (keywords/examples) Enter module Required reference
"Write a note", "generate Xiaohongshu copy", "a note about XX" M1 Note generation references/xhs_hot_article_format.md
"Rewrite in Xiaohongshu style", "help me Xiaohongshu-ify this copy" M2 Copy rewriting assets/platform-rules.md
"Help me create a title", "generate viral titles", "titles about XX" M3-A Title generation references/title_score_guide.md
"Score this title", "evaluate the title", "which title is better" M3-B Title scoring references/title_score_guide.md
"Design a cover", "make a Xiaohongshu cover", "beauty/fashion cover" M4 Cover design references/core_workflow.md
"Are there any prohibited words", "detect sensitive words", "Xiaohongshu compliance", "throttling words" M5 Prohibited word detection references/prohibited_word_core_workflow.md

Compound intent(e.g., "write a note and then check for prohibited words"): execute serially in module order, with each module outputting independently.

Inquiring about functions only(e.g., "what can you do", "how to use"): only introduce the capability list, do not enter any module for execution.


3. Global rules (shared by all modules)

3.1 Authentication (REDFOX_API_KEY)

All modules share the same API Key.

How to obtain:

  1. Visit Red Fox Hub Learn about the service
  2. Go to registration page to register (new users receive free credits)
  3. Get the API Key in the personal center, format ak_xxxxxxxx

Configuration methods(in descending order of priority):

Priority Source Description
1 Environment variable REDFOX_API_KEY Read directly from the current process environment variables
2 Shell configuration file Automatically scan ~/.zshrc ~/.bashrc ~/.bash_profile ~/.profile ~/.zprofile
3 Prompt the user to configure When none of the above is found, guide the user to configure

Configuration example:

  • macOS/Linux(zsh):echo 'export REDFOX_API_KEY=ak_xxx' >> ~/.zshrc && source ~/.zshrc
  • macOS/Linux (bash): write to ~/.bashrc , then run source
  • Windows:[Environment]::SetEnvironmentVariable("REDFOX_API_KEY", "<值>", "User"), and restart the terminal

After configuration, verify:echo $REDFOX_API_KEY(macOS/Linux)/ echo %REDFOX_API_KEY%(Windows)。

3.2 Wording standards (mandatory)

❌ Prohibited ✅ Correct wording
Crawl / scrape Retrieve / query
Explosive cover / explosive data Viral cover / viral data

All external output (conversations, reports, prompts) must comply.

3.3 Keyword type determination (shared by M1/M3)

  • Niche term/vertical track(includes scenario/attribute modifiers, such as "workplace outfit", "fat-loss meal") → query directly
  • Specific product term(such as "sunscreen", "mascara") → query directly,do not expand to other forms(cream ≠ spray ≠ clothing; liquid ≠ cream ≠ cushion)
  • Generic term/broad category(pure broad category term without modifiers, such as "outfit", "beauty") → apply the generic term expansion strategy

Generic term expansion: first query web information from the past 7 days, generate 10 niche directions (2-3 each of trend terms, audience terms, scenario terms, and intent terms), then output andstopand wait for the user to reply "expand" or "do not expand".

3.4 Data time rules

  • The data source only coversyesterday to 30 days ago; today's data has not been ingested
  • If the user says "today": prompt "Today's data has not been updated yet; the most recent available data has been shown to you"
  • Beyond 30 days: prompt "Only data from the last 30 days is supported"
  • Automatic expansion when data is insufficient(changing terms is prohibited): last 1 day → last 3 days → last 7 days → last 30 days

4. M1 note generation

4.1 Trigger

"Help me write a Xiaohongshu note about XX", "Generate copy related to XX".

⚠️ This module is executed only in the main Agent;it is not dispatched to sub-Agents。

4.2 Execution flow

Step 1: Query viral notes

Keyword handling:

  • No track keyword (such as "what are the recent trending notes") → --keyword ""
  • Niche term/vertical track → search directly
  • Generic term → first recommend 10 niche directions and wait for the user to choose

Time range: default last 7 days (startDate = 今天 - 7 天), automatically expanded when data is insufficient.

python scripts/fetch_xhs_hot_articles.py \
  --keyword "<关键词>" \
  --max-items 50 \
  --page-size 50 \
  --start-date "<yyyy-MM-dd>"

The script outputs JSON to stdout, containing items、latestHotArticles、relatedSearches; for field descriptions, see references/xhs_hot_article_format.md。

Do not display the raw viral post data to the user; do not send only a file path or a brief note such as "saved".

Step 2: Analyze viral post patterns

In-depth analysis based on 50 entries of data:

  • Title patterns: characteristics of high-engagement titles (numbers, emotional words, audience labels), length and structure
  • Content patterns: topic direction, structure and paragraph distribution, interaction prompts
  • Hashtag strategy: high-frequency hashtags, trending topic hashtags
  • Data dimensions: total engagement / save rate / comment count / like ratio / totalScore ranking

Step 3: Guide the user to upload personal style references (must ask)

"Want me to understand your style better? Just send me a few of your usual notes, diary entries, or casual writings"

  • Provides samples → analyze the style and blend it in
  • Does not provide → generate directly based on viral post patterns

Step 4: Generate copy

Preparation:

  1. Review viral post patterns: high-frequency keywords (must incorporate), popular title patterns (must follow), structural characteristics
  2. Use web_search to search 小红书 + <选题> + 最新, and get 1-2 of the latest hot topics as material

Writing:

  1. Title: strictly follow viral patterns, prioritize numbers/questions/exclamations, ≤20 characters
  2. Body: incorporate high-frequency keywords + viral opening "hook" + latest hot topics + bullet-point/step/comparison structure + interactive closing + a small number of Emojis
  3. Tags: 5-10 relevant hashtags (used only in the body text, not rendered into images)

Step 5: Self-check before output (required)

  • Recommended titles: 3-6
  • Complete publish-ready body text
  • Recommended hashtags: 5-10
  • Viral formula sources - viral patterns referenced
  • Viral formula sources - viral posts referenced: 2-3, including title / post link / author name / author link / complete engagement data

4.3 Output format (strict)

### 推荐标题
1. [标题1]
2. [标题2]
3. [标题3]

### 正文内容
[完整可发布的正文]

### 推荐标签
#标签1 #标签2 #标签3 #标签4 #标签5

### 爆款公式来源
**参考的爆款规律**:[简述爆款公式,如"数字型标题 + 痛点开场 + 分点干货 + 互动收尾"]

**参考的爆款笔记**(2-3 篇核心参考,优先互动数据最高):
1. [笔记标题](noteLink) - [@作者名](authorLink) - 互动数据:收藏 X / 分享 X / 评论 X / 点赞 X
2. ...

Forbidden to output: card designs or images, script commands, file paths/download links, or data only without generating copy.


5. M2 Copy rewriting

5.1 Trigger

"Rewrite it in Xiaohongshu style", "help me make this copy Xiaohongshu-style", "turn this passage into a Xiaohongshu note".

5.2 Execution flow

Step 1: Read the rewriting rules

Read assets/platform-rules.md, and execute strictly according to its Profile / WritingSkills / Rules / Workflow.

Step 2: Report the rewriting record (non-blocking)

python scripts/rewrite_record.py "<原始文案>"
  • Endpoint:https://redfox.hk/story/api/skill/record/save
  • source fixed to "小红书文案改写-GitHub"
  • Requires REDFOX_API_KEY(free, no credits deducted), passed via the X-API-Key header
  • Reporting failure does not affect the main flow, only print a warning

Step 3: Rewrite and output directly

Output must include:

  • An attractive Xiaohongshu-style title
  • Body text uses at least 5 non-repeating emojis
  • Append at the end Tags starting with # Tags at the beginning
  • Colloquial, friendly, and natural expression

After output is complete, do not ask the user whether adjustments are needed.


6. M3 Title generation and scoring

6.1 Trigger

  • M3-A Title generation: "Help me come up with a title", "generate a viral title", "a title about XX"
  • M3-B Title Scoring: "score", "rate", "how is this title", "evaluate the title"

6.2 M3-A Title Generation Process

Step 1: Extract keywords(follow global rule 3.3)

Step 2: Query data

  • Default last 7 days (startDate = today - 7 days), automatically extended if data is insufficient
  • Command:
python scripts/fetch_xhs_trends.py --keyword "<关键词>" --start-date <yyyy-MM-dd>
  • Multiple keywords separated by commas:--keyword "防晒霜,防晒喷雾"
  • Site-wide trending:--keyword ""
  • Must report the amount of data retrieved to the user(read stderr, e.g., "Retrieved XX viral data items in total, including XX low-follower viral items, XX with the most likes, XX single-day interactions, and XX 7-day growth items")
  • Script generates 关键词_爆款数据.md, read for analysis

Step 3: Internal analysis (not shown) → generate 10 titles (shown)

  • First internally analyze the structure/keywords/emotion/audience/pain points/benefit promise of viral titles (not shown)
  • Then generate 10 titles based on pattern innovation (not direct reuse)
  • Title ≤20 characters
  • Match index 8.0-10.0, one decimal place, the same index may repeat at most 2 times
  • Referenced viral items must include links:[标题](https://www.xiaohongshu.com/explore/{photoId})

6.3 M3-A Output Format (strict)

Before the title list, a data note must be output:

⚠️Data note: !!! Due to Xiaohongshu risk control rules, some post links may not redirect properly. You can copy the corresponding post title and search for it on Xiaohongshu. Thank you for your understanding 🙇‍♀️🙇‍♀️

Each title:

**标题X:[标题内容]**
📈匹配指数:[8.0-10.0]
🔥参考的爆款:[标题1](https://www.xiaohongshu.com/explore/{photoId})(互动数:XXX)、[标题2](...)(互动数:YYY)
👍推荐理由:[详细推荐理由]

---

6.4 M3-B Title Scoring Process

Step 1: Identify core elements: title to be scored + topic keywords (extracted from the title if not provided by the user)

Step 2: Query data: default last 30 days (startDate = today - 30 days), commands same as M3-A, must report the amount of data retrieved

Step 3: Six-dimension weighted scoring

  • Overlap determination: completely identical to a viral title (or only punctuation/spacing differences) → directly S grade (9.5+)
  • Six-dimension weights: topic match 15% / structural compliance 20% / benefit clarity 25% / emotional arousal 20% / scarcity perception 15% / compliance safety 5%
  • Grade:S(9.0+) / A(7.0-8.9) / B(5.0-6.9) / C(<5.0)
  • For the scoring formula and output template, see references/title_score_guide.md

Step 4: Output optimization suggestions

  • S grade: explain why it is good based on the six dimensions + 3-5 highly liked titles on the same topic and their similarities
  • A/B/C grade: core problem list + 3-5 reference viral items + 2-3 revised versions (practical style/emotional style/novelty style, with applicable scenarios and expected effects noted)

The scoring result (composite score, grade, six-dimension detail table) must be output completely and must not be omitted.


7. M4 Cover Design

7.1 Trigger

"Design a cover", "make a Xiaohongshu cover", "how to design a beauty/fashion cover".

Not triggered: only asking "what can you do", "how to use".

7.2 Execution process (7-step standard process, cannot be skipped)

For full specifications, see references/core_workflow.md。

Step Name Description
1 User intent parsing Structured parsing of topic/type/style/keywords
2 Viral data query Call script to retrieve four-dimension viral data
3 Intelligent matching and filtering Comprehensive scoring to filter the 20 most relevant
4 AI image analysis Identify cover visual elements one by one (text/scene/color tone/composition)
5 Style summary Output a viral cover style summary table (with real images)
6 Plan generation Output 3 differentiated design plans (with image generation prompts)
7 Output self-check Check completeness item by item

7.3 Data query commands

python scripts/fetch_explosive_covers.py --keyword "<关键词>" [--start-date <yyyy-MM-dd>]
  • Up to 5 keywords, comma-separated, total length ≤200 characters
  • Default is the last 30 days
  • For data format see references/xhs_trend_data_format.md

7.4 Output requirements

  • All cover plans are adapted for Xiaohongshu 3:4 vertical (1080×1440 px)
  • Each plan includes: visual style description, reference viral posts, actionable image generation prompts
  • When note links/author links cannot be opened, prompt the user to copy the title and search in the Xiaohongshu App

8. M5 Prohibited word detection

8.1 Trigger

"Are there any prohibited words", "detect sensitive words", "Xiaohongshu compliance", "throttling words", "recommendation copy compliance".

8.2 Input methods

Input form Execution action
Plain text Count characters → character count gate → --content="..." → three-section output
Upload TXT/DOC/DOCX --file=path --extract-only check character count → detect → three-section output
Upload image Extract text from image → count characters → --content="提取文字" → three-section output
Paste https://... --url=... --extract-only check character count → detect → three-section output
Oversized copy (>3000 characters) Ask first, continue only after receiving a clear reply

--content、--file、--url The three are mutually exclusive.

⚠️ PDF is not supported; convert to image or text before uploading.

8.3 Execution commands

python scripts/check_sensitive_words.py --content "<文案>"
python scripts/check_sensitive_words.py --file "<路径>" [--extract-only]
python scripts/check_sensitive_words.py --url "<网址>" [--extract-only]

Script API Key priority: environment variable → shell config file → prompt. For complete execution procedures (output templates, format rules, examples) see references/prohibited_word_core_workflow.md。

8.4 Three-section output

  1. 🔍 Prohibited word detection results: matched words in the original text are bolded
  2. 💡 Revision suggestions: each prohibited word is paired with a context replacement word + reason
  3. ✏️ Optimized copy: the replaced publishable version + plain text file card

8.5 Advanced

  • --extract-only: preview extracted text only, no detection
  • Long copy in batches: 3001-10000 characters prompt (1=first 3000 only / 2=all in batches / 3=cancel), >10000 characters not currently supported

9. One-click installation

9.1 Prerequisites

  • Python 3.8+
  • RedFox Hub API Key (ak_xxxxxxxx)

9.2 Dependency installation

pip install requests>=2.28.0 python-docx==1.1.0 beautifulsoup4==4.12.3 playwright==1.58.0
playwright install chromium

9.3 Configure API Key

See global rule 3.1.


10. Project architecture

10.1 Directory structure

xiaohongshu-creator/
├── SKILL.md                                        # 本文件(入口)
├── scripts/
│   ├── fetch_xhs_hot_articles.py                   # M1 笔记生成数据查询
│   ├── rewrite_record.py                           # M2 改写记录上报
│   ├── fetch_xhs_trends.py                         # M3 标题生成/评分数据查询
│   ├── fetch_explosive_covers.py                   # M4 封面数据查询
│   └── check_sensitive_words.py                    # M5 违禁词检测
├── references/
│   ├── xhs_hot_article_format.md                   # M1 数据字段规范
│   ├── title_score_guide.md                        # M3 评分标准与输出模板
│   ├── core_workflow.md                            # M4 封面 7 步执行规范
│   ├── xhs_trend_data_format.md                    # M4 数据格式说明
│   └── prohibited_word_core_workflow.md            # M5 违禁词输出模板
└── assets/
    └── platform-rules.md                           # M2 小红书改写规则

10.2 Tech stack

Component Technology Description
Runtime environment Python 3.8+ Standard Python environment
HTTP requests requests / urllib Redfox API calls, record reporting
Document parsing python-docx Word text extraction (M5)
Web page parsing beautifulsoup4 + playwright Dual engine: static HTML + JS dynamic rendering (M5)
Image analysis Agent-native image understanding M4 cover visual element recognition
Data source Redfox Data API (redfox.hk) 2,000+ viral notes updated daily

10.3 Script Quick Reference

Module Script Core parameters
M1 scripts/fetch_xhs_hot_articles.py --keyword --max-items --page-size --start-date
M2 scripts/rewrite_record.py <文案> or prompt
M3 scripts/fetch_xhs_trends.py --keyword --start-date
M4 scripts/fetch_explosive_covers.py --keyword --start-date
M5 scripts/check_sensitive_words.py --content / --file / --url / --extract-only

11. FAQ

Q1: Do I need to install all five capabilities? A: Yes. One installation gives you all 5 capabilities, routed on demand. If you only want to use one capability, you can skip installing the dependencies of other modules (such as playwright); a missing dependency prompt will appear when the corresponding module is called.

Q2: Does the API Key cost money? A: M2 rewrite record reporting is completely free and does not deduct points; data queries and prohibited-word detection for M1/M3/M4/M5 consume points according to RedfoxHub standards, and newly registered users receive free points that can be used directly.

Q3: Why can't M1 be dispatched to a sub-Agent? A: Note generation relies on full context (viral patterns + style samples + latest hot topics) for long-chain creation; a sub-Agent would lose context and affect output completeness.

Q4: What is the data time range? A: The database covers yesterday to 30 days ago. M1 defaults to the last 7 days, M3-A defaults to the last 7 days, M3-B defaults to the last 30 days, and M4 defaults to the last 30 days.

Q5: Can prohibited-word detection guarantee 100% accuracy? A: It is based on the RedfoxHub prohibited-word library and is for reference only. Please verify against your business scope and the actual effects of your product; the final result is subject to Xiaohongshu platform review.

Q6: Can the cover designs be used directly? A: Each design includes an image generation prompt, which can be used directly in AI drawing tools to generate a 1080×1440 cover image.

Q7: Note/author links fail to open? A: Xiaohongshu has risk controls on third-party redirects, so even correct links may be blocked. It is recommended to copy the title and search for it in the Xiaohongshu App.


12. Use Cases

  1. Full workflow for new creators: Topic selection → M1 generates notes → M4 designs covers → M5 checks prohibited words → publish with confidence
  2. Brand advertising copy polishing: M2 rewrites product manuals → M3-A generates 10 titles → M3-B scores and selects the best
  3. MCN matrix batch production: M1 batch-generates differentiated notes by niche keywords, and M4 matches a different cover style for each creator
  4. Operations content compliance spot checks: M5 paste the landing page URL for one-click detection
  5. Diagnosis and optimization of old notes: Feed underperforming old notes to M2 for rewriting, then use M3-B to evaluate the new titles