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/boto3git 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/boto3)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/boto3"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/boto3.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.03011 | $0.03011 |
| Opus 5 | $0.01505 | $0.01505 |
| Sonnet 5 | $0.00602 | $0.00602 |
| Haiku 4.5 | $0.00301 | $0.00301 |
Grade A, and why
boto3 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.
How it starts
The opening of the file, as written. The whole thing — 379 lines — stays where its author put it; the contents beside it link to each section on GitHub.
boto3 Best Practices
Boto3 is the definitive Python SDK for AWS. Mastering it means writing code that is performant, maintainable, and resilient. This guide outlines the essential patterns and anti-patterns for modern boto3 development.
1. Client/Resource Management & Reuse
Never instantiate boto3 clients or resources inside performance-critical loops or frequently called functions. Reusing client objects reduces credential churn, improves connection pooling, and significantly boosts performance.
✅ GOOD: Module-level or Dependency Injected Clients
Instantiate clients/resources once per module or inject them via a wrapper class.
# my_aws_service.py
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_s3.client import S3Client
from mypy_boto3_s3.service_resource import S3ServiceResource
# Module-level client/resource for simple cases
S3_CLIENT: S3Client = boto3.client("s3", region_name="us-east-1")
S3_RESOURCE: S3ServiceResource = boto3.resource("s3", region_name="us-east-1")
class S3Manager:
"""Manages S3 operations with a reusable client."""
def __init__(self, s3_client: S3Client = S3_CLIENT):
self._s3_client = s3_client
def list_my_buckets(self) -> list[str]:
response = self._s3_client.list_buckets()
return [b["Name"] for b in response.get("Buckets", [])]
# In another part of your application:
manager = S3Manager()
buckets = manager.list_my_buckets()
❌ BAD: Repeated Client Instantiation
Avoid creating new clients/resources for every operation.
# my_aws_service_bad.py
import boto3
def get_bucket_names_bad() -> list[str]:
# This creates a new client every time the function is called
s3_client = boto3.client("s3", region_name="us-east-1")
response = s3_client.list_buckets()
return [b["Name"] for b in response.get("Buckets", [])]
# This is inefficient if called frequently
for _ in range(100):
get_bucket_names_bad()
2. Choose Clients vs. Resources Wisely
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 · 379 lines · 0 tokens per session scan A 03c861b48c84
boto3 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 3,011 tokens to every session, about $0.0151 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
python_tests
We use the unit tests to cover internal behavior that can work without the web / backend counterpart. We aim for 95%+ unit test coverage of our Python code in lib/streamlit.
python-llm-ml-workflow-cursorrules-prompt-file
Cursor rules for Python LLM & ML development with workflow integration.
python
Python best practices and patterns for modern software development with Flask and SQLite.
python-containerization-cursorrules-prompt-file
Cursor rules for Python development with containerization integration.
python-django-general
通用的 Python 和 Django 规则,专注于编码风格、错误处理和整个项目的 Django 约定。.
python-general-coding-standards
应用一般 Python 编码标准,包括类型提示、使用 Pydantic 进行输入验证、后台任务、CORS 处理、安全工具、PEP 8 合规性和全面测试。.