ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้วต้นแบบ · อัปเดตทุก 30 นาที
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · วิธีติดตั้งภาษาไทยทุกตัว

xiaohongshu-cli Skill

โดย jackwener★ 2,7341 skill

ติดตั้ง

ใช้ทำอะไรได้

ยังไม่มีคำอธิบายภาษาไทย ดูข้อเท็จจริงด้านล่าง หรือเปิดคำอธิบายต้นฉบับจากผู้ทำ

  • ต่อแบบ ไฟล์คำสั่งให้ AI อ่าน ไม่ต่อบริการใด
  • บัญชีหรือคีย์ ไม่ต้องใส่คีย์
  • หมวด ข้อมูลและค้นคว้า
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
A CLI for Xiaohongshu (小红书) — search, read, interact via reverse-engineered API
สำหรับผู้ทำ: ติดป้ายใน README

ถ้าคุณเป็นผู้ทำตัวนี้ คัดลอกโค้ดนี้ไปวางใน README ได้เลย ป้ายลิงก์กลับมาที่หน้านี้

[![แนะนำบน PopNx MCP](https://mcp.popnx.com/badge/skill/jackwener-xiaohongshu-cli.svg?lang=th)](https://mcp.popnx.com/th/skills/jackwener-xiaohongshu-cli)

ใช้คู่กับ

MCP ที่ต่อ AI เข้ากับบริการในงานเดียวกัน

Firebase MCP

Gives AI development tools Firebase-specific capabilities and expertise.

โดย firebaseใช้กันมาก↓ 4.9M/สัปดาห์★ 4.5K ดาวรวมทั้งรีโปอัปเดต 12 เดือนที่ผ่านมา

MCP · ต่อบริการรันบนเครื่อง

Supabase

server ทางการของ Supabase ให้ AI สร้างตาราง ถามข้อมูล และดูการตั้งค่าโปรเจกต์ในฐานข้อมูล Supabase ของคุณ

โดย supabaseใช้กันมาก↓ 245.5K/สัปดาห์★ 3K ดาวรวมทั้งรีโปอัปเดต 3 วันที่ผ่านมา

MCP · ต่อบริการบนเครื่องหรือคลาวด์✓ เจ้าของบริการ · supabase.com

Dbx

Query databases from AI agents using connections configured in DBX.

โดย t8y2ใช้กันมาก↓ 9.4K/สัปดาห์★ 30.4Kอัปเดต 7 เดือนที่ผ่านมา

MCP · ต่อบริการรันบนเครื่อง

Skill ที่ทำงานคล้ายกัน

หมวดงานเดียวกัน เรียงแบบเดียวกับหน้ารายการ Skill

เทียบกับตัวที่คล้ายกัน
ตัวนี้
xiaohongshu-cli
timesfmShadowbrokergoogle-maps-scrapertradingview-mcp
ผู้ทำjackwenergoogle-researchBigBodyCobaingosomatilaahmettaner
จำนวน Skill11111
ดาว GitHub2,73435,56711,5808,1075,292
แก้โค้ดล่าสุด21 มี.ค. 256913 พ.ย. 256916 พ.ย. 256915 พ.ย. 256915 พ.ย. 2569
สัญญาอนุญาต–Apache-2.0AGPL-3.0MITMIT

ชุดคำสั่ง (Skill) 1 ชุดจาก jackwener ให้ AI อ่านแล้วทำงานตามวิธีนี้ · ไม่ใช่ MCP server

Skill ต่างจาก MCP ยังไง

MCP = มือ

ต่อ AI เข้ากับบริการหรือข้อมูลข้างนอก เช่น อ่าน Notion หรือสร้างใบแจ้งหนี้ ต้องมีโปรแกรมหรือ server ทำงานอยู่

Skill = คู่มือ

ไฟล์ข้อความที่สอน AI ว่างานนี้ทำยังไง ไม่ต่อบริการใด

บางตัวคล้ายกัน: Skill บางตัวมีสคริปต์เรียกเครื่องมือ และ MCP บางตัวส่งแค่ความรู้ ให้ดูที่งานที่อยากทำเป็นหลัก

ใช้กับแอปไหน

Claude CodeCursor

ตามที่ README ของผู้ทำเขียนไว้ และโฟลเดอร์ที่มีใน repo

ติดตั้ง

ปลอดภัยไหม

  • ใครทำ

    บัญชี GitHub jackwener (บุคคล) เปิดมา 9 ปี

  • คนใช้และการดูแล

    ★ 2,734 ดาว · แก้โค้ดล่าสุด 21 มี.ค. 2569

  • มีสคริปต์ไหม

    มีสคริปต์ 40 ไฟล์ที่รันบนเครื่องได้: tests/__init__.py, tests/conftest.py, tests/test_anti_detection.py, tests/test_cli.py และอีก 36 ไฟล์

  • ใช้อินเทอร์เน็ตไหม

    ตรวจสคริปต์ได้ไม่ครบ (บางไฟล์ใหญ่เกิน) ควรอ่านเองก่อน

  • แก้ค่าตั้งทั้งเครื่องไหม

    ไม่พบ hook หรือการเขียนค่าตั้งของเครื่อง

ตรวจอัตโนมัติจากไฟล์ใน repo ที่ commit 4d63f3c (อ่านไฟล์อย่างเดียว ไม่ได้รัน) ไม่ใช่การรับรองความปลอดภัย อ่านแล้วตัดสินใจเอง

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่ใช้ แล้วหน้านี้จะแสดงเฉพาะวิธีติดตั้งของแอปนั้น

ทางที่ 1อัปโหลดเข้า claude.ai (เว็บและแอป)

  1. ดาวน์โหลดจาก GitHub

    Skill นี้ไม่ระบุใบอนุญาต เราจึงไม่แจกไฟล์ ZIP จากเว็บเรา ดาวน์โหลดจาก GitHub แล้วจัดโฟลเดอร์เอง หรือใช้ทาง "ให้ AI ติดตั้งให้" ด้านบนซึ่งง่ายกว่า

    ดาวน์โหลดจาก GitHub (ทั้ง repo) ↗

    แตกไฟล์ แล้วบีบอัดเฉพาะโฟลเดอร์ xiaohongshu-cli ใหม่ ZIP ต้องมีโฟลเดอร์ xiaohongshu-cli ที่มี SKILL.md อยู่ชั้นบนสุด ห้ามวางไฟล์หลวมไว้ชั้นบนสุด

  2. เปิดหน้า Skills ใน claude.ai แล้วอัปโหลด

    +Create skillUpload a skillเลือกไฟล์ xiaohongshu-cli.zip

    เปิด claude.ai/customize/skills ↗

  3. ไม่เห็นปุ่ม Upload: เปิดสิทธิ์สร้างไฟล์ก่อน

    SettingsCapabilitiesCode execution and file creation

    ต้องเปิด Code execution and file creation ก่อน (เมนูรุ่นใหม่เรียก Create and edit files) · แผนส่วนตัวที่ Settings → Capabilities · Team/Enterprise ผู้ดูแลเปิดที่ Organization settings → Plugins & skills · ใช้ได้ทุกแผนรวมแผนฟรี

อัปโหลดครั้งเดียว ใช้ได้ทั้ง claude.ai และ Claude Desktop รวมถึง Claude Code รุ่นใหม่ที่ล็อกอินด้วยบัญชี Claude (ล็อกอินด้วยคีย์ API ไม่ซิงก์)

Cowork และ session บนคลาวด์ใช้ Skill ที่เปิดในบัญชี claude.ai ไม่อ่าน ~/.claude/skills ในเครื่อง (งานตั้งเวลาของ Claude Desktop ที่รันในเครื่องยังอ่านได้)

ตรวจกับเอกสารทางการล่าสุด 12 พ.ย. 2569 · แหล่ง: support.claude.com, support.claude.com, code.claude.com

ทางที่ 1ให้ Claude Code ติดตั้งให้

คัดลอกประโยคนี้ไปวางในแชตของ Claude Code

ติดตั้งไว้ที่ไหน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

เลือกเฉพาะโปรเจกต์ ให้วางในแชตที่เปิดอยู่ในโฟลเดอร์ของโปรเจกต์นั้น · AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

เปิด Claude Code ใหม่ แล้วพิมพ์ /xiaohongshu-cli หรือสั่งงานที่ตรงเรื่อง Claude จะเลือกใช้เอง

ตรวจกับเอกสารทางการล่าสุด 12 พ.ย. 2569 · แหล่ง: code.claude.com

สำหรับคนที่ใช้ Terminal

Skill คือคำสั่งที่ AI จะทำตาม อ่านไฟล์ก่อนติดตั้ง และติดตั้งเฉพาะจากผู้ทำที่เชื่อถือได้

วิธีที่ผู้ทำแนะนำ

ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

node -v
  • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
  • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
เปิด Terminal ยังไง

Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

เปิดหน้าดาวน์โหลด Node.js ↗

ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

คำสั่งนี้คัดมาจาก README ของผู้ทำ จะดาวน์โหลดและรันโค้ดของผู้ทำ

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: คำสั่งด้านล่างใช้ใน PowerShell ไม่ได้ ให้ใช้ทาง “ให้ AI ติดตั้งให้” ด้านบนแทน

  2. คัดลอกโฟลเดอร์ skill ไปไว้ที่ ~/.claude/skills

    คำสั่งนี้ดาวน์โหลด repo ไว้ชั่วคราว แล้วคัดลอกเฉพาะโฟลเดอร์ที่มี SKILL.md

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  3. เปิด Claude Code ใหม่ แล้วพิมพ์ /xiaohongshu-cli หรือสั่งงานที่ตรงเรื่อง Claude จะเลือกใช้เอง

Skill ที่ติดตั้งเองใช้ได้ในแอป ChatGPT บนคอม, Codex CLI และส่วนขยาย Codex ใน IDE · ChatGPT บนเว็บและมือถือใช้ Skill ที่ติดตั้งเองไม่ได้ ใช้ได้เฉพาะ Skill ที่มากับปลั๊กอินในไดเรกทอรี

แอป ChatGPT บนคอม

แอป ChatGPT บนคอมมี Codex อยู่ในตัว Codex อ่าน Skill จากโฟลเดอร์ ~/.agents/skills

ทางที่ 1ให้ ChatGPT ติดตั้งให้

เปิด Codex ในแอป ChatGPT บนคอม แล้ววางประโยคนี้ในแชต

ติดตั้งไว้ที่ไหน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

ทางที่ 2วางโฟลเดอร์เอง

วางโฟลเดอร์ xiaohongshu-cli ไว้ที่ ~/.agents/skills/xiaohongshu-cli

~ คือโฟลเดอร์บ้านของคุณ ($HOME)

สำหรับคนที่ใช้ Terminal

Skill คือคำสั่งที่ AI จะทำตาม อ่านไฟล์ก่อนติดตั้ง และติดตั้งเฉพาะจากผู้ทำที่เชื่อถือได้

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: คำสั่งด้านล่างใช้ใน PowerShell ไม่ได้ ให้ใช้ทาง “ให้ AI ติดตั้งให้” ด้านบนแทน

  2. คัดลอกโฟลเดอร์ skill ไปไว้ที่ ~/.agents/skills

    คำสั่งนี้ดาวน์โหลด repo ไว้ชั่วคราว แล้วคัดลอกเฉพาะโฟลเดอร์ที่มี SKILL.md

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

หลังติดตั้ง

  • แอป ChatGPT บนคอม: เปิด Skills ในแถบข้างเพื่อดูว่า Skill ขึ้นแล้ว
  • เรียกใช้: ใน ChatGPT พิมพ์ @ แล้วเลือก Skill · ใน Codex CLI หรือส่วนขยายใน IDE พิมพ์ /skills หรือพิมพ์ $ แล้วตามด้วยชื่อ Skill
  • Codex เห็น Skill ที่ติดตั้งใหม่เอง ถ้ายังไม่ขึ้นให้ปิดแล้วเปิด Codex ใหม่

ตรวจกับเอกสารทางการล่าสุด 15 พ.ย. 2569 · แหล่ง: learn.chatgpt.com

ChatGPT บนเว็บและมือถือ

ใช้ Skill ที่ติดตั้งเองไม่ได้ ใช้ได้เฉพาะ Skill ที่มากับปลั๊กอินในไดเรกทอรี

อยากใช้ Skill นี้กับ ChatGPT ให้ใช้แอป ChatGPT บนคอมตามวิธีด้านบน

ตรวจกับเอกสารทางการล่าสุด 15 พ.ย. 2569 · แหล่ง: learn.chatgpt.com

ทางที่ 1ให้ Codex ติดตั้งให้

คัดลอกประโยคนี้ไปวางในแชตของ Codex · ใช้ได้ทั้ง Codex ในแอป ChatGPT บนคอม, Codex CLI และส่วนขยายใน IDE

ติดตั้งไว้ที่ไหน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

เลือกเฉพาะโปรเจกต์ ให้วางในแชตที่เปิดอยู่ในโฟลเดอร์ของโปรเจกต์นั้น · AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

Codex เห็น Skill ที่ติดตั้งใหม่เอง ถ้ายังไม่ขึ้นให้ปิดแล้วเปิด Codex ใหม่ · เรียกใช้: ใน ChatGPT พิมพ์ @ แล้วเลือก Skill · ใน Codex CLI หรือส่วนขยายใน IDE พิมพ์ /skills หรือพิมพ์ $ แล้วตามด้วยชื่อ Skill

ตรวจกับเอกสารทางการล่าสุด 15 พ.ย. 2569 · แหล่ง: learn.chatgpt.com

สำหรับคนที่ใช้ Terminal

Skill คือคำสั่งที่ AI จะทำตาม อ่านไฟล์ก่อนติดตั้ง และติดตั้งเฉพาะจากผู้ทำที่เชื่อถือได้

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: คำสั่งด้านล่างใช้ใน PowerShell ไม่ได้ ให้ใช้ทาง “ให้ AI ติดตั้งให้” ด้านบนแทน

  2. คัดลอกโฟลเดอร์ skill ไปไว้ที่ ~/.agents/skills

    คำสั่งนี้ดาวน์โหลด repo ไว้ชั่วคราว แล้วคัดลอกเฉพาะโฟลเดอร์ที่มี SKILL.md

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  3. เปิด Codex ใหม่ แล้วสั่งงานที่ตรงเรื่อง Codex จะเห็น skill นี้ในรายการ

ทางที่ 1ให้ Cursor ติดตั้งให้

คัดลอกประโยคนี้ไปวางในแชตของ Cursor

ติดตั้งไว้ที่ไหน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

เลือกเฉพาะโปรเจกต์ ให้วางในแชตที่เปิดอยู่ในโฟลเดอร์ของโปรเจกต์นั้น · AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

ใน Agent chat ของ Cursor พิมพ์ / แล้วเลือก xiaohongshu-cli

ตรวจกับเอกสารทางการล่าสุด 12 พ.ย. 2569 · แหล่ง: cursor.com

สำหรับคนที่ใช้ Terminal

Skill คือคำสั่งที่ AI จะทำตาม อ่านไฟล์ก่อนติดตั้ง และติดตั้งเฉพาะจากผู้ทำที่เชื่อถือได้

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: คำสั่งด้านล่างใช้ใน PowerShell ไม่ได้ ให้ใช้ทาง “ให้ AI ติดตั้งให้” ด้านบนแทน

  2. คัดลอกโฟลเดอร์ skill ไปไว้ที่ ~/.cursor/skills

    คำสั่งนี้ดาวน์โหลด repo ไว้ชั่วคราว แล้วคัดลอกเฉพาะโฟลเดอร์ที่มี SKILL.md

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  3. ใน Agent chat ของ Cursor พิมพ์ / แล้วเลือก xiaohongshu-cli

ทางที่ 1ให้ AI ติดตั้งให้

สำหรับแอปอื่นที่อ่าน Skill ได้ ประโยคนี้มี path ของ Claude Code, Codex และ Cursor ให้ AI เลือกตามแอปที่ใช้ · คัดลอกประโยคนี้ไปวางในแชตของแอป

ติดตั้งไว้ที่ไหน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

เลือกเฉพาะโปรเจกต์ ให้วางในแชตที่เปิดอยู่ในโฟลเดอร์ของโปรเจกต์นั้น · AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

ตรวจกับเอกสารทางการล่าสุด 12 พ.ย. 2569 · แหล่ง: code.claude.com, learn.chatgpt.com, cursor.com

สำหรับคนที่ใช้ Terminal

แอปอื่นที่รองรับ Agent Skills (เช่น Gemini CLI, GitHub Copilot) เก็บ skill ในโฟลเดอร์ต่างกัน ดูคู่มือของแอปนั้น แล้วคัดลอกโฟลเดอร์ที่มี SKILL.md ไปวาง

ดูบน GitHub ↗

ตรวจโฟลเดอร์ skill กับคู่มือทางการของ Claude Code, Codex และ Cursor เมื่อ 11 พ.ย. 2569

ดูไฟล์ต้นฉบับ SKILL.md

ข้อความต่อไปนี้มาจาก repo ของผู้ทำ ไม่ใช่คำสั่งของ PopNx MCP

แสดง 8,000 ตัวอักษรแรก · เปิดไฟล์เต็มบน GitHub

---
name: xiaohongshu-cli
description: Use xiaohongshu-cli for ALL Xiaohongshu (Little Red Book, 小红书) operations — searching notes, reading content, browsing users, liking, collecting, commenting, following, and posting. Invoke whenever the user requests any Xiaohongshu interaction.
author: jackwener
version: "0.6.4"
tags:
  - xiaohongshu
  - xhs
  - redbook
  - 小红书
  - social-media
  - cli
---

# xiaohongshu-cli — Xiaohongshu CLI Tool

**Binary:** `xhs`
**Credentials:** browser cookies (auto-extracted) or browser-assisted QR login (`--qrcode`)

## Setup

```bash
# Install (requires Python 3.10+)
uv tool install xiaohongshu-cli
# Or: pipx install xiaohongshu-cli

# Upgrade to latest (recommended to avoid API errors)
uv tool upgrade xiaohongshu-cli
# Or: pipx upgrade xiaohongshu-cli
```

## Authentication

**IMPORTANT FOR AGENTS**: Before executing ANY xhs command, check if credentials exist first. Do NOT assume cookies are configured.

### Step 0: Check if already authenticated

```bash
xhs status --yaml >/dev/null && echo "AUTH_OK" || echo "AUTH_NEEDED"
```

If `AUTH_OK`, skip to [Command Reference](#command-reference).
If `AUTH_NEEDED`, proceed to Step 1. Prefer `--qrcode` when browser cookie extraction is unavailable but launching a browser is acceptable.

### Step 1: Guide user to authenticate

Ensure user is logged into xiaohongshu.com in any browser supported by [browser_cookie3](https://github.com/borisbabic/browser_cookie3). Supported browsers: Chrome, Arc, Edge, Firefox, Safari, Brave, Chromium, Opera, Opera GX, Vivaldi, LibreWolf, Lynx, w3m. Then:

```bash
xhs login                              # auto-detect browser with valid cookies
xhs login --cookie-source arc          # specify browser explicitly
xhs login --qrcode                     # browser-assisted QR login with terminal QR output
```

Verify with:

```bash
xhs status
xhs whoami
```

### Step 2: Handle common auth issues

| Symptom | Agent action |
|---------|-------------|
| `NoCookieError: No 'a1' cookie found` | Guide user to login to xiaohongshu.com in browser |
| `NeedVerifyError: Captcha required` | Ask user to open browser, complete captcha, then retry |
| `IpBlockedError: IP blocked` | Suggest switching network (hotspot/VPN) |
| `SessionExpiredError` | Run `xhs login` to refresh cookies |

## Agent Defaults

All machine-readable output uses the envelope documented in [SCHEMA.md](./SCHEMA.md).
Payloads live under `.data`.

- Non-TTY stdout → auto YAML
- `--json` / `--yaml` → explicit format
- `OUTPUT=json` env → global override
- `OUTPUT=rich` env → force human output

## Command Reference

### Reading

| Command | Description | Example |
|---------|-------------|---------|
| `xhs search <keyword>` | Search notes | `xhs search "美食" --sort popular --type video` |
| `xhs read <id_or_url_or_index>` | Read a note by ID, URL, or short index | `xhs read 1` / `xhs read "https://...?xsec_token=xxx"` |
| `xhs comments <id_or_url_or_index>` | Get comments by ID, URL, or short index | `xhs comments 1` / `xhs comments "https://...?xsec_token=..."` |
| `xhs comments <id_or_url> --all` | Get ALL comments (auto-paginate) | `xhs comments "<url>" --all --json` |
| `xhs sub-comments <note_id> <comment_id>` | Get replies to comment | `xhs sub-comments abc 123` |
| `xhs user <user_id>` | View user profile | `xhs user 5f2e123` |
| `xhs user-posts <user_id>` | List user's notes | `xhs user-posts 5f2e123 --cursor ""` |
| `xhs feed` | Browse recommendation feed | `xhs feed --yaml` |
| `xhs hot` | Browse trending notes | `xhs hot -c food` |
| `xhs topics <keyword>` | Search topics/hashtags | `xhs topics "旅行"` |
| `xhs search-user <keyword>` | Search users | `xhs search-user "摄影"` |
| `xhs my-notes` | List own published notes | `xhs my-notes --page 0` |
| `xhs notifications` | View notifications | `xhs notifications --type likes` |
| `xhs unread` | Show unread counts | `xhs unread --json` |

### Interactions (Write)

| Command | Description | Example |
|---------|-------------|---------|
| `xhs like <id_or_url_or_index>` | Like a note | `xhs like 1` / `xhs like abc123` |
| `xhs like <id_or_url_or_index> --undo` | Unlike a note | `xhs like 1 --undo` |
| `xhs favorite <id_or_url_or_index>` | Bookmark a note | `xhs favorite 1` |
| `xhs unfavorite <id_or_url_or_index>` | Remove bookmark | `xhs unfavorite 1` |
| `xhs comment <id_or_url_or_index> -c "text"` | Post a comment | `xhs comment 1 -c "好看!"` |
| `xhs reply <id_or_url_or_index> --comment-id ID -c "text"` | Reply to comment | `xhs reply 1 --comment-id 456 -c "谢谢"` |
| `xhs delete-comment <note_id> <comment_id>` | Delete own comment | `xhs delete-comment abc 123 -y` |

### Social

| Command | Description | Example |
|---------|-------------|---------|
| `xhs follow <user_id>` | Follow a user | `xhs follow 5f2e123` |
| `xhs unfollow <user_id>` | Unfollow a user | `xhs unfollow 5f2e123` |
| `xhs favorites [user_id]` | List bookmarked notes (defaults to self) | `xhs favorites --json` |

### Creator

| Command | Description | Example |
|---------|-------------|---------|
| `xhs post --title "..." --body "..." --images img.png` | Publish a note | `xhs post --title "Test" --body "Hello"` |
| `xhs delete <id_or_url>` | Delete own note | `xhs delete abc123 -y` |

### Account

| Command | Description |
|---------|-------------|
| `xhs login` | Extract cookies from browser (auto-detect) |
| `xhs login --qrcode` | Browser-assisted QR login — terminal QR output, browser completes login |
| `xhs status` | Check authentication status |
| `xhs logout` | Clear cached cookies |
| `xhs whoami` | Show current user profile |

## Agent Workflow Examples

### Search → Read → Like pipeline

```bash
NOTE_ID=$(xhs search "美食推荐" --json | jq -r '.data.items[0].id')
xhs read "$NOTE_ID" --json | jq '.data'
xhs like "$NOTE_ID"
```

### Browse trending food notes

```bash
xhs hot -c food --json | jq '.data.items[:5] | .[].note_card | {title, likes: .interact_info.liked_count}'
```

### Get user info then follow

```bash
xhs user 5f2e123 --json | jq '.data.basic_info | {nickname, user_id}'
xhs follow 5f2e123
```

### Check notifications

```bash
xhs unread --json | jq '.data'
xhs notifications --type mentions --json | jq '.data.message_list[:5]'
```

### Analyze all comments on a note

```bash
# Fetch ALL comments and analyze themes
xhs comments "$NOTE_URL" --all --json | jq '.data.comments | length'
# Count questions
xhs comments "$NOTE_URL" --all --json | jq '[.data.comments[] | select(.content | test("[\uff1f?]"))] | length'
```

### Daily reading workflow

```bash
# Browse recommendation feed
xhs feed --yaml

# Interactive short-index workflow
xhs search "旅行"
xhs read 1
xhs comments 1
xhs like 1
xhs favorite 1
xhs comment 1 -c "收藏了"

# Browse trending by category
xhs hot -c food --yaml
xhs hot -c travel --yaml
```

### QR code login

```bash
# When browser cookie extraction is not available
xhs login --qrcode
# → Launches a browser-assisted login flow
# → Renders QR in terminal using Unicode half-blocks
# → Scan with Xiaohongshu app → confirm → export cookies
```

### URL to insights pipeline

```bash
# User pastes a URL → read + all comments
xhs read "https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy" --json
xhs comments "https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy" --all --json
```

## Hot Categories

Available for `xhs hot -c <category>`:
`fashion`, `food`, `cosmetics`, `movie`, `career`, `love`, `home`, `gaming`, `travel`, `fitness`

## Error Codes

Structured error codes returned in the `error.code` field:
- `not_authenticated` — cookies expired or missing
- `verification_required` — captcha/verification needed
- `ip_blocked` — IP rate limited
- `signature_error` — request signing failed
- `api_error` — upstream API error
- `unsupported_operation` — operation not available

## Limitations

- **No video download** — cannot download note images/videos
- **No DMs** — cannot access private messages
- **No live streaming** — live features not supported
- **No

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบเพื่อโพสต์

ข้อมูลจาก GitHub

ดาว GitHub
2,734
ผู้ทำ
jackwener
license
ไม่ระบุ
แก้โค้ดล่าสุด
21 มี.ค. 2569
ไฟล์ SKILL.md ใน repo (นับรวมสำเนาภาษาอื่นและแม่แบบ)
1