document

A documentation rulebook covering common project documents such as README files, API references, change logs, deployment guides, and user manuals.

In plain words
What is it for?
Use it when creating or organising project documentation, including files under a docs folder and records of releases, architecture, APIs, and deployment.
Why use it?
It gives the team a shared structure for deciding which documentation belongs in the project and where it should be stored.

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/mywand/cusrsor-do-it/document
Clone the repo
git clone --depth 1 https://github.com/mywand/cusrsor-do-it

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 7,071 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 4 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.00000 $0.07071
Opus 5 $0.00000 $0.03535
Sonnet 5 $0.00000 $0.01414
Haiku 4.5 $0.00000 $0.00707

Measured yesterday against content hash a8f985a30a27, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade E, and why

document scanned grade E with 4 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 yesterday.

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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

response = requests.post( 'https://api.example.com/api/v1/users',

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt update && sudo apt upgrade -y

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

| Docker | >= 20.10 | `curl -fsSL https://get.docker.com \| sh` |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://api.example.com/api/v1/users \
.cursor/rules/docs/document.mdc · 1,043 lines

How it starts

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

最近更新: 2025-10-11

文档体系与模板规范

完整的项目文档体系规范,涵盖README、API、CHANGELOG、部署等常用文档类型。

1. 文档体系概览

1.1 文档分类

mindmap
  root((项目文档))
    README
      快速开始
      功能特性
      安装说明
    API文档
      接口定义
      请求响应
      错误码
    开发文档
      架构设计
      编码规范
      开发指南
    运维文档
      部署文档
      监控文档
      故障处理
    用户文档
      使用手册
      FAQ
      最佳实践

1.2 文档优先级

文档类型 优先级 适用项目 更新频率
README.md P0 所有项目 每次重大变更
CHANGELOG.md P0 所有项目 每次发布
API.md P0 有API的项目 接口变更时
架构文档 P1 中大型项目 每季度
部署文档 P1 生产项目 部署方式变更时
用户手册 P2 ToC产品 功能变更时
FAQ P2 所有项目 按需

1.3 文档存放结构

项目根目录/
├── README.md                 # 项目主文档 ✅ 必需
├── CHANGELOG.md             # 变更日志 ✅ 必需
├── CONTRIBUTING.md          # 贡献指南
├── LICENSE                  # 许可证
├── docs/                    # 文档目录
│   ├── architecture/        # 架构文档
│   │   ├── README.md       # 架构文档索引
│   │   ├── architecture.md # 架构设计
│   │   └── adr/            # 架构决策记录
│   ├── api/                # API文档
│   │   ├── README.md
│   │   ├── user-api.md
│   │   └── order-api.md
│   ├── guides/             # 指南文档
│   │   ├── development.md  # 开发指南
│   │   ├── deployment.md   # 部署指南
│   │   └── contributing.md # 贡献指南
│   ├── user/               # 用户文档
│   │   ├── user-manual.md  # 用户手册
│   │   └── faq.md          # 常见问题
│   └── images/             # 文档图片
└── scripts/                # 脚本文件

2. README.md 规范

2.1 标准结构

# 项目名称

<项目LOGO或Banner图片>

<项目简介:一句话说明项目是什么>

[![Build Status](徽章链接)](链接)
[![Coverage](徽章链接)](链接)
[![License](徽章链接)](链接)

## ✨ 特性

- ✅ 核心特性1
- ✅ 核心特性2
- ✅ 核心特性3
- 🚧 开发中特性4

## 📦 快速开始

### 环境要求

- Node.js >= 16.0.0
- Python >= 3.8
- Docker >= 20.10

### 安装

```bash
# 克隆项目
git clone https://github.com/username/project.git

# 安装依赖
npm install  # 或 pip install -r requirements.txt

# 配置环境变量
cp .env.example .env

运行

# 开发模式
npm run dev

# 生产模式
npm run build
npm start

📖 文档

🛠️ 技术栈

  • 前端: Vue 3 + TypeScript + Vite
  • 后端: Spring Boot + MySQL + Redis
  • 部署: Docker + Kubernetes

📁 项目结构

project/
├── src/              # 源代码
│   ├── api/          # API接口
│   ├── components/   # 组件
│   ├── services/     # 业务逻辑
│   └── utils/        # 工具函数
├── tests/            # 测试文件
├── docs/             # 文档
└── scripts/          # 脚本

🤝 贡献

欢迎贡献!请查看 贡献指南

📄 许可证

MIT License

👥 维护者

🙏 致谢

感谢所有贡献者!

Read the full file on GitHub · 1,043 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. yesterday First seen · 1,043 lines · 0 tokens per session scan E a8f985a30a27

Subscribe to this mod's changes

document is a cursor rule published in the GitHub repository mywand/cusrsor-do-it (2 stars, last pushed 7mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 7,071 tokens. A static security scan graded it E with 4 findings (sends data to an external url, asks for root, downloads and executes remote code). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.