airi: Skill for Codex

.agents/skills/enforce-rules-for-typescript/SKILL.md

enforce-rules-for-typescript is a skill for Codex from moeru-ai/airi. It costs 66 tokens per session (2,803 once invoked), scanned A, original, MIT.

A rulebook for writing and reviewing TypeScript and Vue code in the AIRI monorepo, a repository that contains multiple related packages. It covers imports, types, browser and server boundaries, schemas, and module design.

In plain words
What is it for?
Use it when writing, refactoring, or reviewing TypeScript or Vue source in AIRI, especially when fixing imports or type errors.
Why use it?
It gives changes consistent project rules and helps prevent type, dependency, and package-boundary mistakes.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is moeru-ai/airi's own configuration. It tells Codex how to work on airi itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything airi configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is * collectEvalEntries (../runner).

About the project

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.

moeru-ai/airi · 50,528 stars · on GitHub · airi.moeru.ai

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/moeru-ai/airi/main/.agents/skills/enforce-rules-for-typescript/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/moeru-ai/airi

Made for: Codex.

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 enforce-rules-for-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/moeru-ai/airi/enforce-rules-for-typescript/github.svg)](https://agentmods.dev/skills/moeru-ai/airi/enforce-rules-for-typescript)
Your own site
<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.

agentmods 80×15 button for enforce-rules-for-typescript

Your own site · 80×15
<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>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,803 The whole file, excluding the scripts and references it only reads on demand.
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.00066 $0.02803
Opus 5.5 $0.00026 $0.01121
Sonnet 5.5 $0.00013 $0.00561
Haiku 4.5 $0.00007 $0.00280

Measured 23d ago against content hash 78337594a3b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.agents/skills/enforce-rules-for-typescript/SKILL.md · 155 lines

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 exports field in package.json, and the browser and Node entry points of the dependency.
  • Keep JSON Schemas compliant with providers. Give an explicit type: object and 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 root AGENTS.md gives the required format for a workaround.

Read the full file on GitHub · 155 lines

Files

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.

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. 23d ago First seen · 155 lines · 66 tokens per session scan A 78337594a3b0

Subscribe to this mod's changes

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.

Related

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.

Mindrally/skills · 70 tokens

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.

inertia-rails/skills · 74 tokens

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.

pstuart/pstuart · 39 tokens

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.

hamzabellouch/agent-skills · 53 tokens

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.

onmax/nuxt-skills · 81 tokens

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.

bovinphang/frontend-craft · 114 tokens