SuperAPI AI Directory

xiaohongshu-creator

Design & creation

View repository

Updated 10-16 05:06

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 the 2,000+ viral note datacontinuously collected daily by Honghu Data, it polishes inspiration into finished products ready to publish:

# Capability One-sentence description
1 Note generation Keyword search for viral notes → extract traffic secrets → 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 (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 into Xiaohongshu style", "Help me Xiaohongshu-ify this copy" M2 Copy rewriting assets/platform-rules.md
"Help me create a title", "Generate viral titles", "A title 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", "Traffic-limiting words" M5 Prohibited word detection references/prohibited_word_core_workflow.md

Compound intent(e.g., "after writing the note, also detect prohibited words"): execute serially in module order, with each module outputting independently.

Function inquiry 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 services
  2. Go to registration page to register (new users get free credits)
  3. Get the API Key in the personal center, format ak_xxxxxxxx

Configuration method(in descending order of priority):

Priority Source Description
1 Environment variable REDFOX_API_KEY Directly read the current process environment variable
2 Shell configuration file Automatically scan ~/.zshrc ~/.bashrc ~/.bash_profile ~/.profile ~/.zprofile
3 Prompt the user to configure When none of the above are 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 source
  • Windows:[Environment]::SetEnvironmentVariable("REDFOX_API_KEY", "<值>", "User"), restart the terminal

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

3.2 Wording standards (mandatory)

❌ Prohibited ✅ Correct expression
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 terms/vertical tracks(including scene/attribute modifiers, such as "workplace outfit", "fat-loss meal") → direct query
  • Specific product terms(such as "sunscreen", "mascara") → direct query,do not expand to other forms(cream ≠ spray ≠ clothing; liquid ≠ cream ≠ cushion)
  • General terms/major categories(pure category terms without modifiers, such as "outfit", "beauty") → execute the general term expansion strategy

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

3.4 Data time rules

  • Data sources only coveryesterday to 30 days ago, today's data is not yet in the database
  • If the user says "today": prompt "Today's data has not been updated yet; the most recent available data is shown for you"
  • Beyond 30 days: prompt "Only data from the last 30 days is supported"
  • Automatically expand when data is insufficient(changing keywords 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,not dispatched to sub-Agents。

4.2 Execution flow

Step 1: Query viral notes

Keyword processing:

  • No track keyword (such as "what are the recent popular notes") → --keyword ""
  • Niche terms/vertical tracks → direct search
  • General terms → first recommend 10 niche directions, wait for the user to choose

Time range: default last 7 days (startDate = 今天 - 7 天), automatically expand 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, including items、latestHotArticles、relatedSearches, field descriptions see references/xhs_hot_article_format.md。

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

Step 2: Analyze viral patterns

Based on in-depth analysis of 50 data entries:

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

Step 3: Guide the user to upload personal style references (required question)

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

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

Step 4: Generate copy

Preparation:

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

Write:

  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 points/steps/comparison structure + interactive closing + a small amount of Emoji
  3. Tags: 5-10 related tags (for the body only, not rendered into images)

Step 5: Self-check before output (required)

  • Recommended titles: 3-6
  • Complete publish-ready body text
  • Recommended tags: 5-10
  • Viral formula sources - referenced viral patterns
  • Viral formula sources - referenced viral notes: 2-3, including title / work link / author name / author link / complete interaction 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. ...

Do not 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 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 strictly execute according to the Profile / WritingSkills / Rules / Workflow within it.

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 points deducted), passed in 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
  • The body uses at least 5 non-repeated emoji
  • 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 again 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 to the last 7 days (startDate = today - 7 days); automatically expand 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. "A total of XX viral data entries were retrieved, including XX low-follower viral entries, XX most-liked entries, XX single-day interaction entries, and XX 7-day growth entries")
  • Script generates 关键词_爆款数据.md, read for analysis

Step 3: Internal analysis (not displayed) → Generate 10 titles (displayed)

  • First internally analyze the structure/keywords/emotion/audience/pain points/benefit promise of viral titles (not displayed)
  • 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 be repeated at most 2 times
  • Referenced viral posts must include links:[标题](https://www.xiaohongshu.com/explore/{photoId})

6.3 M3-A Output Format (strict)

A data note must be output before the title list:

⚠️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 to view it. 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 (if not provided by the user, extract from the title)

Step 2: Query data: default to the last 30 days (startDate = today - 30 days), command 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 differing only in punctuation/spaces) → directly S tier (9.5+)
  • Six-dimension weights: topic match 15% / structural compliance 20% / benefit clarity 25% / emotional arousal 20% / scarcity perception 15% / compliance safety 5%
  • Tier: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 tier: 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 tier: core problem list + 3-5 reference viral posts + 2-3 revised versions (practical style/emotional style/novelty style, with applicable scenarios and expected effects noted)

The scoring results (composite score, tier, 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".

Does not trigger: only asking "what can you do", "how to use it".

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

For complete 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-dimensional viral data
3 Smart matching & 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 viral cover style summary table (with real images)
6 Proposal generation Output 3 differentiated design proposals (with image generation prompts)
7 Output self-check Check completeness item by item

7.3 Data query command

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

7.4 Output requirements

  • All cover proposals are adapted for Xiaohongshu 3:4 vertical (1080×1440 px)
  • Each proposal 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
Extra-long 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 it to an image or text before uploading.

8.3 Execution command

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 configuration file → prompt. For the complete execution procedure (output template, format rules, examples), see references/prohibited_word_core_workflow.md。

8.4 Output three sections

  1. 🔍 Prohibited word detection results: matched words in the original text are marked in bold
  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: extract text preview only, no detection
  • Long copy in batches: 3001-10000 characters ask (1=only first 3000 / 2=batch all / 3=cancel), >10000 characters not yet 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 Request requests / urllib Redfox API calls, record reporting
Document Parsing python-docx Word text extraction (M5)
Web Page Parsing beautifulsoup4 + playwright Static HTML + JS dynamic rendering dual engine (M5)
Image Analysis Agent-native image understanding M4 cover visual element recognition
Data Source Redfox Data API (redfox.hk) Daily update of 2000+ viral notes

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. Frequently Asked Questions

Q1: Do I need to install all five capabilities? A: Yes. Install once and you have all 5 capabilities, routed on demand. If you only want to use one of the capabilities, the dependencies of other modules (such as playwright) can be left uninstalled; when the corresponding module is called, it will prompt that they are missing.

Q2: Is the API Key charged? A: M2 rewrite record reporting is completely free and does not deduct credits; data queries and prohibited word detection in M1/M3/M4/M5 consume credits according to RedfoxHub standards. Newly registered users are given free credits that can be used directly.

Q3: Why can't M1 be dispatched to a sub-Agent? A: Note generation relies on complete context (viral patterns + style samples + latest trends) for long-chain creation. A sub-Agent will lose context, affecting the completeness of the output.

Q4: What is the data time range? A: The database covers from 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: Based on the RedfoxHub prohibited word database, for reference only. Please verify against your company's business scope and the actual product effects; the final result is subject to Xiaohongshu platform review.

Q6: Can the cover plans be used directly? A: Each plan includes image generation prompts, which can be used directly in AI drawing tools to generate 1080×1440 cover images.

Q7: Note/author link jump fails? A: Xiaohongshu has risk controls on third-party jumps, so even a correct link 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 novice creators: topic selection → M1 generates notes → M4 designs covers → M5 detects prohibited words → publish with confidence
  2. Brand campaign copy polishing: M2 rewrites product manuals → M3-A creates 10 titles → M3-B scores and selects the best
  3. MCN matrix batch output: M1 batch-generates differentiated notes by niche keywords, M4 matches a different cover style for each influencer
  4. Operations content compliance spot checks: M5 paste the landing page URL for one-click detection
  5. Diagnosis and optimization of old notes: feed poorly performing old notes to M2 for rewriting, then use M3-B to evaluate the new titles