syntax

syntax is a cursor rule for Cursor from thinktidevibes/2D-Survival-Multiplayer-Game. It costs 26,269 tokens per session, scanned C, original, MIT.

A coding reference for SpacetimeDB, a database that also runs application logic and sends changed query results to connected clients. It focuses on Rust server modules and Rust client code for multiplayer applications.

In plain words
What is it for?
Use it when creating SpacetimeDB tables, reducers, subscription queries, or Rust client and server code for real-time multiplayer games.
Why use it?
It explains the project’s database tables, transaction functions, and live subscriptions in one place, reducing uncertainty when building against this system.

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/thinktidevibes/2d-survival-multiplayer-game/syntax
Clone the repo
git clone --depth 1 https://github.com/thinktidevibes/2D-Survival-Multiplayer-Game

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 syntax

README.md
[![agentmods](https://agentmods.dev/badge/rules/thinktidevibes/2d-survival-multiplayer-game/syntax.svg)](https://agentmods.dev/rules/thinktidevibes/2d-survival-multiplayer-game/syntax)
Your own site
<a href="https://agentmods.dev/rules/thinktidevibes/2d-survival-multiplayer-game/syntax"><img src="https://agentmods.dev/badge/rules/thinktidevibes/2d-survival-multiplayer-game/syntax.svg" alt="Measured on agentmods" height="20"></a>
Per session 26,269 This file is loaded in full into every session.
When invoked 26,269 The same file — it is already loaded in full.
Security scan C 2 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.26269 $0.26269
Opus 5 $0.13134 $0.13134
Sonnet 5 $0.05254 $0.05254
Haiku 4.5 $0.02627 $0.02627

Measured 4d ago against content hash 6beb325fdc58, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

syntax scanned grade C with 2 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 4d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -sSf https://install.spacetimedb.com | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sSf https://install.spacetimedb.com | sh
.cursor/rules/syntax.mdc · 2,286 lines

How it starts

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

SpacetimeDB

SpacetimeDB is a fully-featured relational database system that integrates application logic directly within the database, eliminating the need for separate web or game servers. It supports multiple programming languages, including C# and Rust, allowing developers to write and deploy entire applications as a single binary. It is optimized for high-throughput and low latency multiplayer applications like multiplayer games.

Users upload their application logic to run inside SpacetimeDB as a WebAssembly module. There are three main features of SpacetimeDB: tables, reducers, and subscription queries. Tables are relational database tables like you would find in a database like Postgres. Reducers are atomic, transactional, RPC functions that are defined in the WebAssembly module which can be called by clients. Subscription queries are SQL queries which are made over a WebSocket connection which are initially evaluated by SpacetimeDB and then incrementally evaluated sending changes to the query result over the WebSocket.

All data in the tables are stored in memory, but are persisted to the disk via a Write-Ahead Log (WAL) called the Commitlog. All tables are persistent in SpacetimeDB.

SpacetimeDB allows users to code generate type-safe client libraries based on the tables, types, and reducers defined in their module. Subscription queries allows the client SDK to store a partial, live updating, replica of the servers state. This makes reading database state on the client extremely low-latency.

Authentication is implemented in SpacetimeDB using the OpenID Connect protocol. An OpenID Connect token with a valid iss/sub pair constitutes a unique and authenticable SpacetimeDB identity. SpacetimeDB uses the Identity type as an identifier for all such identities. Identity is computed from the iss/sub pair using the following algorithm:

  1. Concatenate the issuer and subject with a pipe symbol (|).
  2. Perform the first BLAKE3 hash on the concatenated string.
  3. Get the first 26 bytes of the hash (let's call this idHash).
  4. Create a 28-byte sequence by concatenating the bytes 0xc2, 0x00, and idHash.
  5. Compute the BLAKE3 hash of the 28-byte sequence from step 4 (let's call this checksumHash).
  6. Construct the final 32-byte Identity by concatenating: the two prefix bytes (0xc2, 0x00), the first 4 bytes of checksumHash, and the 26-byte idHash.
  7. This final 32-byte value is typically represented as a hexadecimal string.
Byte Index: |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  | ... | 31  |
            +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
Contents:   | 0xc2| 0x00| Checksum Hash (4 bytes) |  ID Hash (26 bytes) |
            +-----+-----+-------------------------+---------------------+
                      (First 4 bytes of           (First 26 bytes of
                       BLAKE3(0xc200 || idHash))    BLAKE3(iss|sub))

This allows SpacetimeDB to easily integrate with OIDC authentication providers like FirebaseAuth, Auth0, or SuperTokens.

Clockwork Labs, the developers of SpacetimeDB, offers three products:

  1. SpacetimeDB Standalone: a source available (Business Source License), single node, self-hosted version
  2. SpacetimeDB Maincloud: a hosted, managed-service, serverless cluster
  3. SpacetimeDB Enterprise: a closed-source, clusterized version of SpacetimeDB which can be licensed for on-prem hosting or dedicated hosting

Read the full file on GitHub · 2,286 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. 4d ago First seen · 2,286 lines · 26,269 tokens per session scan C 6beb325fdc58

Subscribe to this mod's changes

syntax is a cursor rule published in the GitHub repository thinktidevibes/2D-Survival-Multiplayer-Game (11 stars, last pushed 1y ago), licensed MIT. It adds 26,269 tokens to every session, about $0.1313 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.