xiaohongshu-skills: Instructions file for Claude Code

CLAUDE.md

xiaohongshu-skills CLAUDE.md is an instructions file for Claude Code from autoclaw-cc/xiaohongshu-skills. It costs 806 tokens per session, scanned A, original, MIT.

A project guide for automating Xiaohongshu, a Chinese social-media platform, through a real browser and user account.

In plain words
What is it for?
Use it when checking login status, searching feeds, publishing posts, running tests, or modifying the command-line and browser-extension integration.
Why use it?
It explains the code structure, commands, safety rules, and development workflow needed to change or run the automation reliably.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Claude Code.

This is autoclaw-cc/xiaohongshu-skills's own configuration. It tells Claude Code how to work on xiaohongshu-skills itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything xiaohongshu-skills configures →

About the project

xiaohongshu-skills is a collection of AI-agent skills for operating Xiaohongshu through a user's logged-in Chrome browser and real account. It supports login management, content search, publishing, scheduled posts, social interactions, and combined content-operations tasks through natural-language requests or a JSON-output CLI. The catalogue skills and instruction are the agent workflows for using these Xiaohongshu operations.

autoclaw-cc/xiaohongshu-skills · 1,884 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to autoclaw-cc/xiaohongshu-skills. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/autoclaw-cc/xiaohongshu-skills/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/autoclaw-cc/xiaohongshu-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xiaohongshu-skills CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/autoclaw-cc/xiaohongshu-skills/claude-md/github.svg)](https://agentmods.dev/instructions/autoclaw-cc/xiaohongshu-skills/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/autoclaw-cc/xiaohongshu-skills/claude-md"><img src="https://agentmods.dev/badge/instructions/autoclaw-cc/xiaohongshu-skills/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xiaohongshu-skills CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/autoclaw-cc/xiaohongshu-skills/claude-md"><img src="https://agentmods.dev/badge/instructions/autoclaw-cc/xiaohongshu-skills/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 806 This file is loaded in full into every session.
When invoked 806 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00806 $0.00806
Opus 5 $0.00403 $0.00403
Sonnet 5 $0.00161 $0.00161
Haiku 4.5 $0.00081 $0.00081

Measured 12d ago against content hash 6414fd40ed2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

xiaohongshu-skills CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

xiaohongshu-skills

小红书自动化 Claude Code Skills,使用用户的真实浏览器和账号信息操作小红书。

Git 工作流

  • 所有代码修改必须在分支上进行,禁止直接推送 main 分支
  • 分支开发完成后通过 PR 合入 main

开发命令

uv sync                    # 安装依赖
uv run ruff check .        # Lint 检查
uv run ruff format .       # 代码格式化
uv run pytest              # 运行测试

架构

双层结构:scripts/ 是 Python 自动化引擎,skills/ 是 Claude Code Skills 定义(SKILL.md 格式)。

  • scripts/xhs/ — 核心自动化库(模块化,每个功能一个文件)
  • scripts/cli.py — 统一 CLI 入口,JSON 结构化输出,自动启动 bridge server 和浏览器
  • scripts/bridge_server.py — 本地通信服务(连接 CLI 与浏览器扩展)
  • extension/ — Chrome 扩展,在用户的真实浏览器中执行操作
  • skills/*/SKILL.md — 指导 Claude 如何调用 scripts/

调用方式

python scripts/cli.py check-login
python scripts/cli.py search-feeds --keyword "关键词"
python scripts/cli.py publish --title-file t.txt --content-file c.txt --images pic.jpg

CLI 会自动检测环境,若浏览器未打开也会自动启动 Chrome。

代码规范

  • 行长度上限 100 字符
  • 完整 type hints,使用 from __future__ import annotations
  • 异常继承 XHSErrorxhs/errors.py
  • CLI exit code:0=成功,1=未登录,2=错误
  • 用户可见错误信息使用中文
  • JSON 输出 ensure_ascii=False

安全约束

  • 发布类操作必须有用户确认机制
  • 文件路径必须使用绝对路径
  • 敏感内容通过文件传递,不内联到命令行参数

CLI 子命令对照表

CLI 子命令 对应 MCP 工具 分类
check-login check_login_status 认证
login get_login_qrcode 认证
phone-login 认证
delete-cookies delete_cookies 认证
list-feeds list_feeds 浏览
search-feeds search_feeds 浏览
get-feed-detail get_feed_detail 浏览
user-profile user_profile 浏览
post-comment post_comment_to_feed 互动
reply-comment reply_comment_in_feed 互动
like-feed like_feed 互动
favorite-feed favorite_feed 互动
publish publish_content 发布
publish-video publish_with_video 发布
fill-publish 分步发布(图文填写)
fill-publish-video 分步发布(视频填写)
click-publish 分步发布(点击发布)
long-article 长文发布(填写+排版)
select-template 长文发布(选择模板)
next-step 长文发布(下一步+描述)
get-netlog 风控数据
risk-report 风控数据

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 80 lines · 806 tokens per session scan A 6414fd40ed2b

Subscribe to this mod's changes

xiaohongshu-skills CLAUDE.md is an instructions file published in the GitHub repository autoclaw-cc/xiaohongshu-skills (1,884 stars, last pushed 3mo ago), licensed MIT. It adds 806 tokens to every session, about $0.0040 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,126 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens