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/solidity)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/solidity"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/solidity.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.02142 | $0.02142 |
| Opus 5 | $0.01071 | $0.01071 |
| Sonnet 5 | $0.00428 | $0.00428 |
| Haiku 4.5 | $0.00214 | $0.00214 |
Grade A, and why
solidity 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 3d 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 — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Solidity Best Practices
This guide outlines the definitive best practices for writing Solidity smart contracts, ensuring security, readability, and efficiency. Adhere to these rules for all new and refactored code.
1. Code Organization & Structure
1.1 File Header
Every Solidity file MUST start with an SPDX license identifier and a precise pragma statement. Pin to a specific, audited compiler version.
❌ BAD
pragma solidity ^0.8.0; // Vague pragma, allows minor version bumps
// No license
contract MyContract {}
✅ GOOD
// SPDX-License-Identifier: MIT
pragma solidity 0.8.29; // Pin to specific, audited compiler version
contract MyContract {}
1.2 Indentation & Whitespace
Use 4 spaces for indentation. Never use tabs. Maintain consistent spacing around operators and within control structures.
❌ BAD
function myFunction (uint256 _value) public {
if(_value > 0){ emit Event(_value);}
}
✅ GOOD
function myFunction(uint256 _value) public {
if (_value > 0) {
emit Event(_value);
}
}
1.3 Blank Lines
Use two blank lines between top-level declarations (contracts, interfaces, libraries). Use one blank line between function declarations within a contract.
❌ BAD
contract A {}
contract B {}
contract C {
function foo() public {}
function bar() public {}
}
✅ GOOD
contract A {}
contract B {}
contract C {
function foo() public {}
function bar() public {}
}
1.4 Maximum Line Length
Keep lines under 120 characters. Wrap long lines with a single indent for arguments, placing the closing parenthesis/semicolon on its own line.
❌ BAD
function reallyLongFunctionName(address _arg1, uint256 _arg2, bytes32 _arg3, bool _arg4, string memory _arg5) public pure returns (bool) { return true; }
✅ GOOD
function reallyLongFunctionName(
address _arg1,
uint256 _arg2,
bytes32 _arg3,
bool _arg4,
string memory _arg5
)
public
pure
returns (bool)
{
return true;
}
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.
- 3d ago First seen · 309 lines · 2,142 tokens per session scan A ae279d747770
solidity 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,142 tokens to every session, about $0.0107 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-09-03.
Other cursor rules, from other repositories
solana-integration-constraints
Constraints and requirements for Solana integration with MetaMask Connect — wallet adapter config, CAIP-2 IDs, network support per platform, RPC routing, and platform limitations.
zama-protocol-zama-solidity--setups-foundry
Detailed reference for foundry (zama-solidity skill).
cardano-mcp
These rules complement our main development collaboration rules, focusing specifically on the Model Context Protocol (MCP) server project with TypeScript. This project serves as a specialized RAG (Retrieval-Augmented Generation) gateway to existing Cardano resources, documentation, and tools to assist with dApp…
elizaos_v2_onchain_plugins
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ Wallet Provider│ │ Connection Mgmt │ │ Transaction Svc │ │ - Private Keys │───▶│ - RPC Endpoints │───▶│ - Tx Construction│ │ - Public Keys │ │ - Network Config │ │ - Fee Estimation│ │ - Signatures │ │ - Health Check │ │ - Broadcasting │ └─────────────────┘…
solana_core_architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ Entry Point │ │ Instruction │ │ Account │ │ lib.rs │───▶│ Processing │───▶│ Validation │ │ │ │ │ │ │ │ - entrypoint! │ │ - Route dispatch │ │ - Owner checks │ │ - processinst │ │ - Deserialize │ │ - Data validate │.
stacks-development
Guidelines for Stacks blockchain development.