技能图谱SKILLSGROVE
技能图谱/短视频与自媒体/autoclaw-cc/xiaohongshu-mcp-skills/xhs-interact

xhs-interact

安装

$npx skills add https://github.com/autoclaw-cc/xiaohongshu-mcp-skills --skill xhs-interact
$git clone --depth 1 https://github.com/autoclaw-cc/xiaohongshu-mcp-skills.git /tmp/xiaohongshu-mcp-skills && mkdir -p ~/.claude/skills && cp -r /tmp/xiaohongshu-mcp-skills/skills/xhs-interact ~/.claude/skills/xhs-interact
请帮我安装这个 Agent Skill:https://github.com/autoclaw-cc/xiaohongshu-mcp-skills/tree/c79206ce4191fdb5f4c72d62155ed8ac49e7d0ae/skills/xhs-interact ,先阅读它的 SKILL.md 和脚本,确认安全后再安装到我的技能目录。

简介

原文描述 · MIT对小红书笔记进行互动:点赞/取消点赞、收藏/取消收藏、发表评论、回复评论。 当用户想对小红书笔记进行互动时使用——赞一下、收藏一下、留个评论、回复某条评论、取消点赞、取消收藏等。
以下 SKILL.md 内容转载自 autoclaw-cc/xiaohongshu-mcp-skills(提交 c79206c),依据 MIT 许可证转载正文(文字未改动;仅省略文件头元数据、将图片显示为链接,超长内容会截断);版权归 2026 Auto-Claw-CC 所有。许可证:LICENSE。仅展示说明文件,附带脚本请在原仓库查看。

输入判断

根据用户意图路由:

  • 点赞/取消点赞 → 点赞流程
  • 收藏/取消收藏 → 收藏流程
  • 发表评论 → 评论流程
  • 回复评论 → 回复流程

约束

  • 评论和回复执行前展示内容让用户确认(评论以用户身份公开发表,无法撤回)
  • 点赞和收藏可直接执行(操作可逆,MCP 服务有幂等处理)
  • 所有操作都需要 feed_id + xsec_token(来自搜索或详情结果,编造会导致报错)

执行流程

点赞

调用 like_feed:

  • feed_id(string,必填)
  • xsec_token(string,必填)
  • unlike(bool,可选)— true 取消点赞,默认 false 点赞

已点赞时再点赞会自动跳过,反之同理。

收藏

调用 favorite_feed:

  • feed_id(string,必填)
  • xsec_token(string,必填)
  • unfavorite(bool,可选)— true 取消收藏,默认 false 收藏

已收藏时再收藏会自动跳过,反之同理。

发表评论

调用 post_comment_to_feed:

  • feed_id(string,必填)
  • xsec_token(string,必填)
  • content(string,必填)— 评论内容

发送前展示评论内容让用户确认。

回复评论

调用 reply_comment_in_feed:

  • feed_id(string,必填)
  • xsec_token(string,必填)
  • comment_id(string,可选)— 目标评论 ID
  • user_id(string,可选)— 目标评论作者 ID
  • content(string,必填)— 回复内容

comment_id 和 user_id 至少提供一个。

发送前展示回复内容让用户确认。

失败处理

场景 处理
未登录 引导使用 xhs-login
缺少 feed_id/xsec_token 提示先搜索或浏览获取笔记信息
笔记不可评论 告知用户该笔记已关闭评论
查看许可证全文(MIT)
MIT License

Copyright (c) 2026 Auto-Claw-CC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.