cursorrules

A set of project rules for the Treza SDK and its React package. The project is a monorepo, meaning one repository contains multiple related packages managed together.

In plain words
What is it for?
Use it when developing, testing, building, or publishing the Treza SDK and React package.
Why use it?
It gives the coding agent the package layout, build and test commands, publishing steps, and known issues so changes follow the project's conventions.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/treza-labs/treza-sdk/cursorrules
Clone the repo
git clone --depth 1 https://github.com/treza-labs/treza-sdk

Made for: Cursor.

Per session 341 This file is loaded in full into every session.
When invoked 341 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00341 $0.00341
Opus 5 $0.00170 $0.00170
Sonnet 5 $0.00068 $0.00068
Haiku 4.5 $0.00034 $0.00034

Measured 2d ago against content hash 2a8fa7540d3b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 43 lines

What it actually says

TREZA SDK Cursor Configuration

Inherits from root workspace rules at ../.cursorrules

Package-Specific Information

  • Package: @treza/sdk and @treza/react
  • Current Version: 0.1.1
  • Build: npm run build
  • Test: npm test
  • Publish: npm publish --otp=CODE (requires 2FA)

Key Files

  • packages/core/src/compliance/zkverify-bridge.ts - Main zkVerify integration
  • packages/react/src/components/ - React components
  • packages/react/src/hooks/ - React hooks
  • README.md - Main documentation

SDK Architecture

  • Monorepo structure with npm workspaces
  • Core SDK: Zero-dependency compliance SDK
  • React package: UI components and hooks
  • Build: Rollup for both CJS and ESM outputs

Publishing Checklist

  1. Bump version in both packages/*/package.json
  2. Update @treza/react dependency to match @treza/sdk version
  3. Test build: npm run build
  4. Commit version bump
  5. Push to GitHub
  6. Publish core: cd packages/core && npm publish --otp=CODE
  7. Publish react: cd packages/react && npm publish --otp=CODE

Common Issues

  • ethers.js v6: No utils namespace (use ethers.keccak256 directly)
  • TypeScript strict: Use error type guards for catch blocks
  • Build errors: May need newer Node version (use nvm use 18)

Testing Strategy

  • Unit tests for core functionality
  • Integration tests with mock zkVerify
  • React component tests with @testing-library
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. 2d ago First seen · 43 lines · 341 tokens per session scan A 2a8fa7540d3b

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository treza-labs/treza-sdk (10 stars, last pushed 2mo ago), licensed MIT. It adds 341 tokens to every session, about $0.0017 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-31.