airi: Skill for Codex

.agents/skills/enforce-rules-for-pinia-synced/SKILL.md

enforce-rules-for-pinia-synced is a skill for Codex from moeru-ai/airi. It costs 73 tokens per session (512 once invoked), scanned A, original, MIT.

A rulebook for Pinia stores that use a synchronization plugin to share state between application windows. It explains which state can be copied, how watchers and actions should behave, and how to test persistence and synchronization.

In plain words
What is it for?
Use it when adding synchronization to a Pinia store or changing its state, actions, watchers, persistence, or tests.
Why use it?
It helps prevent inconsistent cross-window state, update loops, and data that cannot be safely copied between windows.

Skill for Codex

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

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 →

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-pinia-synced/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-pinia-synced

README.md
[![agentmods](https://agentmods.dev/badge/skills/moeru-ai/airi/enforce-rules-for-pinia-synced/github.svg)](https://agentmods.dev/skills/moeru-ai/airi/enforce-rules-for-pinia-synced)
Your own site
<a href="https://agentmods.dev/skills/moeru-ai/airi/enforce-rules-for-pinia-synced"><img src="https://agentmods.dev/badge/skills/moeru-ai/airi/enforce-rules-for-pinia-synced/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-pinia-synced

Your own site · 80×15
<a href="https://agentmods.dev/skills/moeru-ai/airi/enforce-rules-for-pinia-synced"><img src="https://agentmods.dev/badge/skills/moeru-ai/airi/enforce-rules-for-pinia-synced.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 512 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.00073 $0.00512
Opus 5.5 $0.00029 $0.00205
Sonnet 5.5 $0.00015 $0.00102
Haiku 4.5 $0.00007 $0.00051

Measured 23d ago against content hash 174bb73471b0, 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-pinia-synced 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-pinia-synced/SKILL.md · 40 lines

How it starts

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

Enforce AIRI Pinia Synchronization Rules

Apply these rules to every Pinia store that uses pinia-plugin-synced.

Synchronization Model

  • Treat pinia-plugin-synced as snapshot replication and leader-routed RPC. It does not share Vue refs between renderers.
  • Add synced only to stores that need cross-window ownership. Synchronize the smallest serializable source-of-truth state.
  • state: true sends a full-store proposal after each local mutation. Keep transient and high-frequency state in an unsynchronized store.
  • State, action arguments, and action results must support structuredClone.
  • Keep computed values, query status, runtime clients, controllers, pending promises, and component state outside synchronized state.

Watchers and Invariants

  • Remote snapshots run local Vue watchers. A watcher on synchronized state must not write synchronized state directly.
  • A watcher can call a synchronized action to enforce a leader-owned invariant. The watcher must await the action. The action must be idempotent because each renderer can observe the same snapshot.
  • Enforce cross-field invariants inside explicit actions before the state commit. Do not repair replicated state with a watcher.

Actions

  • Every returned function in a setup store is a Pinia action. Use computed values or pure helpers for read-only projections.
  • List only leader-owned side-effecting actions under synced.actions. These actions must be asynchronous, and callers must await them.
  • Unlisted actions run in the caller renderer. Their mutations become full-state proposals when state: true.

Persistence and Leadership

  • Keep synchronization and persistence as separate boundaries. Give persisted synchronized state one explicit persistence owner.
  • Do not add bidirectional persistence composables or storage-event listeners to synchronized state. Use explicit persistence commands.
  • Set the leadership mode explicitly for every Electron renderer. Utility and minimal windows must use follower-only.

Read the full file on GitHub · 40 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 · 40 lines · 73 tokens per session scan A 174bb73471b0

Subscribe to this mod's changes

enforce-rules-for-pinia-synced is a skill published in the GitHub repository moeru-ai/airi (50,528 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 512 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

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.

hrabanazviking/Seidr-Smidja · 0 tokens

sap-extension-creator

Create Super Agent Party (SAP) extensions. This skill should be used when users want to create, build, or scaffold a new extension for Super Agent Party - including static HTML extensions (pure frontend) and Node.js backend extensions. Triggers on requests like "create a new SAP extension", "build an extension for…

heshengtao/super-agent-party · 93 tokens

skill-creator

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

heshengtao/super-agent-party · 45 tokens

find-skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

heshengtao/super-agent-party · 67 tokens

speak-status

A skill for checking which Claude Code session CC Mascot is currently set to speak. CC Mascot is an app that reads Claude Code responses aloud.

kazakago/cc-mascot · 19 tokens

speak-this

A session-setting command for the CC Mascot app, which makes the mascot speak only for the current Claude Code session. It records the current session ID in the app’s active-session file.

kazakago/cc-mascot · 21 tokens