Skip to content
Back to skills

Xhs Noteid

ASecurity

Extract Xiaohongshu (小红书) noteId from shared note text or URLs, including xhslink.com short links and xiaohongshu.com/discovery/item/<noteId> links. Use when the user asks for “noteId/笔记ID”, provides a 小红书 share message, or pastes an xhslink short URL that needs redirect expansion.

  • 3 stars
  • 0 votes
  • 0 copies
  • 12 views
  • Added May 28, 2026
research

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 28, 2026

npx -y skills add muzhicaomingwang/ai-ideas --skill xhs-noteid --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Xhs Noteid?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Xhs Noteid
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/muzhicaomingwang-xhs-noteid/badge)](https://www.skillsdirectory.com/skills/muzhicaomingwang-xhs-noteid)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: xhs-noteid
description: Extract Xiaohongshu (小红书) noteId from shared note text or URLs, including xhslink.com short links and xiaohongshu.com/discovery/item/<noteId> links. Use when the user asks for “noteId/笔记ID”, provides a 小红书 share message, or pastes an xhslink short URL that needs redirect expansion.
---

# Extract noteId from XiaoHongShu shares

## Fast path (no network)

- Find and return the `<noteId>` in URLs like `https://www.xiaohongshu.com/discovery/item/<noteId>`.
- Also accept share text that contains that URL; extract the same `<noteId>`.
- Prefer returning only the ID (or `noteId: <id>` if the user wants a labeled answer).

## Short-link path (`xhslink.com`)

If the user only provides a short link like `http://xhslink.com/o/...`, expand redirects to a long URL, then extract the `<noteId>` from `/discovery/item/<noteId>`.

- Resolve redirect (requires network access/approval in sandboxed runs):
  - `curl -sS -L -o /dev/null -w '%{url_effective}' '<short-url>'`
- Extract `<noteId>` from the resolved URL.

## Script

Use `scripts/extract_noteid.py` for deterministic extraction and optional short-link resolution.

Files in this skill

  • SKILL.md1.1 KB
  • scripts/extract_noteid.py2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in research →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.