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.
git 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/smolagents)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/smolagents"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/smolagents.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.00367 | $0.00367 |
| Opus 5 | $0.00183 | $0.00183 |
| Sonnet 5 | $0.00073 | $0.00073 |
| Haiku 4.5 | $0.00037 | $0.00037 |
Grade A, and why
smolagents scanned grade A 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 4d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
response = requests.get(f"https://api.example.com/search?q What it actually says
smolagents Best Practices
This guide outlines the definitive best practices for developing smolagents applications. Adhering to these principles ensures your agents are reliable, efficient, and easy to maintain.
1. Code Organization and Structure
Organize your agent logic and tools into clear, distinct modules. This improves readability, reusability, and testability.
❌ BAD: Monolithic agent file
# agent.py
from smolagents import CodeAgent, HfApiModel, tool
import requests # Direct import in agent file
@tool
def search_web(query: str) -> str:
# ... complex search logic ...
return "search result"
@tool
def calculate_math(expression: str) -> float:
# ... math logic ...
return eval(expression) # DANGER! Unsafe!
agent = CodeAgent(tools=[search_web, calculate_math], model=HfApiModel())
agent.run("What is 2+2 and also search for 'latest AI news'")
✅ GOOD: Modular structure
# src/tools.py
from smolagents import tool
import requests
import json
@tool
def web_search(query: str) -> str:
"""
Performs a web search for the given query.
Args:
query: The search term.
Returns:
A summary of the search results or an error message.
"""
try:
# Replace with a real search API (e.g., DuckDuckGoSearchTool, custom API)
response = requests.get(f"https://api.example.com/search?q
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.
- 4d ago First seen · 51 lines · 367 tokens per session scan A 3b76b6e6f142
smolagents 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 367 tokens to every session, about $0.0018 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
baml
A set of rules for setting up BAML and help with syntax guidance.
co-dialectic
Co-Dialectic prompt sharpening and verification rules for Cursor.
prompt-routing
Route tasks to the correct Universal AI Engineering Prompt.
prompting-for-qe
Soạn/tinh chỉnh prompt cho tác vụ QE (sinh test case, phân tích requirement, tóm tắt tài liệu test, phân tích log) — đặc biệt khi output AI lan man, chung chung, bịa, hoặc muốn chốt prompt thành template tái dùng.
llm-zod-jsonschema
Best Practice for LLM Output Parsing with Zod and JSON Schema.
prompt-evals
Prompt eval fixtures — case design, assertions, versioning, CI gates, no PII in golden data.