project-structure

project-structure is a cursor rule for Cursor from Algovate/xhs-mcp. It costs 640 tokens per session, scanned A, original, MIT.

A project-structure guide for the XHS MCP TypeScript automation tool. XHS refers to XiaoHongShu, a social platform, and the guide describes where the command line, server, business logic, types, and configuration belong.

In plain words
What is it for?
Use it when adding or reviewing CLI commands, MCP or HTTP server code, authentication, browser and feed operations, publishing features, shared types, errors, and configuration.
Why use it?
It gives contributors predictable places for different kinds of code. This makes the project easier to navigate and helps keep related responsibilities separated.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/algovate/xhs-mcp/project-structure
Clone the repo
git clone --depth 1 https://github.com/Algovate/xhs-mcp

Made for: Cursor.

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 project-structure

README.md
[![agentmods](https://agentmods.dev/badge/rules/algovate/xhs-mcp/project-structure.svg)](https://agentmods.dev/rules/algovate/xhs-mcp/project-structure)
Your own site
<a href="https://agentmods.dev/rules/algovate/xhs-mcp/project-structure"><img src="https://agentmods.dev/badge/rules/algovate/xhs-mcp/project-structure.svg" alt="Measured on agentmods" height="20"></a>
Per session 640 This file is loaded in full into every session.
When invoked 640 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00640 $0.00640
Opus 5 $0.00320 $0.00320
Sonnet 5 $0.00128 $0.00128
Haiku 4.5 $0.00064 $0.00064

Measured 3d ago against content hash 8d5dae335d8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

project-structure 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 3d 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.

.cursor/rules/project-structure.mdc · 49 lines

What it actually says

XHS MCP Project Structure Guide

Core Architecture

This is a TypeScript-based XiaoHongShu (XHS) automation tool with MCP (Model Context Protocol) server capabilities.

Main Entry Points

Service Layer Architecture

Shared Infrastructure

Server Layer

Build Configuration

Output Artifacts

Key Patterns

  1. Service Inheritance: All services extend BaseService
  2. Error Hierarchy: Custom errors extend XHSError with specific error types
  3. Configuration-Driven: Services receive config via constructor
  4. Browser Automation: Centralized browser management via BrowserManager
  5. MCP Protocol: Standard MCP server implementation with tool and resource handlers
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. 3d ago First seen · 49 lines · 640 tokens per session scan A 8d5dae335d8b

Subscribe to this mod's changes

project-structure is a cursor rule published in the GitHub repository Algovate/xhs-mcp (54 stars, last pushed 3mo ago), licensed MIT. It adds 640 tokens to every session, about $0.0032 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.