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/pekral/cursor-rules/generalgit clone --depth 1 https://github.com/pekral/cursor-rulesWhat 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.02185 | $0.02185 |
| Opus 5 | $0.01092 | $0.01092 |
| Sonnet 5 | $0.00437 | $0.00437 |
| Haiku 4.5 | $0.00218 | $0.00218 |
Grade A, and why
general 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 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.
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 — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API as a Contract
An API is a contract with its consumers, not a thin wrapper over the database schema. Design every endpoint from the consumer's point of view, then map it onto the internal model — never the other way around. Hold the contract to five pillars:
- Consistency — the same concept is named, shaped, and paginated the same way across every endpoint (field casing, date format, error envelope, pagination shape).
- Predictability — identical inputs produce identical, documented outputs; no hidden side effects, no surprise defaults.
- Discoverability — resources, relationships, and allowed actions are reachable from naming conventions and links, not tribal knowledge.
- Stability — published request/response shapes do not change under consumers; breaking changes go through versioning, never a silent payload edit.
- Security by default — endpoints are authenticated, authorized, validated, and rate-limited unless an explicit, documented reason makes one public.
Do not leak internal database structure across the contract: column names, surrogate keys, join tables, enum integers, and storage-only fields stay behind a DTO / API Resource. The response exposes what the consumer needs, named for the consumer.
Resource-Oriented REST
Endpoints represent resources (nouns), not actions (verbs). The HTTP method carries the action.
- Use
/users,/users/{id},/users/{id}/orders— never/getUser,/createUser,/users/{id}/delete,/doPayment. - Use plural collection nouns; nest sub-resources under their parent (
/users/{id}/orders). - The rare genuine non-CRUD operation that cannot be modeled as a resource state change is the only exception, and it is named as a clearly-scoped sub-resource action (
POST /orders/{id}/refunds), not a verb dangling off the root.
Correct HTTP Methods & Idempotence
Pick the method by its contract, and honor its idempotence guarantee:
- GET — read-only, safe, idempotent, cacheable. Never mutates state, never carries a request body that changes the outcome.
- POST — creates a subordinate resource or triggers a non-idempotent operation. Repeating it may create duplicates (see Idempotency Keys).
- PUT — full replacement of a resource at a known URI; idempotent (repeating yields the same end state).
- PATCH — partial update; should be idempotent for a given payload.
- DELETE — removes the resource; idempotent (a second delete returns the same terminal state, typically
404or204, not a new error).
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.
- yesterday First seen · 97 lines · 2,185 tokens per session scan A 65d4e05145ba
general is a cursor rule published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 7d ago), licensed MIT. It adds 2,185 tokens to every session, about $0.0109 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-31.
Other cursor rules, from other repositories
owl-admin
🎈 Owl Admin : 基于 laravel 和 amis 开发的后台框架, 友好的组件使用体验, 可轻松实现复杂页面, 内置代码生成器, 让开发者快速搭建后台管理系统.
16-wechat-sdk
微信 SDK 接入规范(EasyWeChat / WechatManager).
15-config-center
动态配置中心读取规范(ConfigCenter / configcenter).
lean
Answer densely. Cut filler, keep all technical signal.
00-project
基于 Laravel + Blade + Vue3 + Element Plus 的轻量级后台管理系统.
99-guard
Cursor rule "99-guard" from neoshopcn/neo-admin, covering 🔒 protected directories(禁止修改), ⚠️ conditional(仅在明确要求时允许) and 🚫 dangerous operations(禁止主动执行).