uts

UTS, or Uni Type Script, is a cross-platform, high-performance, strongly-typed modern programming language.

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/dcloudio/uni-ai-x/uts
Clone the repo
git clone --depth 1 https://github.com/dcloudio/uni-ai-x

Made for: Cursor.

Per session 807 This file is loaded in full into every session.
When invoked 807 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00807 $0.00807
Opus 5 $0.00404 $0.00404
Sonnet 5 $0.00161 $0.00161
Haiku 4.5 $0.00081 $0.00081

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

Security

Grade A, and why

uts 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 today.

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.

.cursor/rules/uts.mdc · 51 lines

How it starts

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

Core

The code running environment is customized ts, and the type requirements are strictly similar to Kotlin. Any is not allowed for types. You cannot use dynamic objects. Only Map. All types must be explicitly declared, and implicit type conversions are not allowed. Don't write types directly in the code, define them at the top and then use them. Types are not allowed to be too deep, so write a separate one to refer to them. When determining if, the value inside must be of type boolean, and no other type should be used. For example: If the value of aNull is null, it is wrong to write if (aNull), and must be written as if (aNull != null)。 Optional properties must use?. Use non-null assertion!,? Can be regarded as an empty decision. Do not use === and!==, Only == and!=

Type System Specifications

  • Force explicit declaration of variable/function types (except for simple literals), giving preference to using interfaces to define complex data structures. Union types need to explicitly declare null (such as string| null), prohibiting the use of any type. Support secure chain calls (?.) Handle optional values.
  • Static typing: UTS emphasizes static typing, requiring all variables and function parameters to have clear type declarations, avoiding the use of any type.
  • Type system: UTS does not support a structured type system, but adopts a nominal type system, emphasizing type names and inheritance relationships to ensure type safety.
  • Core language features: UTS does not support undefined, variable promotion, var keywords, etc., and requires conditional statements to use boolean types.
  • Type system dependent: UTS does not support conditional types, mapping types, utility types, as const assertions, etc.
  • Classes and objects are related: UTS does not support private fields starting with #, dynamic field access, static blocks, using classes as objects, etc.
  • Function dependence: UTS does not support types with call signatures and construct signatures, constructor types, function declarations used as values, etc.
  • Modules and namespaces: UTS does not support namespaces, require and import assignment expressions, export =... grammar, etc.
  • Type checking and conversion: UTS does not support the is operator and requires the use of instanceof and as for type protection.
  • Special language features: UTS does not support Symbol(), index signature, declaration merge, generator functions, JSX expressions, with statements, globalThis, etc.
  • Operators and expressions: UTS limits the use of unary operators and prohibits the use of delete and comma operators.
  • Prototypes and object manipulation: UTS does not support assigning values on prototypes.
  • Adaptation suggestions:
  • Use TypeScript type annotations to clarify type information.
  • Use classes and interfaces to define type structures.
  • Use instanceof and as for type protection.
  • Use static initializations or constructors to implement the functionality of static blocks.
  • Use modules to organize code.

Read the full file on GitHub · 51 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. today First seen · 51 lines · 807 tokens per session scan A 551fd2362b41

Subscribe to this mod's changes

uts is a cursor rule published in the GitHub repository dcloudio/uni-ai-x (85 stars, last pushed today), licensed Apache-2.0. It adds 807 tokens to every session, about $0.0040 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-09-01.