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.
npx agentmods add rules/proyecto26/projectx/web-rulesgit clone --depth 1 https://github.com/proyecto26/projectxWhat 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 | $0.02527 | $0.02527 |
| Opus 5 | $0.01264 | $0.01264 |
| Sonnet 5 | $0.00505 | $0.00505 |
| Haiku 4.5 | $0.00253 | $0.00253 |
Grade C, and why
web-rules scanned grade C with 1 finding 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 2d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf /app/.turbo && \ How it starts
The opening of the file, as written. The whole thing — 352 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Web Application Rules (React Router SSR)
Project Overview
- Framework: React Router v7 (Framework mode) - The next version of RemixJS
- Rendering: Server-Side Rendering (SSR)
- Module System: ESM (not CommonJS)
- Styling: TailwindCSS v4 (imported from
@projectx/uipackage) - Build Tool: Vite
- Port: 3000
Critical: Module System
✅ This app uses ESM
// ✅ CORRECT - ESM imports
import { something } from './module';
export { something };
export default Component;
// ❌ WRONG - CommonJS (don't use in web app)
const something = require('./module');
module.exports = something;
Importing from packages
// ✅ Can import ESM and CommonJS packages
import { User } from '@projectx/models'; // ESM
import { AuthService } from '@projectx/core'; // CommonJS (transpiled)
import { Button } from '@projectx/ui'; // ESM
React Router Framework Mode
This is NOT traditional React Router
- Uses file-based routing (like Remix/Next.js)
- Server-side rendering by default
- Built-in data loading with loaders
- Form handling with actions
- Automatic code splitting
File structure:
apps/web/
├── app/
│ ├── routes/ # File-based routes
│ │ ├── _index.tsx # Home page (/)
│ │ ├── about.tsx # /about
│ │ └── users.$id.tsx # /users/:id (dynamic)
│ ├── root.tsx # Root layout
│ └── entry.client.tsx # Client entry point
│ └── entry.server.tsx # Server entry point
Route conventions:
_index.tsx- Index routeabout.tsx- Static route/aboutusers.$id.tsx- Dynamic route/users/:id_layout.tsx- Layout route (no URL segment)_auth.login.tsx- Pathless layout
Data Loading
Use loaders for server-side data fetching
import { json, type LoaderFunctionArgs } from 'react-router';
export async function loader({ params, request }: LoaderFunctionArgs) {
const user = await fetchUser(params.id);
return json({ user });
}
export default function UserPage() {
const { user } = useLoaderData<typeof loader>();
return <div>{user.name}</div>;
}
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.
- 2d ago First seen · 352 lines · 2,527 tokens per session scan C 46695e54c31f
web-rules is a cursor rule published in the GitHub repository proyecto26/projectx (83 stars, last pushed 4mo ago), licensed MIT. It adds 2,527 tokens to every session, about $0.0126 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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
ai-development
CodeSpirit AI功能开发规范 - AI表单填充、长任务处理、LLM集成.
js
CodeSpirit JavaScript 开发规范 - AMIS集成、模块模式、API请求、Token管理.
controller
CodeSpirit 控制器开发规范 - API控制器特性、路由、响应格式和操作特性.
database
CodeSpirit 数据库与 EF Core 迁移规范 - 多数据库支持、DbContext 设计、迁移命令.
dependency-injection
CodeSpirit 依赖注入规范 - Scrutor自动注册、生命周期管理.
api-design
CodeSpirit API 设计规范 - RESTful、路由、响应格式等.