001-base

Coding rules for a 3D game built with React Three Fiber and Koota ECS. ECS, or entity-component-system, is a way to organise game logic separately from the code that draws the scene.

In plain words
What is it for?
Use them when adding game logic or React rendering, searching the source tree, creating systems, checking object setup, or following exact output requirements.
Why use it?
They keep game behavior separate from visual React components and require agents to inspect existing code before adding similar systems.

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/instructa/viber3d/001-base
Clone the repo
git clone --depth 1 https://github.com/instructa/viber3d

Made for: Cursor.

Per session 1,020 This file is loaded in full into every session.
When invoked 1,020 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.01020 $0.01020
Opus 5 $0.00510 $0.00510
Sonnet 5 $0.00204 $0.00204
Haiku 4.5 $0.00102 $0.00102

Measured yesterday against content hash 860c18a63569, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

001-base 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 yesterday.

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.

templates/starter-next/.cursor/rules/001-base.mdc · 80 lines

How it starts

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

R3F + Koota ECS Base Rules

Core Architecture

  • Use Koota ECS for all game logic.
  • Keep React components purely presentational.
  • Do not mix ECS logic and React rendering.

Instructions

  1. Always use codebase_search with target_directories="src" first to find existing core files
  2. Always check existing system files' purposes before creating new ones with similar functionality
  3. Always check how core objects (World, Entity, etc.) are instantiated in the existing codebase
  4. Always list the cursor rules you're using
  • If a prompt or request specifies certain behaviors, languages, or output formats, you must obey them without deviation.
  • Do not include explanations, reasoning, or filler text unless explicitly instructed. Stick strictly to the requested output.
  • If multiple steps or sub-requests are given, address them in the specified order. Provide answers in the exact format or sequence requested.
  • Pay close attention to all stated constraints (e.g., language choice, performance goals, coding style). Do not ignore any requirement or best practice stated.
  • Only produce output relevant to the question or instructions. Do not add features, code, or details beyond what is explicitly asked.
  • Deliver the response in a minimal yet complete form. Avoid unnecessary verbosity and tangential remarks.
  • If the prompt requests a specific output format (e.g., a fenced code block, bullet points, JSON), follow that format exactly.
  • If a prompt includes a pre-seeded answer structure (e.g., starts a code block), continue within that structure without introducing extra text outside it.
  • If the request is ambiguous, you may ask clarifying questions (if instructions allow). Otherwise, state briefly that more information is needed.
  • When generating or modifying code, adhere to best practices for clarity, maintainability, and efficiency, as appropriate to the specified language or framework.
  • Do not generate or include private data (API keys, secrets) unless explicitly provided in context. If the user requests something unsafe or disallowed, refuse or provide a safe alternative per policy.

Read the full file on GitHub · 80 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. yesterday First seen · 80 lines · 1,020 tokens per session scan A 860c18a63569

Subscribe to this mod's changes

001-base is a cursor rule published in the GitHub repository instructa/viber3d (623 stars, last pushed 1y ago), licensed MIT. It adds 1,020 tokens to every session, about $0.0051 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-30.