uts

uts is a cursor rule for Cursor from dcloudio/uni-ai-x. It costs 807 tokens per session, scanned A, original, Apache-2.0.

A cross-platform programming language with strict static typing, meaning variable and function types must be declared clearly before the code runs.

In plain words
What is it for?
Writing UTS programs with explicit types, interfaces, null checks, and controlled data structures.
Why use it?
It prevents loosely typed values and implicit conversions from hiding mistakes in the code.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Writing UTS programs with explicit types, interfaces, null checks, and controlled data structures.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/dcloudio/uni-ai-x/uts
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.

Clone the repo
git clone --depth 1 https://github.com/dcloudio/uni-ai-x

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 uts

README.md
[![agentmods](https://agentmods.dev/badge/rules/dcloudio/uni-ai-x/uts/github.svg)](https://agentmods.dev/rules/dcloudio/uni-ai-x/uts)
Your own site
<a href="https://agentmods.dev/rules/dcloudio/uni-ai-x/uts"><img src="https://agentmods.dev/badge/rules/dcloudio/uni-ai-x/uts/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 uts

Your own site · 80×15
<a href="https://agentmods.dev/rules/dcloudio/uni-ai-x/uts"><img src="https://agentmods.dev/badge/rules/dcloudio/uni-ai-x/uts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00807 $0.00807
Opus 5.5 $0.00323 $0.00323
Sonnet 5.5 $0.00161 $0.00161
Haiku 4.5 $0.00081 $0.00081

Measured 1mo ago against content hash 551fd2362b41, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

.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. 1mo ago 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 (86 stars, last pushed 2d ago), licensed Apache-2.0. It adds 807 tokens to every session, about $0.0032 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-09-01.