awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.
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/sanjeed5/awesome-cursor-rules-mdc/actix-webgit clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdcWrote 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/sanjeed5/awesome-cursor-rules-mdc/actix-web)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/actix-web"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/actix-web.svg" alt="Measured on agentmods" 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.02789 | $0.02789 |
| Opus 5 | $0.01394 | $0.01394 |
| Sonnet 5 | $0.00558 | $0.00558 |
| Haiku 4.5 | $0.00279 | $0.00279 |
Grade A, and why
actix-web 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 6d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- instructions — 100% identical, 1 lines differ
How it starts
The opening of the file, as written. The whole thing — 346 lines — stays where its author put it; the contents beside it link to each section on GitHub.
actix-web Best Practices
Actix-web 4 is the premier choice for high-performance Rust web services. Adhere to these guidelines for clean, scalable, and production-ready code. Always run cargo fmt and cargo clippy before committing.
1. Code Organization & Structure
Organize your codebase by feature or domain, not by generic file types. This improves discoverability and maintainability.
✅ GOOD: Modular by Feature
// src/main.rs
mod db; // Database access logic
mod routes; // HTTP route handlers, grouped by resource
mod services; // Business logic layer
mod models; // Data structures (e.g., database models, DTOs)
use actix_web::{web, App, HttpServer};
#[actix_web::main]
async fn main() -> std::io::Result<()> {
// Initialize logging early
env_logger::init_from_env(env_logger::Env::default().default_filter_or("info"));
let db_pool = db::init_pool().await
.expect("Failed to create DB pool");
HttpServer::new(move || {
App::new()
.app_data(web::Data::new(db_pool.clone())) // Inject shared DB pool
.service(
web::scope("/api/v1") // API versioning and grouping
.configure(routes::users::config) // User-related routes
.configure(routes::products::config) // Product-related routes
)
// Add global middleware here (e.g., Logger, Compress)
.wrap(actix_web::middleware::Logger::default())
})
.bind(("127.0.0.1", 8080))?
.run()
.await
}
// src/routes/users.rs
use actix_web::{web, HttpResponse, Responder};
use crate::db::PgPool; // Assuming PgPool is public in db module
use crate::services::users as user_service; // Business logic layer
pub fn config(cfg: &mut web::ServiceConfig) {
cfg.service(web::resource("/users").route(web::get().to(get_all_users)));
cfg.service(web::resource("/users/{id}").route(web::get().to(get_user_by_id)));
}
async fn get_all_users(pool: web::Data<PgPool>) -> impl Responder {
match user_service::find_all_users(&pool).await {
Ok(users) => HttpResponse::Ok().json(users),
Err(e) => {
log::error!("Failed to fetch users: {:?}", e);
HttpResponse::InternalServerError().finish()
},
}
}
// src/services/users.rs
use crate::db::PgPool;
use crate::models::User; // Assuming User model
pub async fn find_all_users(pool: &PgPool) -> Result<Vec<User>, sqlx::Error> {
sqlx::query_as::<_, User>("SELECT id, name, email FROM users")
.fetch_all(pool)
.await
}
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.
- 6d ago First seen · 346 lines · 0 tokens per session scan A 7d16c0a617d2
actix-web is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 2,789 tokens to every session, about $0.0139 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-30.
Other cursor rules, from other repositories
core
Core STT/TTS abstraction layer documentation.
rust-module-refactor
Use when splitting Rust modules, moving tests, tightening visibility, or preserving facades during refactors.
rust-architect
PoolAI — Rust Architect workflow: runtime stack, MSYS2, target/ disk, pre-push checks, docs sync.
table-of-contents-standard
Standard section ordering and TOC format for Verus source files.
arc-deref-pattern
When implementing parallel (Mt) algorithms in Verus, do NOT assume.
wrap-vs-specify
When to use externaltypespecification vs wrapper struct for Verus specs.