跪拜 Guibai
← Back to the summary

Build an AI Hot Radar in Two Hours with Codex and RedFox Data Skills

Another God-Level Codex Skill Has Been Born.

Based on Codex + RedFox Data Skills and API, I built an AI Hot Radar. Here's the URL, take a look.

aihot.paicoding.com

9f6bfdffe660aac967a56e5dac9f999d.png

It runs automatically every day at midnight, grabbing all AI-related hot data from Douyin, Xiaohongshu, and WeChat Official Accounts, then feeding it to an LLM for structured analysis, scoring each piece of content.

Open the page, and in 5 minutes you know which AI topics are worth discussing today. Very convenient.

This project took about two hours of debugging with Codex, including deployment.

01. What is RedFox Data?

RedFox Data is a new media data platform for developers, providing content data APIs for multiple platforms including Douyin, Xiaohongshu, WeChat Official Accounts, Video Account, Kuaishou, Weibo, and Toutiao, covering account information, article details, work lists, search queries, and more.

redfox.hk

There's also a Skills Square offering over 40 ready-to-use data analysis skills.

Several popular ones have high call volumes: WeChat Official Account 10k+ article recommendations 36,000 times, Douyin hot account recommendations 25,000 times, and trending topic tracking across the web 21,000 times.

These Skills can be downloaded and run in local Agent tools like Codex and Claude Code.

Besides Skills, there are four major categories of APIs:

For developers, the value of RedFox Data is that once you get the API, you can use it however you want — build dashboards, write scripts, connect Agents, do automation.

The AI Hot Radar was built exactly this way.

02. What Does the AI Hot Radar Look Like?

Open aihot.paicoding.com, and the page is divided into several core areas.

Daily Summary

At the top of the page is a daily summary generated by the Agent, showing how many pieces of data were collected today and which topics are worth paying attention to.

It displays the number of Douyin samples, Xiaohongshu inspirations, WeChat Official Account viral articles, and the number of Agent recommendations.

Agent Top Picks

The LLM selects the most noteworthy content from the three platforms, sorted by opportunity score.

Taking data from June 8th as an example, the highest score was for the article "ChatGPT and Codex" from XinZhiYuan, with a score of 88. The Agent's suggested content angles were "dissecting the event background and user controversies" and "providing reproducible practical steps combined with AI tools."

Three-Platform Data Panel

Three areas display raw data from each platform.

Douyin Samples: Shows 5 AI-related trending videos, each with likes, comments, shares, favorites, and comment hot words.

Xiaohongshu Inspirations: 5 AI-related viral notes.

WeChat Official Account Viral Articles: 5 articles with 100k+ reads. Each article shows complete interaction data including reads, likes, wow, comments, and shares.

Online Queries

The page also embeds 9 RedFox API query cards, allowing you to directly query data from the three platforms by entering keywords on the webpage.

03. Where Does the Data Come From?

All data for the AI Hot Radar comes from RedFox Data. The entire collection process is as follows.

It runs automatically every day at midnight via GitHub Actions.

Collection Process

After the script starts, it executes in a fixed order:

Step 1: Load Skills. The script reads the SKILL.md file in the skills/ directory to get the collection strategy, API parameters, and keyword configuration for each platform.

Step 2: Collect data from three platforms in parallel. Each platform has its own collection logic:

Platform Collection Method Keywords Data Volume
Douyin Keyword search + work detail completion AI 5 items (with complete interaction data)
Xiaohongshu Viral note query AI tools, AI programming, AI agents, Agent, Large models 5 items
WeChat Official Accounts Hot article query AI tools, AI programming, AI agents, Agent, Large models 5 items

Step 3: Complete Douyin work details. The search interface returns relatively brief data. The script calls the queryWork interface again for the top 5 works to get complete likes, comment hot words, cover images, and author information.

Step 4: Send to LLM for structured analysis.

Step 5: Generate site files. Embed all data and analysis results into HTML, output to the dist/ directory.

API Call Example

Taking WeChat Official Account article search as an example, the actual API call looks like this:

curl -X POST "https://redfox.hk/story/api/gzhData/searchArticle" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: ak_your_api_key" \
  -d '{"keyword": "AI智能体", "offset": 0, "sortType": "_4"}'

Setting sortType to _4 sorts by read count in descending order, _2 sorts by publish time in descending order. The response is a standard JSON structure:

{
  "code": 2000,
  "msg": "成功",
  "data": {
    "total": 100,
    "hasMore": true,
    "list": [
      {
        "title": "Article Title",
        "author": "Author",
        "readCount": 100001,
        "likeCount": 606,
        "commentCount": 3,
        "shareCount": 2613,
        "publishTime": "2026-06-07 18:00:00",
        "workUrl": "https://mp.weixin.qq.com/s/xxx"
      }
    ]
  }
}

All interfaces use POST + JSON uniformly, with authentication via the X-API-KEY header. They can be called with Python's urllib, requests, Node.js's fetch, or even directly with curl.

Fault Tolerance Design

The collection process has multiple layers of fault tolerance: failure of a single platform does not affect others; each platform has a backup Skill, and if the primary Skill times out, it degrades to the backup; there is a 0.15 to 0.25 second delay between API calls to avoid triggering rate limits; the final output JSON includes an errors array recording all exceptions for easy troubleshooting.

04. LLM Analysis and Opportunity Scoring

After data collection, the script packages the sample data from the three platforms and sends it to the LLM, requesting structured analysis.

The default model is DeepSeek v4-pro. The prompt includes Skill metadata and reference materials, allowing the LLM to understand the data structure and evaluation criteria for each platform.

DailyAihotAgentRunner
├── SkillLoader
│   └── Read SKILL.md / references
├── RedFoxCollector
│   └── Execute Skill scripts / Call RedFox APIs
├── LlmAnalyzer
│   └── Call LLM to generate structured analysis
├── Validator
│   └── Validate JSON fields and length
└── SiteBuilder
    └── Generate HTML / JSON

The LLM needs to return a strict JSON structure containing five parts:

The opportunity score is not arbitrarily assigned by the LLM. Before sending to the LLM, the script calculates a base score of 40-96 based on keyword match rate and interaction data (likes, comments, shares, favorites). The LLM then fine-tunes on this basis, ensuring the score has data support.

If the LLM call fails (e.g., API timeout or insufficient quota), the script generates basic analysis results using a template.

05. Online Query of 9 APIs

The AI Hot Radar not only displays daily automated reports but also embeds 9 RedFox API online query cards.

WeChat Official Accounts (6 queries):

Douyin (2 queries): Query work details, Query account details

Xiaohongshu (2 queries): Query account details, Query work details

For example, if you want to check data for a specific Official Account, enter the account name in the Query Article List card to pull the recent article list, with each article showing complete interaction data including reads, likes, comments, and shares.

06. Using Skills in Codex

RedFox Data Skills can also be directly installed into Codex or other Agents.

skills/
├── douyin-search/           # Douyin viral work search
├── wechat-10w-hot/          # WeChat Official Account 10k+ article recommendations
├── xiaohongshu-weeklytop/   # Xiaohongshu 7-day viral notes
└── trending-hub/            # Trending topic tracking across the web (7 platforms aggregated)

Each Skill has a standard three-part structure: SKILL.md (decision manual) + scripts/ (Python scripts) + references/ (reference materials).

Installing into Codex

The method is simple.

I want to install these Skills: https://redfox.hk/skills including trending topic tracking, Xiaohongshu viral notes, WeChat Official Account 10k+ viral article recommendations.

Then apply for an API Key on RedFox Data:

Actual Test Results

After installation, simply say "Show me the latest WeChat Official Account 10k+ articles" in the Agent, and the Agent will automatically load the wechat-10w-hot Skill and call the fetch_hot_articles.py script to pull data from RedFox Data.

Codex, Claude Code, or PaiCLI all work.

The Xiaohongshu and Douyin Skills are similar.

xiaohongshu-weeklytop can query the top 50 viral notes in various fields over the past 7 days, covering 25 vertical categories. douyin-search supports keyword search for trending Douyin works and can automatically expand a general keyword into 10 sub-keywords.

trending-hub is a trending topic tracker across the web, aggregating hot search data from 7 platforms: Baidu, Zhihu, Weibo, Douyin, Bilibili, Kuaishou, and Toutiao, updated hourly.

07. Technical Architecture and Deployment

Let's talk about the technical implementation of AI-Hot, as a reference for those who want to build their own.

Tech Stack

Component Technology Description
Data Collection Python 3.11+ Standard library urllib, no heavy dependencies
LLM Analysis OpenAI-compatible API Default DeepSeek v4-pro, switchable
Frontend Pure HTML/CSS/JS No framework, single-page application
Site Generation Python static output Data embedded in HTML, output to dist/
Automation GitHub Actions Scheduled execution daily at 00:30
Deployment Nginx + systemd Static files + API proxy service

No database.

Each day's data is written to dist/data/latest.json and archived to dist/archive/YYYY-MM-DD.json. The frontend page directly reads the JSON for rendering. The architecture is very simple.

GitHub Actions Automation

.github/workflows/daily-aihot.yml defines the daily build process:

  1. Trigger: Automatically triggered at 00:30 daily, also supports manual trigger (workflow_dispatch)
  2. Build: Install Python 3.11, execute run_daily_agent.py, validate output (mark as failure if any platform returns 0 data items)
  3. Deploy: Sync dist/ to the server via SSH, update systemd service

Environment variables are injected via GitHub Secrets, so API Keys never appear in the code repository.

env:
  REDFOX_API_KEY: ${{ secrets.REDFOX_API_KEY }}
  LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
  LLM_BASE_URL: ${{ secrets.LLM_BASE_URL }}
  LLM_MODEL: ${{ secrets.LLM_MODEL }}

Nginx Configuration

In production, Nginx serves static files and proxies API requests. Static pages are read directly from the deployment directory, and API requests are forwarded to a local Python proxy service (port 5173):

location / {
    root /home/www/aihot;
    try_files $uri $uri/ /index.html;
}

location ^~ /api/ {
    proxy_pass http://127.0.0.1:5173/api/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
}

WeChat Official Account cover images have hotlink protection, so Nginx also includes an image proxy layer with the correct Referer header:

location ^~ /wechat-img/ {
    proxy_pass https://mmbiz.qpic.cn/;
    proxy_set_header Host mmbiz.qpic.cn;
    proxy_set_header Referer "https://mp.weixin.qq.com/";
}

Cost Control

The daily running cost of this project is very low:

08. How to Put This on Your Resume?

Project Name: AI Hot Radar

Project Description: Based on RedFox Data new media data APIs, designed and implemented 4 Agent Skills, driving an AI hot aggregation and analysis platform to automatically collect data from Douyin, Xiaohongshu, and WeChat Official Accounts, combined with LLM structured analysis to generate daily hot reports and opportunity scores.

Tech Stack: Python + Agent Skills + RESTful API + OpenAI-compatible LLM + Static Site Generation + GitHub Actions + Nginx

Core Responsibilities:

And the entire project, from development to deployment, took only half a day. Data source uses RedFox Data API, no need to write your own crawler. LLM analysis can use DeepSeek or other domestic models. Deployment uses GitHub Actions, no need to set up your own CI/CD.

[The biggest advantage for developers is that others use tools, we build tools.]

See you next time.