1. Introduction
A one-stop note generation tool built specifically for Xiaohongshu content creation -- based on 2,000+ viral note data continuously collected across the web every day, it precisely retrieves popular viral notes based on keywords entered by the user, uses AI to deeply review the structure, opening logic, substance density, and interaction phrasing of viral content, distills the core traffic secrets and key creation points, and generates smooth, compliant, ready-to-publish complete note copy.
Target Users: Xiaohongshu creators, content operations, brand content teams, and individuals or teams that need to efficiently produce traffic-driving content.
2. Features
Core Features:
- Viral Note Search -- Search popular Xiaohongshu notes based on keywords, retrieving up to 50 data entries
- Viral Pattern Analysis -- Distill traffic secrets from dimensions such as titles, content structure, interaction guidance, and hashtag strategy
- Intelligent Content Generation -- Generate complete recommended titles (3-6), body content, and recommended hashtags (5-10)
- Personal Style Integration -- Supports users uploading personal writing samples and integrating their style into the generated copy
- Viral Formula Traceability -- Output the referenced viral patterns and core reference notes
Highlights:
- Generalized Term Expansion Strategy: Recommend 10 niche directions for broad category terms
- Automatically expand the time range when data is insufficient (changing terms is prohibited)
- Strict Output Format: Recommended titles + body content + recommended hashtags + viral formula sources
- Pre-output self-check mechanism: Ensure all fields are complete
- Search the latest hot topics to supplement creative material
3. One-click Installation
Authentication
Get API Key
Please go to RedFox Hub to get the API KEY
Configure API Key
Option 1: Using OpenClaw as an example, add REDFOX_API_KEY to ~/.openclaw/openclaw.json
{ "env": { "REDFOX_API_KEY": "ak_xxxx..." } }
Option 2: Terminal configuration: export REDFOX_API_KEY="ak_xxxx..."
export REDFOX_API_KEY="ak_xxxx..."
Dependency Installation
No additional installation is required; it runs using the Python standard library.
4. Usage Guide
Basic Usage
Trigger Conditions: Use when the user says "Help me write a Xiaohongshu note about XX", "Generate copy content related to XX", or other copy generation needs.
Core Rules: Execute only in the main Agent; do not dispatch to sub-Agents.
Complete Operation Flow
Step 1: Query Viral Notes
1.1 Keyword Processing:
- No niche keyword (such as "What are the recent popular notes?") -> Pass an empty string as the keyword
"", and query site-wide popular content - Has niche keyword -> Extract precise search keywords:
- Niche term / vertical niche -> Search directly
- Generic term / broad category (e.g. "outfit", "food") -> first recommend 10 sub-directions, wait for the user to choose before querying
1.2 Time range:
- Default to the last 7 days (
startDate = 今天 - 7 天) - Automatically expand the time range when data is insufficient (prioritize expanding time, changing keywords is prohibited): last 1 day -> last 3 days -> last 7 days -> last 30 days
1.3 Calling the script:
python scripts/fetch_xhs_hot_articles.py \
--keyword "<用户关键词>" \
--max-items 50 \
--page-size 50 \
--start-date "<yyyy-MM-dd>"
Parameter description:
--keyword: search keyword, pass an empty string when there is no keyword""--max-items: fixed value 50, retrieve 50 records for in-depth analysis--page-size: fixed value 50--start-date: start date, format yyyy-MM-dd
Script output (JSON format output to the console):
items: search result list (noteId, title, desc, createTime, engagement data, score, etc.)latestHotArticles: recommended popular notesrelatedSearches: expanded keyword recommendations
For detailed field descriptions, see references/xhs_hot_article_format.md。
Execution requirements:
- After executing the script, analyze directly based on the output data
- It is prohibited to display the raw viral data to the user
- It is prohibited to send only a file path or a short prompt such as "saved"
Step 2: Analyze viral patterns
Based on the 50 records returned by the script, conduct in-depth analysis:
Title patterns:
- Common characteristics of high-engagement titles (use of numbers, emotional words, audience labels)
- Title length and structural patterns
Content patterns:
- Topic directions and entry angles of popular notes
- Content structure and paragraph distribution characteristics
- Engagement guidance methods
Hashtag strategy:
- Types of frequently appearing hashtags
- Popular topic hashtags
Data analysis dimensions:
| Metric | Analysis points |
|---|---|
| Total engagement | Core characteristics of high-engagement content |
| Save rate | Level of practical value of the content |
| Comment count | Topicality and engagement guidance effectiveness |
| Like ratio | Degree of emotional resonance |
| Score ranking | When there is a keyword, refer to totalScore sorting |
Step 3: Guide the user to upload their personal style reference
Before generating the copy,mustproactively ask the user whether they can provide a personal style reference:
Want me to understand your style better? Just send me a few of your usual notes, diary entries, or casual writings
- If the user provides them: analyze their writing style (word usage habits, tone characteristics, expression style) and incorporate it into the generated copy
- If the user does not provide them: generate the copy directly based on viral patterns
Step 4: Generate the copy
Creation must strictly follow the viral pattern analysis results.
Preparation before creation:
- Review the viral pattern analysis results: the extracted high-frequency keywords and hot words (must be integrated into the body text), popular title patterns (must be strictly followed), structural characteristics of viral content, and popular content styles
- Search for the latest information / hot topics: use the
web_searchtool to search小红书 + <选题关键词> + 最新, and must obtain at least 1-2 latest hot topics or pieces of information as creative material
Write the Xiaohongshu note content:
- Title Creation: Strictly follow viral title patterns, prioritize numeric titles, questions, and exclamations; titles must not exceed 20 characters
- Body Creation: Must incorporate high-frequency keywords, reference viral opening "hook" techniques, integrate the latest trending information, use a structure referencing bullet-point explanations / step-by-step tutorials / comparison displays, add engaging interaction phrases at the end, use good paragraphing and embellish with a few Emojis
- Tags: Add 5-10 relevant tags at the end (Tags are only used in the note body and are not rendered into the images)
Step 5: Self-check before output (must be executed)
Check item by item before output:
- Recommended Titles: Does it include 3-6 recommended titles?
- Body Content: Does it include a complete publishable body?
- Recommended Tags: Does it include 5-10 relevant tags?
- Source of Viral Formula - Referenced Viral Patterns: Does it briefly describe the extracted viral formula?
- Source of Viral Formula - Referenced Viral Notes: Does it list 2-3 core reference notes (each including title, work link, author name, author link, and complete interaction data)?
Output Format (must be strictly followed)
### 推荐标题
1. [标题1]
2. [标题2]
3. [标题3]
### 正文内容
[完整可发布的正文]
### 推荐标签
#标签1 #标签2 #标签3 #标签4 #标签5
### 爆款公式来源
**参考的爆款规律**:[简述提炼的爆款公式,如"数字型标题 + 痛点开场 + 分点干货 + 互动收尾"]
**参考的爆款笔记**(列出 2-3 篇核心参考笔记,优先选择互动数据最高的笔记):
1. [笔记标题](noteLink) - [@作者名](authorLink) - 互动数据:收藏 X / 分享 X / 评论 X / 点赞 X
2. [笔记标题](noteLink) - [@作者名](authorLink) - 互动数据:收藏 X / 分享 X / 评论 X / 点赞 X
3. [笔记标题](noteLink) - [@作者名](authorLink) - 互动数据:收藏 X / 分享 X / 评论 X / 点赞 X
Prohibited Output: Card design or images, script execution commands, file paths or download links, or displaying data only without generating copy.
Advanced Usage
Data Notes: The database only contains data from yesterday to 30 days ago. Note interaction data is as of the time it was stored, not real-time data.
Common Command Quick Reference
| Scenario | Input Example | Processing Method |
|---|---|---|
| Direct generation for niche terms | "Help me write a Xiaohongshu note about fat-loss meals" | Directly search and generate copy |
| Broad terms need expansion | "Help me write copy related to outfits" | First recommend 10 niche directions |
| Integrate personal style | After the user provides a note sample | Analyze the style and integrate it into the generated copy |
5. Use Cases
- Beginner creators starting from zero: Input topic keywords (such as "fat-loss meals") to get complete publishable notes based on real viral data analysis, directly lowering the creation threshold.
- Batch output for content operations: Input different niche keywords to generate multiple differentiated pieces of copy in batches, improving team output efficiency.
- Deeply customized content for brands: Provide brand product information and style samples to generate Xiaohongshu recommendation notes that fit the brand tone while hitting viral patterns.
- Creators optimizing existing content: Use existing copy as a style reference input and regenerate an optimized version based on the latest trends and viral data to improve content competitiveness.
6. Project Architecture
Directory Structure
xiaohongshu-write/
├── SKILL.md # 本文件
├── scripts/
│ └── fetch_xhs_hot_articles.py # 调用红狐数据API获取热门笔记数据,输出JSON到stdout
└── references/
└── xhs_hot_article_format.md # 数据字段格式和输出规范
Tech Stack
| Technology | Purpose |
|---|---|
| Python Standard Library | HTTP requests and data parsing |
| Honghu API | Xiaohongshu viral note data source |
| WebSearch | Obtain the latest trending information to supplement creative material |
| AI intelligent analysis | Extraction of viral patterns and copywriting generation |
Core module description
- fetch_xhs_hot_articles.py: Accepts the keyword, max-items, page-size, and start-date parameters, calls the RedFox API to obtain popular note data, and outputs JSON format to stdout, including items (search results), latestHotArticles (recommended popular notes), and relatedSearches (related term recommendations).
Resource index
| File | Purpose |
|---|---|
| scripts/fetch_xhs_hot_articles.py | Call the RedFox data API to obtain popular note data and output JSON to stdout |
| references/xhs_hot_article_format.md | Read when understanding the data field format and output specifications |
7. Frequently Asked Questions
Installation
Q: What dependencies need to be installed? A: No additional installation is required; it can run using the Python standard library.
Q: How do I configure the API Key?
A: Please go to RedFox Hub to obtain an API KEY, and configure it through the environment variable REDFOX_API_KEY configuration.
Usage
Q: Why can't it be executed directly in a sub-Agent? A: This Skill is limited to execution in the main Agent and is not dispatched to sub-Agents, to ensure consistency of the output format and completeness of the source of viral formulas.
Q: What is the data range? A: The database only contains data from yesterday to 30 days ago, and the default time range is the most recent 7 days.
Q: When will WebSearch be used?
A: During the creation preparation stage, it is necessary to search 小红书 + <选题关键词> + 最新 to obtain at least 1-2 latest hot topics as creative material.
Q: What parts must the output include? A: It must include recommended titles (3-6), body content, recommended tags (5-10), and sources of viral formulas (referenced viral patterns + 2-3 referenced viral notes).
Troubleshooting
Q: The generated copy does not meet expectations? A: Provide personal writing samples (your usual notes, diary, or essays), and let the system analyze your style and incorporate it into the generated copy.
Q: What should I do if there is insufficient data? A: Automatically expand the time range in the order of the last 1 day -> last 3 days -> last 7 days -> last 30 days; changing words is prohibited.