把 Cursor 规则、AGENTS.md 和 MCP 配进你的仓库
工程师把 AGENTS.md、.cursor/rules 和 .cursor/mcp.json 复制进自己的仓库,然后再决定订哪档。Skills 路径是 .cursor/skills/*/SKILL.md。这里是 Cursor 路径字面量,不是通用下载站。
不是 Roo / Cline 模版。本站不托管安装包。订哪档去 /compare。
装桌面 IDE 走 /downloads。投下这些文件之后,对照席位去 /compare;个人有货 /channels,团队席位 /wholesale。
AGENTS.md# AGENTS.md
This repository is a TypeScript monorepo. Read this file before editing.
## Layout
- `apps/` — deployable applications. Each app owns its `package.json`, tsconfig, and runtime.
- `packages/` — shared libraries consumed via the workspace protocol already used here.
- Do not add a new top-level code folder when the change belongs in `apps/` or `packages/`.
## Package manager
- Honor the lockfile already in the repo (`pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock`).
- Install with the matching command: `pnpm install` / `npm install` / `yarn`.
- Do not add a new npm package unless the task requires it and no workspace package already covers it.
- Internal dependencies use the same workspace protocol as existing packages (`workspace:*` or `*`).
## TypeScript
- Keep existing `compilerOptions` (strictness, `module`, `paths`). Do not weaken `strict`.
- Shared types live in `packages/`. Do not copy type files between apps.
- Apps import a package's public exports only. Do not reach into another package's `src` internals unless that is already the local convention.
## Changes
- Scope the diff to the app or package named in the request.
- Do not drive-by refactor unrelated files.
- Match local naming, comment style, and test layout.
- After edits, run the nearest `typecheck` / `lint` / unit test for the touched package.
## Secrets
- Never commit API keys, tokens, or `.env` values.
- `.cursor/mcp.json` must not contain secrets; use the process environment instead.
## What this file is
Root agent contract picked up from the repository root. Glob-scoped Cursor rules live in `.cursor/rules/*.mdc`..cursor/rules/monorepo.mdc---
description: TypeScript monorepo — workspace protocol, package boundaries, no extra dependencies
globs: "{apps,packages}/**/*.{ts,tsx,js,jsx,json}"
alwaysApply: false
---
# Monorepo conventions
- Treat `apps/*` as deployable roots and `packages/*` as libraries.
- Do not import one app from another. Share code by extracting a package.
- Put a new dependency in the package that imports it, not the repo root, unless it is a root toolchain (TypeScript, ESLint, the test runner).
- Do not introduce a second package manager or a second lockfile.
- Path aliases (`@/` and similar) stay inside the owning app; do not assume they resolve in other packages.
- Wait for an explicit request before creating a new workspace package.
- Keep generated output (`dist`, `.next`, `coverage`) out of commits.
- If a script needs the repo root, prefer `workspace` tooling over hard-coded absolute paths.