AIRI is a self-hosted virtual AI companion that gives an AI character a voice, visual presence, memory, and the ability to interact with games and coding activity. People use it as a personal digital companion on the web, macOS, or Windows, including for voice chat and gameplay. The catalogue add-ons provide workflows for working with the AIRI project.
Borrowing it
Nothing to install: this file belongs to moeru-ai/airi. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/moeru-ai/airi/main/.agents/skills/enforce-rules-for-typescript/SKILL.mdgit clone --depth 1 https://github.com/moeru-ai/airiWrote 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.
[](https://agentmods.dev/skills/moeru-ai/airi/enforce-rules-for-typescript)<a href="https://agentmods.dev/skills/moeru-ai/airi/enforce-rules-for-typescript"><img src="https://agentmods.dev/badge/skills/moeru-ai/airi/enforce-rules-for-typescript/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.
<a href="https://agentmods.dev/skills/moeru-ai/airi/enforce-rules-for-typescript"><img src="https://agentmods.dev/badge/skills/moeru-ai/airi/enforce-rules-for-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00066 | $0.02803 |
| Opus 5.5 | $0.00026 | $0.01121 |
| Sonnet 5.5 | $0.00013 | $0.00561 |
| Haiku 4.5 | $0.00007 | $0.00280 |
Grade A, and why
enforce-rules-for-typescript 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 23d 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.
How it starts
The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Enforce AIRI TypeScript Rules
Apply these rules to every TypeScript and Vue source change in AIRI. The root AGENTS.md gives the core code rules. This skill gives the detailed rules.
Imports and Types
- Import types from the module or package that owns the contract. Do not redeclare an external or public contract locally to use a narrower subset.
- Do not route type imports through local runtime assembly modules when the original side-effect-free type source is available.
- If Node-only and browser-only types mix in one import chain, move the type declarations into a neutral type file. Keep the runtime modules environment-specific.
- Do not import values from a module that has side effects only to get its types.
- If a wrong or missing export causes an error, trace the full import chain and side-effect chain first. Fix the package exports or the owning boundary. Do not add a local workaround import at the leaf.
- Before you fix an import or type error, examine the compilation behavior and the type declarations. Also examine the
exportsfield inpackage.json, and the browser and Node entry points of the dependency. - Keep JSON Schemas compliant with providers. Give an explicit
type: objectand the required fields. Do not use unbounded records.
Naming
- Let module boundaries provide context. Do not repeat package, product, protocol, or transport names in symbols. The exception is a symbol that crosses a boundary where that context is otherwise lost.
- Name functions after domain operations, not implementation layers.
- Use nouns for resolved domain concepts. Use verbs for transformations and side effects.
- If a symbol needs several ownership qualifiers to be clear, reconsider the module boundary or introduce a clearer domain concept.
Comments
- Write a comment only for information that the code cannot express clearly: intent, constraints, ownership, invariants, precedence, lifecycle, ordering, side effects, protocol shape, or non-obvious fallbacks.
- Do not add comments that only restate names, types, or visible operations.
- Treat a contract comment as an explanation of the relationship between a producer and its consumers.
- Explain why a value exists in the system before you explain how the code represents it.
- Describe the decision, behavior, or invariant that a value controls.
- If different values select different control-flow or UI paths, describe each observable outcome.
- If a value crosses a module or component boundary, identify the consumer and how it applies the value.
- Put representation details after behavior: units, coordinate systems, thresholds, clamps, and source API fields.
- Put background evidence after the contract: browser behavior, issue links, investigation history, and removal conditions.
- If the name, type, and surrounding code express the full contract, omit the comment.
- Put an implementation comment next to the branch, calculation, transition, or side effect that it explains.
- In calculation-heavy code, explain non-obvious coordinate systems, units, conversions, clamps, rounding, aggregation, and precedence. Put each explanation next to the related intermediate value or branch.
- Prefer clearer names, types, and structured state over comments that compensate for hidden or encoded concepts.
- When you move code, keep the accurate comments. Remove the comments that no longer describe current behavior.
- Write an investigation-heavy comment as short paragraphs. When useful, give the context and the observed failure. Then give the reason that the obvious fix is not sufficient. Give the chosen fix and its removal condition or references.
- Use these markers:
// TODO:for follow-up work.// REVIEW:for a concern that needs another opinion.// NOTICE:for workarounds, magic values, external constraints, and other important non-obvious context. The rootAGENTS.mdgives the required format for a workaround.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 23d ago First seen · 155 lines · 66 tokens per session scan A 78337594a3b0
enforce-rules-for-typescript is a skill published in the GitHub repository moeru-ai/airi (50,528 stars, last pushed today), licensed MIT. It adds 66 tokens to every session and 2,803 once invoked, about $0.0003 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-28.
Other skills, from other repositories
nuxtjs-vue-typescript
Best practices for building Nuxt 3 and Vue 3 applications with TypeScript, the Composition API, and Tailwind CSS. Use when structuring Nuxt/Vue projects, writing composables, typing components and props, wiring up server routes and plugins, or optimizing Nuxt builds and Web Vitals.
inertia-rails-typescript
TypeScript type safety for Inertia Rails (React, Vue, Svelte): shared props, flash, and errors via InertiaConfig module augmentation in globals.d.ts. Use when setting up TypeScript types, configuring shared props typing, fixing TS2344 or TS2339 errors in Inertia components, or adding new shared data.
typescript-strict
Use when writing or reviewing TypeScript in Vue, Nuxt, Node, or shared TS utilities, fixing type errors, or deciding how to type API responses and composables.
sveltekit-and-svelte5-runes
Complete architecture patterns, state management with Svelte 5 Runes ($state, $derived, $effect, $props), SvelteKit SSR/streaming pipelines, form actions, and production anti-patterns.
vue-best-practices
MUST be used for Vue.js tasks. Strongly recommends Composition API with and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.
fec-vue3-project-standard
A Vue 3 and TypeScript project standard covering component boundaries, composables, routing, Pinia state, API layers, errors, styles, and project structure. Vue is a frontend framework, and composables are reusable functions for sharing component logic.