Introduction
Short Drama - Xiaohongshu Information Sourceis a Xiaohongshu hit content tracking tool designed specifically for short drama creators, referencing the functionality and style design of the AI-Bilibili Information Source.
Through the Honghu Hub API, you can:
- 📊 Automatically scan Xiaohongshu short drama content daily and screen hit works by engagement
- 🏷️ Intelligently cluster theme directions (time travel/CEO romance/rebirth/mystery, etc.)
- 📈 Generate a visualized HTML daily report including cover images, engagement data, and creative insights
- 🔍 Support targeted queries by theme, creator, and time range
Suitable for scenarios such as short drama screenwriters, producers, and operations staff who need to grasp Xiaohongshu short drama traffic trends.
⚠️ Important - Confirmation Logic: Data updates at 15:00 daily with the previous day's data. When there is no data for the target date,automatic API calls/automatic fallback are prohibited, and you must first inform the user and wait for confirmation before executing.
🧭 Important - Pre-check: Before querying, first verify whether the category/keywords match the short drama theme lexicon (time travel/CEO romance/rebirth/sweet romance/mystery/counterattack, etc.) and whether the date is within the valid query range; when none of the keywords/categories match,do not request any API, directly prompt "keywords do not meet query conditions" and recommend related categories and keywords.
⛔ Output Specification: After the daily report is generated, the conversation replymust strictly follow the output template to output md content, and any free-form, omitted, or colloquial text is prohibited. See "📊 Output Format" below for details.
Features
🎯 Core Functions
| Function Module | Capability Description | Core Value |
|---|---|---|
| 📊 Hit Discovery | Screen popular content from Xiaohongshu short dramas by engagement | Accurately locate high-heat short drama notes |
| 🏷️ Theme Clustering | Automatically identify theme directions (time travel/CEO romance/rebirth/mystery, etc.) | Daily theme classification is dynamically determined by the content |
| 🔍 Intelligent Query | By default, query all short dramas; when data is insufficient, automatically expand themes for batch queries | Save API quota and obtain data efficiently |
| 🎯 Custom Query | Users can specify any theme/creator/keyword for targeted queries | Flexibly cover any short drama niche direction |
| 📈 Creative Insights | Analyze hit title characteristics, theme trends, and creator performance | Deeply uncover creative patterns |
| 🎨 Visualized Daily Report | Dark-theme HTML, cover images + engagement data + direct note links | Intuitively display daily short drama hot topics |
| 🔔 One-click Subscription | --subscribe Enable daily automatic output |
Daily reports are automatically saved in a local folder |
✨ Key Features
- 🧭 Pre-input validation (v2.3): Before querying, first check whether the category/keyword matches the short-drama genre lexicon and whether the date is within the valid query range; when none are satisfied,do not request any API, directly remind "keyword does not satisfy query conditions" and recommend related categories and keywords; for mixed terms, retain valid keywords for the query
- ⚡ Smart date determination: The script has built-in
DATA_UPDATE_HOUR = 15constants, and before calling the API it automatically detects whether the target date falls within the no-data interval; when there is no data, it prompts the user to wait for confirmation - 🧠 Structured empty reason: When the result is empty, clearly output the reason category (no data from data source / no keyword match / API exception) and give next-step suggestions
- 🔄 Automatic genre expansion: When full query data is insufficient (<100 records), automatically append targeted supplementary queries for time-travel → CEO romance → rebirth → suspense → sweet romance → counterattack
- 🔁 Empty-result retry: When a single-genre query is empty or abnormal, automatically retry once after a 4-second interval
- 📱 Xiaohongshu adaptation: Work links are automatically concatenated with
xiaohongshu.com/explore/{photoId}, fields with 0 interaction data are automatically hidden, HEIF covers are automatically converted to JPG, and failed loads automatically fall back to the default cover - 🔒 Safe and reliable: The API Key is obtained via the environment variable
REDFOX_API_KEY, and hardcoding is prohibited
One-click installation
Prerequisites
- Python 3 runtime environment
- A registered Honghu Hub account with an obtained API Key
Installation steps
1. Obtain the API Key
Go to the Honghu Hub official website to register, then obtain it from the personal center after logging in; the format is ak_xxxxxxxx. Newly registered users receive free credits.
2. Configure environment variables
macOS/Linux:
echo 'export REDFOX_API_KEY=ak_xxxxxxxx' >> ~/.zshrc
source ~/.zshrc
Windows(PowerShell):
[Environment]::SetEnvironmentVariable("REDFOX_API_KEY", "ak_xxxxxxxx", "User")
After configuration, you need torestart the terminalfor the environment variables to take effect.
3. Verify the configuration
# macOS/Linux
echo $REDFOX_API_KEY
# Windows
echo %REDFOX_API_KEY%
Environment variable configuration
| Variable name | Required | Description |
|---|---|---|
REDFOX_API_KEY |
Yes | Honghu Hub API access key, authenticated via the X-API-KEY request header |
Workflow
Step zero: date validity pre-check (must be executed before any API call)
⛔ Core rule: without user confirmation, it is prohibited to call any data API, and it is prohibited to automatically execute
--latestAbsolutely must notautomatically execute the script to obtain data without user confirmation (unlike the Bilibili version, where automatic fallback is used, this skill retains the confirmation logic).
Data update rule: data for the previous day is updated daily at 15:00
- Before 15:00: latest available date = T-2 (the day before yesterday)
- After 15:00: latest available date = T-1 (yesterday)
Execution process (mandatory before every query):
- Pre-check - date (v2.3): Check that the date format is (YYYY-MM-DD) and not later than today; when it exceeds the valid query range, remind the user and recommend the nearest available date
- Obtain the current system date T and current time, and calculate the latest available date according to the 15:00 rule
- Determine whether the target date requested by the user falls within the no-data interval (i.e., > the latest available date)
- If the target date has data(≤ latest available date): directly execute the query without additional confirmation
- If there is no data for the target date(> latest available date), output the following prompt to the user, andwait for the user's explicit confirmationbefore executing (with
--latestparameter); if the user refuses, do not perform any interface call:
**⚠️{查询日期}数据尚未更新**
数据更新规则:每日15:00更新前一天的数据
当前可查询的最新日期:{最新可查询到数据的日期}
是否需要查询{最新可查询到数据的日期}的数据?
Example dialogue:
用户:查询今天的短剧小红书日报
Agent:⚠️2026-06-16数据尚未更新
数据更新规则:每日15:00更新前一天的数据
当前可查询的最新日期:2026-06-14
是否需要查询2026-06-14的数据?
用户:好的
Agent:(执行 python3 daily_report.py --latest)
Pre-validation: category/keyword (v2.3, before date processing)
Before querying, first determine whether the keyword/category entered by the user matches theshort drama theme lexicon(time travel/domineering CEO/rebirth/sweet romance/suspense/counterattack/period drama/war god/costume drama/urban/sci-fi, etc.).
- If none match: do not request any interface (including date liveness check), directly prompt "keywords do not meet short drama query conditions" andrecommend related categories and keywordsthen stop
- If some do not match (mixed words): keep valid keywords to continue the query, automatically ignore invalid keywords and prompt
- If all match: query normally
Recommendation logic: first extract contained theme words from invalid words (e.g., "time travel rebirth" → recommend time travel, rebirth), then supplement with popular theme words.
Step 1: Generate hit daily report
# 生成最新一期日报(用户确认后执行)
python3 "$SKILL_PATH/assets/daily_report.py" --latest
# 生成指定日期日报(历史日期已有数据,无需确认)
python3 "$SKILL_PATH/assets/daily_report.py" --date 2026-06-10
# 自定义题材查询(用户指定方向,自动校验关键词)
python3 "$SKILL_PATH/assets/daily_report.py" --topics "穿越,霸总,重生,悬疑" --latest
# 订阅 / 取消订阅
python3 "$SKILL_PATH/assets/daily_report.py" --subscribe
python3 "$SKILL_PATH/assets/daily_report.py" --unsubscribe
Query strategy: by default query all short drama content (pageSize=200); when data is insufficient (<100 items), automatically add popular themes (time travel→domineering CEO→rebirth→suspense→sweet romance→counterattack), and query all themes at once through the batch interface. When the user customizes themes, use only the valid theme words provided by the user, also queried in batch.
Smart date determination: built into the script
DATA_UPDATE_HOUR = 15constant (updates the previous day's data daily at 15:00); before calling the interface, automatically detect whether the target date is in a no-data interval. As a double safeguard, the Agent has already intercepted it in advance at step zero, avoiding the script-level interactive prompt being ignored.
Step 2: Perform creative trend analysis
After the daily report is generated,mustautomatically perform creative trend analysis based on the clustering results:
- Read the theme clustering results and select the TOP 5 popular themes
- Analyze the number of hits, average interaction data, and top work characteristics for each theme
- Identify emerging themes gaining traction (small quantity but high interaction)
- Output a structured creative trend report
The generated HTML daily report is saved in ~/Downloads/QoderReports/, automatically opened in the browser. The terminal simultaneously outputs the theme classification table + creative trend analysis report.
📊 Output format (mandatory)
⛔ Strictly execute rules:
- The following template is theonly legal output format, any free play, omission, simplification, or reorganization is prohibited
- Outputting additional content not defined in the template is prohibited (such as colloquial text like "let me help you…" or "the following is…")
- Merging or skipping any section is prohibited; even if a section's data is "none available", the section title must still be retained
- After each daily report retrieval, the dialogue reply must strictly output md content according to this template, and must not contain any text outside the template
After each daily report run, the dialogue outputmust strictlybe output as-is according to the following template (only replace the {...} placeholders):
## 短剧-小红书信息源 · {日期} 日报
**扫描 {N} 部热门短剧,聚类 {M} 个题材方向**
---
### 题材概览
| 题材 | 数量 | 占比 | 爆款亮点 |
|------|------|------|---------|
| #{题材名} | {N}部 | {X}% | 头部作品亮点描述 |
| ... | ... | ... | ... |
---
### 创作趋势分析
**一、新兴起量信号**
- 🔥 **#{题材}** — 仅{N}部但均互动{X}+,描述
(若无新兴题材,输出:暂无新兴起量信号)
**二、爆款标题特征**
| 特征模式 | 出现次数 | 典型案例 | 平均互动 |
|---------|---------|---------|---------|
| {特征1} | {N}次 | 《{标题}》 | {X}w |
| ... | ... | ... | ... |
(若无标题数据,输出:暂无爆款标题数据)
**三、核心达人榜**
| 达人 | 作品数 | 总互动 | 代表作 |
|------|--------|--------|--------|
| @{达人} | {N}部 | {X}w | 《{作品}》 |
| ... | ... | ... | ... |
(若无达人数据,输出:暂无核心达人数据)
**四、题材趋势报告**
**题材**:#{题材1}
**作品数**:{N}部
**平均互动**:{X}w
**头部作品**:《{标题}》-{互动}w
**题材特征**:{描述该题材的共性特征}
**创作建议**:{针对该题材的创作建议}
**五、#{题材2}**
(同上格式)
**六、#{题材3}**
(同上格式)
**七、跨题材对比建议**
- **{题材}** — 建议同步关注{相关题材}的联动创作,观察题材融合趋势
(若无建议,输出:暂无跨题材对比建议)
---
**日报地址**:{HTML文件绝对路径}
> 数据说明:每日15:00更新昨天的数据
The above format ismandatory specification, all fields cannot be omitted; section titles (I, II, III, IV, V, VI, VII) must be retained. If a module has no data, mark "None" within that section; the section itself must not be deleted.
Parameter Description
| Parameter | Description | Default Value |
|---|---|---|
--topics "关键词,..." |
Custom genre query, comma-separated; if none match the short drama genre lexicon, do not request the API and directly prompt + recommend; for mixed terms, retain valid terms | Full query |
--count N |
Number of works to scan, stop when satisfied | 200 |
--date YYYY-MM-DD |
Specified date (prompt and ask when outside the valid range/not updated, wait for confirmation; historical dates with existing data require no confirmation) | Today |
--start-time |
Custom start time YYYY-MM-DD HH:MM:SS (overrides --date calculation) | — |
--end-time |
Custom end time YYYY-MM-DD HH:MM:SS (overrides --date calculation) | — |
--latest |
Automatically use the latest date with data (execute after user confirmation, no points deducted) | — |
--output-dir |
Output directory | ~/Downloads/QoderReports |
--api-key |
Specify API Key | — |
--subscribe |
Enable daily subscription | — |
--unsubscribe |
Disable daily subscription | — |
--from-cache |
Use cached data, no points deducted | — |
💬 Custom genre query scenario
In addition to the default short drama daily report, users can specify any genre combination for targeted query and analysis:
# 查询穿越题材热门短剧
python3 "$SKILL_PATH/assets/daily_report.py" --topics "穿越,时空,重生"
# 查询霸总/甜宠题材
python3 "$SKILL_PATH/assets/daily_report.py" --topics "霸总,甜宠,总裁,虐恋"
# 查询悬疑/反转题材
python3 "$SKILL_PATH/assets/daily_report.py" --topics "悬疑,推理,反转,惊悚"
Custom query logic:
- Before querying, first validate whether keywords/categories match the short drama genre lexicon (time travel/domineering CEO/rebirth/sweet romance/suspense/counterattack/period/war god/costume, etc.)
- When none matchDo not request any API, remind "keywords do not meet short drama query conditions" andrecommend related categories and keywords, stop
- In mixed-term scenarios, retain valid keywords and continue querying; invalid keywords are automatically ignored with a prompt
- Query results are automatically deduplicated; genre clustering and trend analysis are generated based on query results, strongly correlated with the user's focus direction
Use scenarios
Scenario 1: Short drama creator topic selection reference
Role: short drama screenwriter/producer
Needs: understand popular genres and hit trends in the Xiaohongshu short drama market to guide topic selection decisions
How to use:
- After daily confirmation, execute
--latestto get the latest daily report - Analyze genre clustering results and watch for emerging growth signals
- Refer to hit title characteristics and genre trend reports
Expected benefits: accurately grasp traffic trends and improve topic selection hit rate
Scenario 2: Operations team competitor monitoring
Role: short drama operations/MCN agency
Needs: track competitor accounts' performance on Xiaohongshu and analyze hit content characteristics
How to use:
- Use
--topicsto conduct targeted queries on the genres competitors are in - Follow the core creator rankings to identify top competitor accounts
- Enable
--subscribeto automatically compile daily reports
Expected benefits: timely grasp competitor dynamics and optimize your own operations strategy
Scenario 3: Content trend analysis
Role: content planner/data analyst
Needs: analyze Xiaohongshu short drama content trends to provide data support for content planning
Usage:
- Combined with
--start-timeand--end-timebatch analyze time range data - Use the 5 dimensions of creation trend analysis to deeply uncover patterns
- Focus on cross-genre comparison suggestions to discover genre fusion opportunities
Expected Benefits: Produce structured trend reports to support content strategy decisions
Project Architecture
Directory Structure
短剧-小红书信息源/
├── SKILL.md # Skill主文档(本文件)
├── README.md # 项目说明文档
├── scripts/ # 脚本源码
│ └── playlet_xhs_daily.py # 日报生成脚本(开发版,与assets同步)
├── assets/ # Skill运行时资源
│ ├── daily_report.py # 日报生成脚本(运行时使用,v2.3增强版)
│ └── default_cover.png # 默认封面图(加载失败时的fallback)
└── references/ # 参考文档
├── core_workflow.md # 核心执行流程、格式模板、日期判断逻辑
└── examples.md # 使用示例与常见用法组合
Tech Stack
| Component | Technology | Description |
|---|---|---|
| Runtime Environment | Python 3 | Scripting Language |
| Data Source | RedFox Hub API | X-API-KEY request header authentication,source field tracking source |
| API Endpoint | https://redfox.hk/story/api/parseWork/queryPlayletMsgs |
POST request |
| Platform Identifier | platform=3 |
Xiaohongshu (1=Douyin, 2=WeChat Channels, 6=Bilibili) |
| Source Identifier | source |
"短剧小红书信息源-GitHub" |
| Data Storage | JSON cache | ~/.workbuddy/cache/playlet_xhs_data.json |
| Output Format | HTML + terminal Markdown | Dark theme, Xiaohongshu red (#FF2442) |
| Output Directory | ~/Downloads/QoderReports |
Customizable |
Data Flow
用户请求 → 前置输入校验(分类/关键词/日期) → 日期预检(15:00规则)
↓(关键词/分类全部不满足) ↓(日期未更新/超范围)
不请求接口,直接提示+推荐停止 提示用户并等待确认(禁止自动回退)
↓(用户确认后)
API调用(批量查询+重试+去重+排序,数据不足自动扩展题材)
↓
题材聚类(关键词匹配)
↓
HTML日报生成 + 终端摘要输出
↓
创作趋势分析(5个维度)
FAQ
Installation-related Questions
Q1: What should I do if I get "REDFOX_API_KEY environment variable not found" during installation?
A: Please check the following steps:
- Confirm that the API Key is correctly configured (Windows:
[Environment]::SetEnvironmentVariable("REDFOX_API_KEY", "ak_xxx", "User")) - After configuration, you need torestart the terminalto make the environment variable take effect
- Verify:
echo %REDFOX_API_KEY%should output your Key value
Q2: How do I obtain an API Key?
A: Go to RedFox Hub official website to register an account. After logging in, obtain it from the personal center. The format is ak_xxxxxxxx. New registered users receive free credits.
Usage-related Questions
Q3: How often is the data updated?
A: Data for the previous day is updated daily at 15:00.
- Before 15:00: latest available date = the day before yesterday (T-2)
- After 15:00: latest available date = yesterday (T-1)
Q4: What should I do if querying a specified date prompts "data not yet updated"?
A: When the target date has not yet been updated, the scriptwill not automatically fall back, but instead prompts the latest date currently available for query and asks "Do you need to query the data for the latest date?",after waiting for user confirmationit then executes. This is the confirmation logic retained by this skill (different from the automatic fallback in the Bilibili version).
Q5: What should I do if keywords/categories do not satisfy the short drama genre vocabulary?
A: Before querying, the script willfirst validate keywords/categories: when none match the short drama genre vocabulary (such as non-genre terms like "intelligent assisted driving" or "Martian"),it will not request any API, directly prompting "keywords do not meet short drama query conditions" andrecommending related categories and keywords(time travel/domineering CEO/rebirth/sweet romance/suspense/counterattack, etc.); in mixed-term scenarios, valid keywords are retained and the query continues.
Q6: What should I do if no data can be queried?
A: Possible reasons:
- The target date has no data yet (the 15:00 update time has not arrived)
- No works match the keyword on that date (consider switching to a topic word or removing --topics to query all; requires confirmation before execution)
- Insufficient API Key permissions or exhausted credits
- Network connection issue
It is recommended to first use --from-cache to check the cache, or try a different date.
Troubleshooting
Q7: UnicodeEncodeError when executing in Windows PowerShell?
A: The script output contains emoji, so UTF-8 encoding needs to be set:
$env:PYTHONIOENCODING='utf-8'
python assets/daily_report.py --latest
Q8: Images fail to load in the HTML daily report?
A: The script has a built-in fallback mechanism that automatically displays the default cover image when loading fails (assets/default_cover.png). Some cover image URLs use the HEIF format, and the script automatically converts them to JPG format to improve compatibility.
Security and Licensing
Q9: How is data security ensured?
A:
- The API Key is obtained only through environment variables; hardcoding is prohibited
- Single data source: only the Red Fox Hub API is used; independent collection is prohibited
- Cache files are stored locally
~/.workbuddy/cache/
📚 Reference Documentation
- references/core_workflow.md — Core execution flow, output format templates, date judgment logic, field mapping, platform adaptation notes, field mapping correction records, transformation verification checklist
- references/examples.md — Usage examples and common usage combinations