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-vitest/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-vitest)<a href="https://agentmods.dev/skills/moeru-ai/airi/enforce-rules-for-vitest"><img src="https://agentmods.dev/badge/skills/moeru-ai/airi/enforce-rules-for-vitest/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-vitest"><img src="https://agentmods.dev/badge/skills/moeru-ai/airi/enforce-rules-for-vitest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00074 | $0.00624 |
| Opus 5 | $0.00037 | $0.00312 |
| Sonnet 5 | $0.00015 | $0.00125 |
| Haiku 4.5 | $0.00007 | $0.00062 |
Grade A, and why
enforce-rules-for-vitest 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 11d 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 — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Enforce AIRI Vitest Rules
Apply these rules to every test change in AIRI.
Choose the Test Scope
- Use the Vitest project that owns the affected code and keep runs targeted for speed.
- Grow component and end-to-end coverage progressively. Prefer Vitest browser mode when the behavior depends on DOM or Web Platform APIs.
- Use the smallest automated test that faithfully exercises the behavior: prefer a unit test, then the smallest suitable higher-level test.
Reproduce Bugs Before Fixing Them
- For an investigated bug or issue, try to add a test-only reproduction before changing production code.
- When reproduction is possible, include the tracker identifier in the test case name:
- Use
Issue #<number>for a GitHub issue. - Use the Linear issue key for an internal Linear bug.
- Use
- Put the actual report URL in a comment directly above the regression test. Use the GitHub issue URL, Discord message or thread URL, or Linear issue URL as appropriate.
- Confirm that the reproduction fails for the reported reason before implementing the fix.
Mock Real Boundaries
- Mock Electron IPC and Electron services with
vi.fnorvi.mock; never require a real Electron runtime. - For external providers and services, add mock-based tests and, when feasible, integration-style tests guarded by environment variables, but do not mock Pinia, Vue components. Vitest import mocks are allowed for these boundaries.
- Assert observable behavior, including mock calls and parameters, with explicit
expectstatements. - Prefer one assertion per line so failures remain readable.
Preserve Runtime Integrity
- Do not test impossible runtime states. Avoid assertions against constants that cannot change or object mutations that can only occur inside the same test setup.
- Do not replace
globalThisproperties or built-in modules with directObject.defineProperty(...)mocks. - When behavior depends on a different Node global or built-in state, use
node:worker_threadsto load an isolated worker or build a minimal CLI reproduction. - For DOM and Web Platform APIs, use Vitest browser mode instead of hard-mocking platform internals. Progressively refactor existing direct platform mocks when touched.
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.
- 11d ago First seen · 52 lines · 74 tokens per session scan A 14d8d3ffd20d
enforce-rules-for-vitest is a skill published in the GitHub repository moeru-ai/airi (49,010 stars, last pushed today), licensed MIT. It adds 74 tokens to every session and 624 once invoked, about $0.0004 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.
Other skills, from other repositories
claude_code
This document describes how a Claude Code agent (or any agent using the Claude Code CLI pattern) invokes the Seiðr-Smiðja forge through the Rúnstafr CLI bridge.
research-engineer
An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.
tika-eval-compare
Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".
jetson-validate-image
Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.
atmos-validation
Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.
skill-benchmark
Benchmark AI skill effectiveness by measuring implementation quality against legacy constraints.