wechat-10w-hot
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese公众号 10w+ 热门文章推荐
WeChat Official Account 100k+ Popular Article Recommendations
简介
Introduction
面向「公众号 10w+ 阅读爆文」场景的交付型 Skill:按分类与时间窗口拉取榜单,对话内给出完整 Markdown 榜单,并生成 可导出 PDF 的 HTML;支持按赛道订阅推送(产品侧若已开通)。
能做什么?
- 总榜 / 分赛道榜单:标准 23 分类 + 总排名;默认 TOP50 候选,首轮对话可 preview 10 条。
- 数据诚实:强依赖脚本 stdout,禁止 Agent 编造文章或阅读数。
- HTML + PDF:榜单页遵循微信绿视觉规范,单页 PDF 导出(html2pdf.js)。
- 规律复盘:在榜单后输出基于真实条目的「爆款规律分析」,并询问是否订阅赛道。
适合谁用?
- 公众号编辑 / 运营 —— 追热点、看标题与账号分布
- 内容负责人 —— 要「可分享、可打印」的榜单页
- 增长 / 商务 —— 按赛道盯 10w+ 供给
运行依赖:Python 3;数据脚本以仓库内 声明为准(标准库为主)。
scripts/fetch_hot_articles.pyA delivery-type Skill for the scenario of "100k+ view hit articles from official WeChat accounts": pulls rankings by category and time window, provides a complete Markdown ranking in the conversation, and generates HTML that can be exported to PDF; supports subscription push by track (if enabled on the product side).
What can it do?
- Overall Ranking / Track-specific Rankings: 23 standard categories + overall ranking; default TOP50 candidates, first-round conversation can preview 10 entries.
- Data Integrity: Strongly relies on script stdout, Agent is prohibited from fabricating articles or view counts.
- HTML + PDF: Ranking page follows WeChat's green visual specification, single-page PDF export (html2pdf.js).
- Rule Review: Outputs "hit article rule analysis" based on real entries after the ranking, and asks whether to subscribe to the track.
Who is it for?
- Official WeChat account editors / operators —— chase hot topics, check titles and account distribution
- Content managers —— need shareable, printable ranking pages
- Growth / business personnel —— monitor 100k+ content supply by track
Runtime Dependencies: Python 3; data scripts are declared in in the repository (mainly standard libraries).
scripts/fetch_hot_articles.py功能特性
Functional Features
核心功能
Core Functions
- 榜单拉取:→ 写
scripts/fetch_hot_articles.py→ 对话原样输出。temp_articles.json - 时间口径:每日 18:30 同步前一日数据;Agent 必须按当前钟点计算查询区间(详见参考文档)。
- HTML 生成:,
scripts/generate_hot_html.py必须与当前对话展示条数一致。--display_count - 订阅引导:规律分析后询问是否订阅;同一轮不执行订阅,待用户下一条再分支。
- Ranking Pull: → write
scripts/fetch_hot_articles.py→ output as-is in conversation.temp_articles.json - Time Caliber: Synchronize previous day's data at 18:30 daily; Agent must calculate the query interval based on the current time (see reference documents).
- HTML Generation: ,
scripts/generate_hot_html.pymust match the number of entries displayed in the current conversation.--display_count - Subscription Guidance: Ask whether to subscribe after rule analysis; do not execute subscription in the same round, wait for the user's next message to branch.
特色亮点
Highlight Features
- 脚本输出即正文:表格 + 详情 + 统计区均不可删改重排。
- 18:30 分水岭:早于 18:30 与晚于 18:30,「最新可用日期」不同,需配合固定致歉话术。
- 禁止凑数:少于 10 条如实展示;无数据按参考文档提示改查总榜或其它分类。
- Script output is the main content: Tables + details + statistics section cannot be deleted, modified or rearranged.
- 18:30 Watershed: Before and after 18:30, the "latest available date" is different, and fixed apology scripts must be used.
- No Padding: Display fewer than 10 entries truthfully; if no data, follow the prompts in reference documents to switch to overall ranking or other categories.
使用场景
Usage Scenarios
当用户出现下列诉求时,应加载并严格按参考文档执行:
| 用户可能会问 | Agent 行为概要 |
|---|---|
| 「今日爆文」「10w+ 文章」「最新爆文」 | 总榜意图 + 计算日期 + |
| 「科技 / 财经 / 健康…类 10w+」 | 映射到标准 |
| 「最近 / 最新有什么热门」 | 默认 近 7 天 区间(见时间规则文档) |
| 「展开全部 / 看 50 条」 | 在同区间下改 |
Load and strictly execute according to reference documents when users have the following demands:
| User's Possible Questions | Agent's Action Summary |
|---|---|
| "Today's hit articles" "100k+ articles" "Latest hit articles" | Overall ranking intent + calculate date + |
| "Technology / Finance / Health... 100k+ articles" | Map to standard |
| "What's popular recently / latest" | Default past 7 days interval (see time rule documents) |
| "Expand all / view 50 entries" | Change to |
典型对话节奏
Typical Conversation Rhythm
- 识别意图 → 2. 跑脚本原样展示 → 3. 爆款规律分析 → 4. 订阅询问 → 5. 立即生成 HTML(不等订阅答复)→ 6. 用户若回订阅再走订阅分支。
- Identify intent → 2. Run script and display as-is → 3. Hit article rule analysis → 4. Subscription inquiry → 5. Immediately generate HTML (do not wait for subscription reply) → 6. If user replies with subscription, proceed to subscription branch.
重要数据说明
Important Data Notes
- 更新节奏:榜单库 每日 18:30 对齐前一日;对外推送话术可用 19:30。
- 时间不一致:凡用户说的「今天 / 昨天」与真实可查区间不一致,必须使用 中的原文致歉话术。
references/time-and-date-rules.md
- Update Rhythm: Ranking database aligns with the previous day at 18:30 daily; use 19:30 for external push scripts.
- Time Inconsistency: Whenever the user's "today / yesterday" does not match the actual queryable interval, must use the original apology script in .
references/time-and-date-rules.md
核心执行规则(必须遵守)
Core Execution Rules (Must Follow)
- 必须先跑脚本:任何榜单正文均来自 的 stdout,不得手写替代。
fetch_hot_articles.py - stdout 原样展示:含「数据说明、概览表、详情、统计」整块粘贴。
- 固定六步顺序:不得跳过「规律分析 → 订阅询问 → HTML」;细则见 。
references/agent-workflow.md - HTML 条数一致:对话展示 N 条,则 。
generate_hot_html.py --display_count N - 细节下钻:日期区间、参数表、输出模板、API 字段等一律以 references 为单一事实来源(见下节资源索引)。
- Must run script first: Any ranking content comes from stdout of , cannot be handwritten as a substitute.
fetch_hot_articles.py - Display stdout as-is: Paste the entire block including "data description, overview table, details, statistics".
- Fixed six-step sequence: Cannot skip "rule analysis → subscription inquiry → HTML"; see for details.
references/agent-workflow.md - Consistent HTML entry count: If N entries are displayed in the conversation, use .
generate_hot_html.py --display_count N - Detailed Drilling: Date intervals, parameter tables, output templates, API fields, etc., all use references as the single source of truth (see resource index in the next section).
项目架构
Project Architecture
目录(参考)
Directory (Reference)
text
wechat-10w-hot/
├── SKILL.md # 本入口(精简版)
├── scripts/
│ ├── fetch_hot_articles.py # 拉取 + 对话 Markdown 输出 + temp JSON
│ └── generate_hot_html.py # 读 temp JSON → HTML
└── references/
├── agent-workflow.md # 六步流程、订阅、自检
├── time-and-date-rules.md # 18:30 与区间、固定话术
├── script-parameters-and-output.md # CLI、输出格式、四维分析
├── html-pdf-visual-spec.md # 视觉、PDF、HTML 参数
├── usage-examples.md # 场景化命令示例
├── api-spec.md # 接口字段说明
└── category-mapping.md # 分类映射text
wechat-10w-hot/
├── SKILL.md # This entry (simplified version)
├── scripts/
│ ├── fetch_hot_articles.py # Pull + conversation Markdown output + temp JSON
│ └── generate_hot_html.py # Read temp JSON → HTML
└── references/
├── agent-workflow.md # Six-step process, subscription, self-check
├── time-and-date-rules.md # 18:30 and intervals, fixed scripts
├── script-parameters-and-output.md # CLI, output format, four-dimensional analysis
├── html-pdf-visual-spec.md # Visual, PDF, HTML parameters
├── usage-examples.md # Scenario-based command examples
├── api-spec.md # Interface field description
└── category-mapping.md # Category mapping数据流(概念)
Data Flow (Conceptual)
text
用户请求 → 意图 + 日期区间 → fetch_hot_articles.py → stdout(对话)+ temp_articles.json
↓
generate_hot_html.py(display_count 对齐)→ HTML(可 PDF)text
User Request → Intent + Date Interval → fetch_hot_articles.py → stdout (conversation) + temp_articles.json
↓
generate_hot_html.py (display_count aligned) → HTML (PDF exportable)资源索引(何时读哪份)
Resource Index (Which to Read When)
| 文件 | 何时读取 |
|---|---|
| references/agent-workflow.md | 执行任意一步前:核对顺序、订阅、自检 |
| references/time-and-date-rules.md | 计算 |
| references/script-parameters-and-output.md | 拼 CLI、理解 stdout 结构、内容分析四维 |
| references/html-pdf-visual-spec.md | 生成 HTML / PDF 样式与命令 |
| references/usage-examples.md | 对照总榜 / 领域 / 全量 / 冷门 / 空数据 |
| references/api-spec.md | 查 URL、请求参数、 |
| references/category-mapping.md | 用户口语 → 标准 |
| File | When to Read |
|---|---|
| references/agent-workflow.md | Before executing any step: check sequence, subscription, self-check |
| references/time-and-date-rules.md | Calculate |
| references/script-parameters-and-output.md | Assemble CLI, understand stdout structure, four-dimensional content analysis |
| references/html-pdf-visual-spec.md | Generate HTML / PDF styles and commands |
| references/usage-examples.md | Compare overall ranking / field / full quantity / niche / no data |
| references/api-spec.md | Check URL, request parameters, |
| references/category-mapping.md | Map user's spoken language → standard |
常见问答
Frequently Asked Questions
Q1:能否不跑脚本直接给 10 篇例文?
A:不能。无脚本输出即视为未执行本 Skill。
Q2:用户只要 HTML、不要长文?
A:仍必须先完整展示脚本 stdout(规范要求),再生成 HTML。
Q3: 有 50 条但对话只聊了 10 条,HTML 几条?
A:10 条;。
temp_articles.json--display_count 10Q4:接口 URL 以哪里为准?
A:以 与 内常量为准,二者若有差异以脚本为准并应同步修正文档。
references/api-spec.mdfetch_hot_articles.pyQ1: Can I provide 10 sample articles without running the script?
A: No. Without script output, it is considered that this Skill has not been executed.
Q2: User only wants HTML, not long text?
A: Still must fully display the script stdout (per specification requirements), then generate HTML.
Q3: has 50 entries but only 10 are discussed in the conversation, how many entries in HTML?
A: 10 entries; use .
temp_articles.json--display_count 10Q4: Where is the interface URL based on?
A: Based on and constants in , if there is a discrepancy between the two, take the script as the standard and synchronize to correct the document.
references/api-spec.mdfetch_hot_articles.py