ARBuilder: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from Quantum3-Labs/ARBuilder. It costs 896 tokens per session, scanned A, original, MIT.

A set of Cursor coding rules for building Arbitrum Stylus smart contracts in Rust, including required library versions, project settings, storage patterns, and public methods.

In plain words
What is it for?
Use it as a reference when creating Cargo projects, configuring Stylus contracts, defining on-chain storage, and writing their public functions.
Why use it?
It reduces mistakes caused by using incompatible Rust, SDK, or dependency versions when starting or maintaining these contracts.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is Quantum3-Labs/ARBuilder's own configuration. It tells Cursor how to work on ARBuilder itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ARBuilder configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Quantum3-Labs/ARBuilder. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Quantum3-Labs/ARBuilder/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/Quantum3-Labs/ARBuilder

Made for: Cursor.

Wrote 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.

agentmods badge for cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/quantum3-labs/arbuilder/cursorrules/github.svg)](https://agentmods.dev/rules/quantum3-labs/arbuilder/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/quantum3-labs/arbuilder/cursorrules"><img src="https://agentmods.dev/badge/rules/quantum3-labs/arbuilder/cursorrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/quantum3-labs/arbuilder/cursorrules"><img src="https://agentmods.dev/badge/rules/quantum3-labs/arbuilder/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 896 This file is loaded in full into every session.
When invoked 896 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00896 $0.00896
Opus 5.5 $0.00358 $0.00358
Sonnet 5.5 $0.00179 $0.00179
Haiku 4.5 $0.00090 $0.00090

Measured 2mo ago against content hash b3b500f205c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cursorrules 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 2mo 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.

.cursorrules · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ARBuilder Development Rules for Cursor

Stylus SDK Version Information (CRITICAL - ALWAYS USE THESE)

Current stable versions (as of January 2025):

  • stylus-sdk: 0.9.2 (use this for new projects)
  • alloy-primitives: =0.8.20
  • alloy-sol-types: =0.8.20
  • Rust version: 1.81 (1.82+ may have compatibility issues)
  • cargo-stylus CLI: 0.5.x

Cargo.toml Template

[dependencies]
stylus-sdk = "0.9.2"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"

[lib]
crate-type = ["cdylib"]

[profile.release]
codegen-units = 1
strip = true
lto = true
panic = "abort"
opt-level = "s"

Arbitrum SDK Version Information

  • @arbitrum/sdk: ^4.0.0
  • ethers: ^5.7.0 (NOT v6 - SDK requires ethers v5)

Stylus Contract Best Practices

Required Attributes

#![cfg_attr(not(any(feature = "export-abi", test)), no_std)]
#![cfg_attr(not(test), no_main)]
extern crate alloc;

Storage Pattern

use stylus_sdk::prelude::*;
use alloy_primitives::{U256, Address};

sol_storage! {
    #[entrypoint]
    pub struct MyContract {
        uint256 value;
        mapping(address => uint256) balances;
    }
}

Public Methods

#[public]
impl MyContract {
    pub fn get_value(&self) -> U256 {
        self.value.get()
    }

    pub fn set_value(&mut self, new_value: U256) {
        self.value.set(new_value);
    }
}

Key Constraints

  • 24KB size limit (Brotli-compressed WASM)
  • No floating point operations allowed
  • Yearly reactivation required for deployed contracts
  • Use alloc::vec::Vec instead of std::vec::Vec
  • Use alloc::string::String instead of std::string::String

Common Pitfalls to Avoid

  1. Using std library features (use alloc or core instead)
  2. Floating point math (use fixed-point or integer math)
  3. Forgetting #[entrypoint] attribute on main struct
  4. Not handling storage slots correctly in upgrades
  5. Using Rust 1.82+ (stick to 1.81)

Arbitrum Bridging Best Practices

Read the full file on GitHub · 116 lines

Changes

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.

  1. 2mo ago First seen · 116 lines · 896 tokens per session scan A b3b500f205c9

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Quantum3-Labs/ARBuilder (24 stars, last pushed 6mo ago), licensed MIT. It adds 896 tokens to every session, about $0.0036 per session on Opus 5.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.

Related

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesQuantum3-Labs/ARBuilderCursor rule246mo agoMITA896Cursor
rustPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A0Cursor
rust-generalPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A0Cursor
rust-developmentadonai-labs/agent-runwayCursor rule22d agoMITA0Cursor
rustinboxpraveen/Minimize-Cursor-CostCursor rule102mo agoApache-2.0A0Cursor
rustXD3an/awesome-ai-coding-all-in-oneCursor rule1511d agononeA0Cursor
secure-dev-rustmatank001/cursor-security-rulesCursor rule3831y agoMITA0Cursor