Borrowing it
Nothing to install: this file belongs to ShunL12324/xhs-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ShunL12324/xhs-mcp/master/CLAUDE.mdgit clone --depth 1 https://github.com/ShunL12324/xhs-mcpWrote 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.
[](https://agentmods.dev/instructions/shunl12324/xhs-mcp/claude-md)<a href="https://agentmods.dev/instructions/shunl12324/xhs-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/shunl12324/xhs-mcp/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.
<a href="https://agentmods.dev/instructions/shunl12324/xhs-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/shunl12324/xhs-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04400 | $0.04400 |
| Opus 5 | $0.02200 | $0.02200 |
| Sonnet 5 | $0.00880 | $0.00880 |
| Haiku 4.5 | $0.00440 | $0.00440 |
Grade A, and why
xhs-mcp 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 372 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Xiaohongshu MCP Server
Project Overview
A Model Context Protocol (MCP) server that provides tools for interacting with Xiaohongshu (小红书/RedNote). Uses Playwright for browser automation. Version 2.0 adds multi-account support with SQLite database storage.
Tech Stack
- Runtime: Bun (also compatible with Node.js)
- Language: TypeScript (ESNext, strict mode)
- Browser Automation: Playwright
- HTTP Framework: Hono (for HTTP transport mode)
- Database: SQLite (better-sqlite3)
- MCP: @modelcontextprotocol/sdk
- Validation: Zod v4
Project Structure
~/.xhs-mcp/ # Data directory
├── data.db # SQLite database (accounts, logs, etc.)
├── logs/ # Log files
│ └── xhs-mcp.log # Application log
├── prompts/ # Account prompt files (new in v2.5)
│ └── {accountName}_{accountId}/
│ ├── persona.txt # Character definition
│ ├── select.txt # Note selection prompt
│ └── comment.txt # Comment generation prompt
├── temp/ # Temporary files
│ └── images/ # Downloaded HTTP images for publishing
└── downloads/
├── images/{noteId}/
└── videos/{noteId}/
src/
├── index.ts # Entry point with stdio/http mode switch
├── server.ts # MCP Server configuration and tool registration
├── http-server.ts # HTTP transport server (StreamableHTTP)
├── core/
│ ├── config.ts # Unified configuration with environment variables
│ ├── paths.ts # Path utilities (re-exports from config)
│ ├── logger.ts # Structured logging (console + file)
│ ├── account-pool.ts # Multi-account client pool (池化管理)
│ ├── account-lock.ts # Concurrent access prevention (互斥锁)
│ ├── multi-account.ts # Multi-account operation helpers (并行/串行执行)
│ ├── login-session.ts # Multi-step login session manager
│ ├── gemini.ts # Gemini AI integration (image generation, etc.)
│ ├── explore-ai.ts # AI decision module for explore (note selection, comment generation)
│ ├── prompt-manager.ts # Prompt file management (read/write/render with LiquidJS)
│ ├── image-upload.ts # Image upload utilities
│ ├── qrcode-utils.ts # QR code generation and display utilities
│ └── prompts/ # AI prompt templates
│ └── defaults.ts # Default prompt templates (persona, select, comment)
├── db/
│ ├── index.ts # XhsDatabase class (组合所有 Repository)
│ ├── schema.ts # Table definitions
│ └── repos/ # Repository 模式 - 按实体分离数据访问
│ ├── index.ts # Repository 导出
│ ├── accounts.ts # AccountRepository - 账户 CRUD
│ ├── profiles.ts # ProfileRepository - 用户资料
│ ├── operations.ts # OperationRepository - 操作日志
│ ├── published.ts # PublishedRepository - 发布记录
│ ├── interactions.ts # InteractionRepository - 互动记录
│ ├── downloads.ts # DownloadRepository - 下载记录
│ ├── config.ts # ConfigRepository - 配置键值对
│ ├── my-notes.ts # MyNotesRepository - 我的已发布笔记缓存
│ └── explore.ts # ExploreRepository - 探索会话和日志
├── tools/
│ ├── account.ts # xhs_list_accounts, xhs_add_account, xhs_check_login_session, xhs_remove_account, xhs_set_account_config, xhs_get/set_account_prompt
│ ├── auth.ts # xhs_check_auth_status (+account parameter, syncs profile)
│ ├── content.ts # xhs_search, xhs_get_note, xhs_user_profile, xhs_list_feeds (+account parameter)
│ ├── publish.ts # xhs_publish_content, xhs_publish_video (+account/accounts parameter)
│ ├── interaction.ts # xhs_like_feed, xhs_favorite_feed, xhs_post_comment, xhs_reply_comment, xhs_like_comment, xhs_delete_cookies (+account/accounts)
│ ├── stats.ts # xhs_get_account_stats, xhs_get_operation_logs
│ ├── download.ts # xhs_download_images, xhs_download_video
│ ├── draft.ts # xhs_create_draft, xhs_list_drafts, xhs_publish_draft, etc.
│ ├── creator.ts # xhs_get_my_notes, xhs_query_my_notes
│ ├── notification.ts # xhs_get_notifications
│ └── explore.ts # xhs_explore (自动浏览)
└── xhs/
├── index.ts # XhsClient facade class (supports account options)
├── types.ts # TypeScript interfaces
├── clients/
│ ├── browser.ts # BrowserClient - Facade 组合所有服务
│ ├── context.ts # BrowserContextManager - 共享浏览器上下文
│ ├── constants.ts # 常量定义 (TIMEOUTS, DELAYS, SCROLL_CONFIG)
│ └── services/ # 组合模式 - 按功能分离服务
│ ├── index.ts # 服务导出
│ ├── auth.ts # AuthService - 登录认证
│ ├── search.ts # SearchService - 搜索功能
│ ├── content.ts # ContentService - 内容获取
│ ├── publish.ts # PublishService - 发布功能
│ ├── interact.ts # InteractService - 互动功能
│ ├── creator.ts # CreatorService - 创作者中心
│ ├── notification.ts # NotificationService - 通知获取
│ └── explore.ts # ExploreService - 自动浏览
└── utils/
├── index.ts # Utilities (sleep, humanScroll, generateWebId)
└── stealth.js # Browser automation script
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.
- 10d ago First seen · 372 lines · 4,400 tokens per session scan A b2525c03dee4
xhs-mcp CLAUDE.md is an instructions file published in the GitHub repository ShunL12324/xhs-mcp (46 stars, last pushed 6mo ago), licensed MIT. It adds 4,400 tokens to every session, about $0.0220 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.
Other instructions, from other repositories
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.
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.
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).
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.
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).
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.