本文へ移動
cccskills
無料GitHub で公開

xiaohongshu-skill

小红书 / Xiaohongshu / RedNote AI Agent Skill。用 Python Playwright 搜索和读取内容、管理登录会话、发布图文/视频/长文、评论、点赞和收藏;默认输出 JSON,任何写操作都必须先获得用户确认。

用户提到 xiaohongshu、小红书、rednote、小红书搜索、发到小红书、小红书笔记分析、小红书运营或小红书自动化时触发。

インストール方法を見る

含まれるファイル(103)

  • SKILL.md3.6 KB
  • .coderabbit.yaml278 B
  • .dockerignore212 B
  • .env.example356 B
  • .github/CODEOWNERS19 B
  • .github/ISSUE_TEMPLATE/bug_report.md473 B
  • .github/ISSUE_TEMPLATE/feature_request.md261 B
  • .github/PULL_REQUEST_TEMPLATE.md572 B
  • .github/workflows/ci.yml3.3 KB
  • .github/workflows/pages.yml900 B
  • .github/workflows/release.yml2.6 KB
  • .gitignore422 B
  • AGENTS.md2.0 KB
  • CHANGELOG.md2.6 KB
  • CONTRIBUTING.md2.7 KB
  • data/.gitkeep0 B
  • docker-compose.yml284 B
  • Dockerfile738 B
  • docs/API.md4.3 KB
  • docs/ARCHITECTURE.md3.9 KB
  • docs/INSTALL.md3.9 KB
  • docs/INTEGRATIONS.md2.6 KB
  • docs/PAGES.md2.2 KB
  • docs/REFERENCE.md1.8 KB
  • docs/RELEASING.md1.7 KB
  • docs/ROADMAP.md1.3 KB
  • docs/SECURITY.md2.6 KB
  • examples/claude-code/README.md1.3 KB
  • examples/cursor/README.md791 B
  • examples/demo/publish-ready.json429 B
  • examples/demo/search-result.json382 B
  • examples/n8n/README.md660 B
  • examples/openclaw/README.md625 B
  • examples/README.md460 B
  • LICENSE11.1 KB
  • licenses/Apache-2.0.txt11.1 KB
  • make.ps1279 B
  • pyproject.toml1.7 KB
  • README_EN.md5.8 KB
  • README.md5.5 KB
  • scripts/__init__.py699 B
  • scripts/__main__.py29.1 KB
  • scripts/_logging.py775 B
  • scripts/_utils.py1.9 KB
  • scripts/client.py20.7 KB
  • scripts/comment.py19.1 KB
  • scripts/docs_check.py3.9 KB
  • scripts/explore.py4.5 KB
  • scripts/feed.py8.1 KB
  • scripts/interact.py10.6 KB
  • scripts/login.py11.0 KB
  • scripts/output_contracts.py9.3 KB
  • scripts/profiles.py3.1 KB
  • scripts/publish.py51.9 KB
  • scripts/quality.py2.4 KB
  • scripts/release_check.py1.6 KB
  • scripts/search.py14.3 KB
  • scripts/selectors.py10.6 KB
  • scripts/session_store.py2.9 KB
  • scripts/site_check.py8.3 KB
  • scripts/skill_check.py1.1 KB
  • scripts/sop.py13.9 KB
  • scripts/strategy.py10.1 KB
  • scripts/templates.py11.1 KB
  • scripts/test_gate.py669 B
  • scripts/user.py8.3 KB
  • site/demo.html4.9 KB
  • site/index.html29.1 KB
  • site/llms-full.txt4.0 KB
  • site/llms.txt2.9 KB
  • site/og-image.png57.3 KB
  • site/og-image.svg3.4 KB
  • site/robots.txt239 B
  • site/sitemap.xml616 B
  • tests/__init__.py0 B
  • tests/conftest.py1.9 KB
  • tests/live/test_readonly_smoke.py807 B
  • tests/test_cli.py8.1 KB
  • tests/test_client.py13.3 KB
  • tests/test_comment.py6.2 KB
  • tests/test_docs_check.py1.7 KB
  • tests/test_explore.py3.3 KB
  • tests/test_interact.py6.9 KB
  • tests/test_live_gate.py766 B
  • tests/test_login.py7.4 KB
  • tests/test_output_contracts.py3.0 KB
  • tests/test_profiles.py2.6 KB
  • tests/test_publish_validation.py8.4 KB
  • tests/test_publish.py23.7 KB
  • tests/test_quality.py1.2 KB
  • tests/test_release_check.py1014 B
  • tests/test_search.py3.1 KB
  • tests/test_selectors.py5.5 KB
  • tests/test_session_store.py2.5 KB
  • tests/test_site_check.py3.5 KB
  • tests/test_skill_check.py846 B
  • tests/test_sop.py7.3 KB
  • tests/test_strategy.py5.9 KB
  • tests/test_templates.py6.4 KB
  • tests/test_test_harness.py267 B
  • tests/test_user.py1.9 KB
  • THIRD_PARTY_NOTICES.md795 B
  • uv.lock46.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

小红书 Skill

通过 JSON CLI 操作小红书浏览器会话。执行入口统一为:

cd {baseDir}
uv run python -m scripts <command>

安全规则

发布、评论、回复、点赞、收藏、取消点赞和取消收藏会改变真实账号状态。执行前必须:

  1. 展示目标账号、内容、媒体和操作类型。
  2. 获得用户明确确认。
  3. 只执行用户确认的单次操作。

遇到验证码、登录页或安全验证页时停止。不要自动绕过验证,不要运行批量抓取或批量互动。

任务路由

用户目标命令或参考
首次登录或重新登录qrcode --headless=false
检查登录check-login
管理多个账号--profile <name>;详见 docs/INSTALL.md
搜索笔记search
读取笔记详情feed
读取用户主页user 或 me
获取推荐流explore
准备或发布图文publish
准备或发布视频publish-video
Markdown 转图片发布publish-md
准备或发布长文publish-longform
评论和回复comment、reply、reply-notification
点赞和收藏like、collect、unlike、uncollect
模板、策略和 SOPtemplate、strategy-*、sop
查看参数python -m scripts <command> --help

完整命令见 docs/API.md;安装和平台接入见 docs/INSTALL.md、docs/INTEGRATIONS.md。

初始化

cd {baseDir}
uv sync --frozen --no-dev
uv run playwright install chromium
uv run python -m scripts qrcode --headless=false

开发者使用:

uv sync --frozen --group dev
uv run python -m scripts.quality check

只读示例

uv run python -m scripts search "咖啡" --limit=5
uv run python -m scripts feed <feed_id> <xsec_token>
uv run python -m scripts explore --limit=10

feed_id、user_id 和 xsec_token 必须来自当前会话的结果,不要长期缓存。

发布语义

发布命令默认填写表单并返回 ready。用户确认后才能追加 --auto-publish。

自动提交可能返回:

  • confirmed:已观察到可信成功信号。
  • submitted_unconfirmed:已点击提交但未确认成功;必须人工复核,禁止自动重试。
  • failed:提交失败或出现登录、验证码、安全验证等失败信号。

输出和错误

标准输出是 JSON;诊断信息写入标准错误。Agent 应先读取 status,再依据 scripts/output_contracts.py 中的契约处理字段。

发生 captcha_required 或浏览器安全验证时,不要重试循环。切换到有头模式并由用户处理。

本地状态

每个 profile 独立保存浏览器状态、Cookie 备份和会话元数据。不要读取、展示、提交或外发这些文件。XHS_FP_SEED 只用于显式覆盖当前进程的稳定指纹 seed。

安全和隐私规则见 docs/SECURITY.md。架构说明见 docs/ARCHITECTURE.md。

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

このスキルの問題を報告する