Analyze Xiaohongshuのロゴ

Analyze Xiaohongshu

コミュニティ
zhangchitc
analyze-xiaohongshu

Xiaohongshu(小红书/RED)のノートやカバー画像をスクレイピングしてアカウントを分析し、7つの観点から包括的な手法レポートを作成します。ユーザーがXiaohongshuアカウントのURLまたはユーザーIDを提示し、アカウントの分析、戦略のリバースエンジニアリング、手法レポートの作成を依頼した場合に使用します。「分析小红书账号」「爬取小红书」「analyze xiaohongshu account」「生成账号方法论报告」などのフレーズがきっかけになります。

概要

公開者zhangchitc
リポジトリanalyze-xiaohongshu
スキル名analyze-xiaohongshu
スター
27
フォーク
1
同梱ファイル
3
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    zhangchitcがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Analyze Xiaohongshu」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/zhangchitc/analyze-xiaohongshu/tree/main
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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を有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAnalyze Xiaohongshuを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Analyze Xiaohongshuは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じ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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Analyze Xiaohongshu」では何ができますか?

Xiaohongshu(小红书/RED)のノートやカバー画像をスクレイピングしてアカウントを分析し、7つの観点から包括的な手法レポートを作成します。ユーザーがXiaohongshuアカウントの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を読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Analyze Xiaohongshuを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Analyze Xiaohongshuで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAnalyze Xiaohongshuを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Analyze Xiaohongshu」は無料ですか?

zhangchitcがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇