mcpField
X
xiaohongshu-media-collector

xiaohongshu-media-collector

github.com/postplusaiData & databases27138 installsUpdated 1d ago
Repository

About xiaohongshu-media-collector

A skill for creating local manifests and downloading cover images referenced in normalized Xiaohongshu datasets. It supports validated cover-image URLs, checks downloaded files, and explicitly excludes video downloads and arbitrary note-image extraction.

Key features

  1. 01Builds manifests from normalized datasets
  2. 02Downloads validated cover images
  3. 03Verifies downloaded files
  4. 04Rejects unsupported video requests
  5. 05Keeps a manifest as the asset record

Use cases

  1. 01Prepare cover assets for XHS card composition
  2. 02Collect covers for downstream review
  3. 03Verify downloaded cover-image files

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/postplusai/postplus-skills --skill xiaohongshu-media-collector

After installing, type/xiaohongshu-media-collectorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

_postplus_shared/scripts/lib/
campaign-report-manifest.mjs
references/
manifest-schema.md
validated-surfaces.md
scripts/
build_xhs_media_manifest.mjs
download_xhs_media_assets.mjs
verify_xhs_media_manifest.mjs
scripts/lib/
media_common.mjs

Details

From the project README

XHS Media Collector

Follow shared public skill rules in:

  • postplus-shared public skill rules

Legacy alias: xhs-media-collector.

Use this skill when the user wants to:

  • download Xiaohongshu cover images from validated datasets
  • turn normalized XHS research output into a local media manifest
  • prepare local cover-image assets for XHS card composition or downstream review

Read these references before implementation:

  • skills/20-research/xhs-media-collector/references/validated-surfaces.md
  • skills/20-research/xhs-media-collector/references/manifest-schema.md

Default posture

Only collect asset URLs that are already exposed by a validated upstream dataset.

Supported by default:

  • coverUrl from normalized XHS post datasets

Not supported by default:

  • non-cover image extraction from note pages
  • direct Xiaohongshu video downloader output

Do not pretend video collection works when the validated downloader returns 404 Not found data. Before accepting a media request, tell the user that the released path supports validated cover images from upstream datasets only. It does not support Xiaohongshu video downloads. The supported path is cover-image collection, not direct Xiaohongshu video downloads.

What this skill is for

  • building a local manifest from normalized XHS datasets
  • downloading cover images from remote URLs already present in normalized data
  • verifying that downloaded files exist and are non-empty

What this skill is not for

  • discovering note URLs
  • extracting post metadata
  • extracting arbitrary note images
  • downloading videos from note URLs by default

Failure posture

  • fail if the input dataset contains no downloadable coverUrl image URLs
  • fail if the requested asset type is video
  • fail if the requested asset role is not cover
  • fail if a download returns a non-2xx response
  • keep the manifest as the single source of truth for downloaded assets

Public Skill Execution Contract

  • keep media manifests, download reports, and intermediate verification files under <work-folder>/.postplus/xiaohongshu-media-collector/
  • keep only final downloaded user-facing assets outside .postplus/
  • start with a bounded first pass, usually 3-10 cover images before broader pulls
  • fail fast if a download fails or the requested asset surface is not validated instead of pretending collection succeeded

Main scripts

  • scripts/build_xhs_media_manifest.mjs
  • scripts/download_xhs_media_assets.mjs
  • scripts/verify_xhs_media_manifest.mjs

Minimal workflow

node ${CLAUDE_SKILL_DIR}/scripts/build_xhs_media_manifest.mjs \
  --input <work-folder>/.postplus/xhs-normalized.json \
  --limit 3 \
  --output <work-folder>/.postplus/xhs-media-manifest.json

node ${CLAUDE_SKILL_DIR}/scripts/download_xhs_media_assets.mjs \
  --manifest <work-folder>/.postplus/xhs-media-manifest.json \
  --output-dir <work-folder>/.postplus/xhs-media-assets \
  --output <work-folder>/.postplus/xhs-media-download-report.json

node ${CLAUDE_SKILL_DIR}/scripts/verify_xhs_media_manifest.mjs \
  --manifest <work-folder>/.postplus/xhs-media-download-report.json

Good output

Return:

  • manifest path
  • downloaded file count
  • failed asset count
  • stable local file paths for downstream use

Comments

Markdown supported