Analyze Xiaohongshu 标志

Analyze Xiaohongshu

社区
zhangchitc
analyze-xiaohongshu

通过抓取小红书笔记和封面,分析小红书(小红书/RED)账号,并从 7 个维度生成全面的方法论报告。当用户提供小红书账号 URL 或用户 ID,并要求分析账号、逆向拆解其策略或生成方法论报告时使用。以下表达会触发此技能:“分析小红书账号”“爬取小红书”“analyze xiaohongshu account”“生成账号方法论报告”。

概览

发布者zhangchitc
代码仓库analyze-xiaohongshu
技能名称analyze-xiaohongshu
星标数
27
复刻数
1
附带文件
3
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 3 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 zhangchitc 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Analyze Xiaohongshu AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/zhangchitc/analyze-xiaohongshu/tree/main
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zhangchitc/analyze-xiaohongshu.git \
  .claude/skills/analyze-xiaohongshu
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Analyze Xiaohongshu,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Analyze Xiaohongshu。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Analyze Xiaohongshu 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

analyze-xiaohongshu

Scrape a Xiaohongshu account's notes and cover images, then produce a structured methodology report.

Workflow

Step 1: Parse input

Accept either format:

  • Full URL: https://www.xiaohongshu.com/user/profile/<ID>
  • Raw user ID string

Extract the account ID using the pattern /user/profile/([a-zA-Z0-9]+).

Step 2: Environment check

bash
python3 --version          # must be 3.8+
pip3 show playwright       # check if installed

If playwright is missing:

bash
pip3 install playwright && playwright install chromium

Step 3: Run the scraper

The scraper is at scripts/scraper.py (relative to this skill directory). Find its absolute path first.

bash
python3 <skill_dir>/scripts/scraper.py <account_url_or_id>

Behavior:

  • Opens a visible Chromium browser
  • If no saved cookie exists or cookie is expired → waits for user to manually scan QR code and log in (up to 3 minutes)
  • Saves cookie to data/cookies.json for reuse
  • Scrolls the profile page to collect up to 100 note cards — no detail page visits
  • For each card, extracts: note ID, URL, title, cover image URL, like count, content type (video/image)
  • Downloads cover images to covers/
  • Supports resume: skips notes already in data/<account_id>/notes.json
  • Saves data to data/<account_id>/ inside the skill directory

Output paths:

<skill_dir>/data/
├── cookies.json
└── <account_id>/
    ├── profile.json
    ├── notes.json        # fields: note_id, url, title, cover_url, likes, type, cover_local_path
    └── covers/
        └── <note_id>.jpg

Step 4: Load data

After the scraper finishes, read the JSON files:

python
import json
profile = json.load(open("data/<account_id>/profile.json"))
notes   = json.load(open("data/<account_id>/notes.json"))

Step 5: Analyze covers (batched visual analysis)

Read cover images in batches of 5–10 using the Read tool (images). Prioritize covers from the top 20% notes by likes first, then the rest for comparison.

Engagement score per note = likes (only metric available from profile cards)

Step 6: Generate the report

Write a Markdown report to data/<account_id>/report.md. Include all 7 dimensions below.

Step 6.5: Generate analysis.json

After the report, generate data/<account_id>/analysis.json with structured data extracted from your analysis. The dashboard (scripts/dashboard.py) requires this file.

json
{
  "account_id": "<account_id>",
  "generated_at": "YYYY-MM-DD",
  "topic_categories": {
    "<category_name>": ["keyword1", "keyword2", ...]
  },
  "title_formulas": [
    {
      "name": "公式名称",
      "pattern": "regex_pattern",
      "template": "模板描述",
      "trigger": "触发机制",
      "color": "#hex",
      "examples": ["示例标题1", "示例标题2"]
    }
  ],
  "cloud_keywords": ["word1", "word2", ...],
  "radar_dimensions": ["收藏潜力", "分享潜力", "时效性", "专业门槛", "变现潜力"],
  "radar_scores": {
    "<category_name>": [0-100, 0-100, 0-100, 0-100, 0-100]
  },
  "strategies": [
    {
      "title": "策略标题",
      "body": "策略详细说明",
      "action": "具体行动建议"
    }
  ],
  "top10_note_ids": ["8-char-prefix", ...],
  "top10_analysis": [
    { "note_id_prefix": "8-char-prefix", "success_factors": "该笔记的成功因素拆解" }
  ],
  "hit_patterns": [
    "爆款共性总结(如:同一公式贡献X%总赞)"
  ],
  "title_hit_vs_miss": {
    "dimensions": ["对比维度1", "对比维度2", ...],
    "hit": ["爆款特征1", "爆款特征2", ...],
    "miss": ["普通特征1", "普通特征2", ...]
  },
  "cover_analysis": {
    "styles": [
      { "name": "风格名", "count": 4, "traits": "风格特征描述", "performance": "high|medium|mixed|low" }
    ],
    "hit_cover_patterns": ["爆款封面共性1", "爆款封面共性2"],
    "template_suggestion": "推荐的封面模板描述"
  },
  "category_insights": {
    "<category>": "该类别的定性分析(优势、弱点、建议)"
  },
  "format_comparison": {
    "video_avg_likes": 0,
    "image_avg_likes": 0,
    "video_total_likes_pct": 0,
    "insight": "视频vs图文总结",
    "per_category": [
      { "category": "类别名", "best_format": "视频|图文|均可", "reason": "原因" }
    ]
  },
  "content_formulas_recap": [
    { "label": "A 公式名", "template": "公式模板" }
  ],
  "action_plan": {
    "this_week": ["本周行动1", "本周行动2"],
    "this_month": ["本月行动1"],
    "long_term": ["长期方向1"]
  }
}

Field guidelines:

  • topic_categories: 3-6 categories with 5-20 keywords each, derived from the account's actual content themes
  • title_formulas: 4-8 formulas with valid regex patterns, derived from the account's title patterns
  • cloud_keywords: 20-40 high-frequency keywords from the account's titles
  • radar_scores: One entry per topic category, scores 0-100 for each of the 5 radar dimensions
  • strategies: 3-5 actionable strategies from the report's dimension 7
  • top10_note_ids: First 8 characters of the top 10 notes' IDs (by likes)
  • top10_analysis: Per-note success factor breakdown for each top 10 note, matched by note_id_prefix
  • hit_patterns: 1-3 bullet points summarizing the key patterns shared by hit content
  • title_hit_vs_miss: Multi-dimension comparison table of hit vs miss title characteristics
  • cover_analysis: Cover style distribution, hit cover patterns, and template suggestion
  • category_insights: One qualitative paragraph per topic category (strengths, weaknesses, recommendations)
  • format_comparison: Video vs image performance comparison with per-category recommendations
  • content_formulas_recap: 3-5 quick-reference content formulas (label + template)
  • action_plan: Time-bound action items split into this_week, this_month, long_term

Step 7: Generate the dashboard

Run the dashboard generator to produce an interactive HTML dashboard:

bash
python3 <skill_dir>/scripts/dashboard.py <account_id>

This reads data/<account_id>/analysis.json (required) along with profile.json and notes.json, and outputs data/<account_id>/dashboard.html.

Note on data availability: the scraper collects card-level data only (title, likes, cover, type). Hashtags and publish dates are not visible on profile cards and are excluded.


Report Structure (7 Dimensions)

1. 账号概览

  • 昵称、简介、粉丝量级、内容类型定位
  • 核心统计:总笔记数、平均点赞、点赞中位数
  • 视频 vs 图文比例

2. 爆款笔记分析(Top 10)

  • 按点赞数降序排列
  • 每篇列出:标题、点赞数、内容类型、成功因素拆解
  • 爆款定义:点赞量排名前 20% 的笔记

3. 标题分析

  • 标题长度分布与最佳长度区间
  • 高频词和句式模式(如"xx个方法"、"千万别xx"、提问式等)
  • 爆款 vs 普通标题的差异对比
  • 可复用的标题公式总结(至少 3 个)

4. 封面图分析(视觉分析)

  • 风格类型分布(实拍 / 设计图 / 截图 / 对比图等)
  • 配色特征、文字使用规律、构图规律
  • 爆款封面的共性特征
  • 可复用的封面模板建议

5. 内容选题分析

  • 主题分类及各类占比(基于标题文本聚类)
  • 各类别的平均点赞表现
  • 最受欢迎的选题方向

6. 内容形式分析

  • 图文 vs 视频的比例与点赞表现对比
  • 哪种形式更受该账号受众欢迎

7. 可复制的方法论总结

  • 该账号的核心增长策略(3-5条)
  • 可直接复用的内容公式
  • 具体行动建议清单(可执行的 to-do list)

Error Handling

  • Scraper gets no notes: Check that section.note-item elements exist on the profile page. If not, the scraper falls back to a[href*="/explore/"] links.
  • Cookie expired: Delete data/cookies.json and rerun the scraper to trigger a fresh login.
  • Partial data: If the scraper was interrupted, rerun it — it will skip already-downloaded covers.
  • Missing cover images: Proceed with analysis using available covers; note which notes lack covers.
  • Anti-bot detection: The scraper stays on the profile page only. If detection still occurs, increase DELAY_MIN/DELAY_MAX in scraper.py.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Analyze Xiaohongshu AI 技能有什么作用?

通过抓取小红书笔记和封面,分析小红书(小红书/RED)账号,并从 7 个维度生成全面的方法论报告。当用户提供小红书账号 URL 或用户 ID,并要求分析账号、逆向拆解其策略或生成方法论报告时使用。以下表达会触发此技能:“分析小红书账号”“爬取小红书”“analyze xiaohongshu account”“生成账号方法论报告”。

为什么在 TypingMind 中使用 Analyze Xiaohongshu?

因为您只需安装一次,就能搭配任何模型使用。Analyze Xiaohongshu 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Analyze Xiaohongshu?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/zhangchitc/analyze-xiaohongshu/tree/main。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Analyze Xiaohongshu?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Analyze Xiaohongshu 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Analyze Xiaohongshu 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Analyze Xiaohongshu AI 技能免费吗?

zhangchitc 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇