xfuel-protocol: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from XFuel-Lab/xfuel-protocol. It costs 889 tokens per session, scanned A, original, Apache-2.0.

A set of Cursor rules for the XFuel Protocol, a blockchain project whose smart contracts are written in Solidity. The rules cover contract versions, architecture, security patterns, gas use, and testing.

In plain words
What is it for?
Writing or reviewing XFuel Solidity contracts, choosing project architecture, optimizing transaction costs, and running local Hardhat tests.
Why use it?
It keeps generated and edited code aligned with the project's technical decisions and testing boundaries.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

This is XFuel-Lab/xfuel-protocol's own configuration. It tells Cursor how to work on xfuel-protocol 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 xfuel-protocol configures →

Reuse

Borrowing it

Nothing to install: this file belongs to XFuel-Lab/xfuel-protocol. 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/XFuel-Lab/xfuel-protocol/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/XFuel-Lab/xfuel-protocol

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/xfuel-lab/xfuel-protocol/cursorrules/github.svg)](https://agentmods.dev/rules/xfuel-lab/xfuel-protocol/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/xfuel-lab/xfuel-protocol/cursorrules"><img src="https://agentmods.dev/badge/rules/xfuel-lab/xfuel-protocol/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/xfuel-lab/xfuel-protocol/cursorrules"><img src="https://agentmods.dev/badge/rules/xfuel-lab/xfuel-protocol/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 889 This file is loaded in full into every session.
When invoked 889 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.00889 $0.00889
Opus 5.5 $0.00356 $0.00356
Sonnet 5.5 $0.00178 $0.00178
Haiku 4.5 $0.00089 $0.00089

Measured 2mo ago against content hash 0727eb41288c, 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 · 54 lines

How it starts

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

XFuel Protocol – Cursor Rules

Based on Whitepaper v1.6 core with expansions to v2.4

Solidity

  • Use Solidity ^0.8.22 for all contracts in contracts/core/ and any new audit-scope contracts.
  • Use Solidity ^0.8.20 for all other contracts (contracts/circuits/, contracts/mocks/, contracts/legacy/, contracts/interfaces/).
  • Do NOT use versions below 0.8.20 in any new contract.
  • Follow OpenZeppelin patterns for access control, pausability, and safe transfers.

Architecture

  • Prioritize modularity per whitepaper Section 2: No shared state between circuits, event-driven interfaces.
  • Use SP1 hooks for zkML proofs per Section 7.
  • Money + proof home = Base (USDC/x402, ZKVerifierSP1). Theta EdgeCloud = optional GPU provider only (ADR 0002).

Gas Optimization

  • Target <300K gas per operation, <500K gas end-to-end per Section 3.5.

Code Comments

  • Comment code with whitepaper references (e.g., // Per Section 3.2 for Hyperlane relay).

Hardhat / Testing

  • Use ethers.js v6+ for all RPC interactions.
  • NEVER run npx hardhat test against a live Theta RPC. Tests run against Hardhat local (chain 1337) only.
  • Theta ETH-RPC adaptor does NOT support evm_snapshot, evm_revert, or evm_mine. Waffle fixtures will fail on-chain.
  • When writing Theta-live integration tests, replace revertedWith('custom message') with revertedWith('evm: execution reverted') — Theta always returns the generic message.

Base Networks (money + proof home — ADR 0002)

  • Mainnet: chain ID 8453, RPC https://mainnet.base.org (or Alchemy/Infura)
  • Sepolia: chain ID 84532, RPC https://sepolia.base.org
  • Hardhat networks: base, base-sepolia

Theta ETH-RPC (provider / EdgeCloud ops only — not settlement home)

  • Mainnet: chain ID 361 (0x169), RPC https://eth-rpc-api.thetatoken.org/rpc
  • Testnet: chain ID 365 (0x16d), RPC https://eth-rpc-api-testnet.thetatoken.org/rpc
  • Privatenet: chain ID 366, RPC http://localhost:18888/rpc
  • Subchain Testnet: chain ID 365001; Mainnet: 361001; Privatenet: 360777

Read the full file on GitHub · 54 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 · 54 lines · 889 tokens per session scan A 0727eb41288c

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository XFuel-Lab/xfuel-protocol (1 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 889 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-31.

Related

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesXFuel-Lab/xfuel-protocolCursor rule12mo agoApache-2.0A889Cursor
agoragenticrhein1/agoragentic-integrationsCursor rule4116d agoMITA49Cursor
agoragentic-deployrhein1/agoragentic-integrationsCursor rule4116d agoMITA38Cursor
agoragentic-proverhein1/agoragentic-integrationsCursor rule4116d agoMITA36Cursor
sui-platformmission69b/t2000Cursor rule231mo agoMITA0Cursor
x402-before-you-payseancrecord/scvd-general-store-repoCursor rule33d agoMITA0Cursor
ponytailDietrichGebert/ponytailCursor rule185k8d agoMITA604Cursor