Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/wangqiqi/cursor-ai-rulesnpx agentmods add rules/wangqiqi/cursor-ai-rules/react-dependenciesWrote 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/rules/wangqiqi/cursor-ai-rules/react-dependencies)<a href="https://agentmods.dev/rules/wangqiqi/cursor-ai-rules/react-dependencies"><img src="https://agentmods.dev/badge/rules/wangqiqi/cursor-ai-rules/react-dependencies/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/rules/wangqiqi/cursor-ai-rules/react-dependencies"><img src="https://agentmods.dev/badge/rules/wangqiqi/cursor-ai-rules/react-dependencies.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.00000 | $0.02377 |
| Opus 5.5 | $0.00000 | $0.00951 |
| Sonnet 5.5 | $0.00000 | $0.00475 |
| Haiku 4.5 | $0.00000 | $0.00238 |
Grade A, and why
react-dependencies 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 1mo 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 — 350 lines — stays where its author put it; the contents beside it link to each section on GitHub.
📦 React 依赖管理和测试
⚠️ 执行原则
MUST 遵循以下React依赖管理准则:
- MUST 定期更新依赖以获取安全修复
- NEVER 使用未经审查的第三方包
- ALWAYS 锁定依赖版本
- DO NOT 忽略已知的安全漏洞
- MUST 编写全面的测试
- ALWAYS 监控包大小和性能
🛠️ 依赖管理
package.json 配置
{
"name": "react-app",
"version": "1.0.0",
"private": true,
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.8.0",
"@tanstack/react-query": "^4.24.0",
"axios": "^1.3.0",
"zustand": "^4.3.0",
"styled-components": "^5.3.0",
"react-hook-form": "^7.43.0",
"react-hot-toast": "^2.4.0"
},
"devDependencies": {
"@testing-library/react": "^13.4.0",
"@testing-library/jest-dom": "^5.16.0",
"@testing-library/user-event": "^14.4.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@vitejs/plugin-react": "^3.1.0",
"vite": "^4.1.0",
"eslint": "^8.35.0",
"eslint-plugin-react": "^7.32.0",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.0",
"husky": "^8.0.0",
"lint-staged": "^13.1.0"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"lint": "eslint src --ext .js,.jsx,.ts,.tsx",
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
"format": "prettier --write src/**/*.{js,jsx,ts,tsx,json,css,md}",
"prepare": "husky install"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Vite 配置
// vite.config.js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': '/src',
'@components': '/src/components',
'@hooks': '/src/hooks',
'@utils': '/src/utils',
'@styles': '/src/styles'
}
},
server: {
port: 3000,
proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true
}
}
},
build: {
outDir: 'dist',
sourcemap: true,
rollupOptions: {
output: {
manualChunks: {
vendor: ['react', 'react-dom'],
router: ['react-router-dom'],
ui: ['styled-components']
}
}
}
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.js']
}
})
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.
- 1mo ago First seen · 350 lines · 0 tokens per session scan A f2e137dbdcda
react-dependencies is a cursor rule published in the GitHub repository wangqiqi/cursor-ai-rules (17 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,377 tokens. 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 cursor rules, from other repositories
upgrade-tests
// ✅ CORRECT: Upgrade package pattern await using ctx = testReactResource(appRouter, { server: { // server configuration }, client(opts) { return { links: [ httpLink({ url: opts.httpUrl, // client configuration }), ], }; }, }).
react-query-tests
// ✅ CORRECT: Legacy React Query pattern const ctx = konn() .beforeEach(() => createAppRouter()) .afterEach((ctx) => ctx?.close?.()) .done().
tanstack-react-query-tests
// ✅ CORRECT: Use await using for automatic cleanup await using ctx = testReactResource(appRouter, { server: { // server configuration }, client(opts) { return { links: [ httpLink({ url: opts.httpUrl, // client configuration }), ], }; }, }).
issue-harvester
Maintain exhaustive Slate/Plate issue-closure ledgers from current issue, PR, test and local proof evidence.
verify
Verify Plate packages, browser editor behavior, CLI artifacts, collaboration and tests at their actual owners. Load before selecting, changing or waiving proof, writing tests or claiming a fix works.
benchmark
Measure, review or repair Plate performance with honest cohorts, baseline identity, correctness guards and causal proof. Load before choosing, running or waiving a scale or latency gate.