OneJS: Instructions file for Codex

AGENTS.md

OneJS AGENTS.md is an instructions file for Codex, OpenCode from Singtaa/OneJS. It costs 4,277 tokens per session, scanned A, original, MIT.

Project guidance for OneJS, which runs React and TypeScript user interfaces inside Unity and displays them through Unity's UI Toolkit rather than a web browser.

In plain words
What is it for?
Use it to set up OneJS in a Unity scene, initialise its project files, and decide how code should cross between C# and TypeScript.
Why use it?
It explains the required Unity and Node.js versions, installation method, and boundary between native Unity code and JavaScript.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions AGENTS.md.

This is Singtaa/OneJS's own configuration. It tells Codex and OpenCode how to work on OneJS 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 OneJS configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is ├── app.js.txt # built bundle (esbuild writes ../app.js.txt).

Reuse

Borrowing it

Nothing to install: this file belongs to Singtaa/OneJS. 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/Singtaa/OneJS/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Singtaa/OneJS

Made for: Codex, OpenCode.

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 OneJS AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/singtaa/onejs/agents-md/github.svg)](https://agentmods.dev/instructions/singtaa/onejs/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/singtaa/onejs/agents-md"><img src="https://agentmods.dev/badge/instructions/singtaa/onejs/agents-md/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 OneJS AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/singtaa/onejs/agents-md"><img src="https://agentmods.dev/badge/instructions/singtaa/onejs/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,277 This file is loaded in full into every session.
When invoked 4,277 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.04277 $0.04277
Opus 5.5 $0.01711 $0.01711
Sonnet 5.5 $0.00855 $0.00855
Haiku 4.5 $0.00428 $0.00428

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

Security

Grade A, and why

OneJS AGENTS.md 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 3d 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.md · 184 lines

How it starts

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

OneJS v3: Agent Guide

Before adding anything that crosses between C# and JavaScript, read DESIGN.md. It states what belongs on each side, the four rules a wrapper has to satisfy, and why an interpreter on native makes it a portability question rather than a performance one.

Condensed facts for AI agents working with OneJS. Full documentation: https://onejs.com/docs

OneJS runs React 19 + TypeScript UIs inside Unity. TSX compiles with esbuild into a single bundle that the JSRunner component executes through QuickJS (or the browser's own JS engine on WebGL), rendering through UI Toolkit. No webview, no DOM.

Requirements

  • Unity 6000.3+ (Unity 6.3)
  • Node.js 18+ on the dev machine

Install

Package Manager: + > Add package from git URL:

https://github.com/Singtaa/OneJS.git

Or clone into Assets: git clone https://github.com/Singtaa/OneJS.git. Package id: com.singtaa.onejs. No other Unity packages or scoped registries required.

Project setup

  1. Add the JSRunner component to a GameObject in a saved scene.
  2. Click Initialize Project in its inspector. This creates, next to the scene:
{SceneDir}/{SceneName}/{GameObjectName}/
├── ~/                      # TS/TSX source (the ~ suffix keeps Unity from importing it)
│   ├── index.tsx           # entry point
│   ├── package.json, tsconfig.json, esbuild.config.mjs
│   └── styles/main.uss, types/global.d.ts, AGENTS.md, CLAUDE.md, .gitignore
├── PanelSettings.asset     # project marker: the one mandatory JSRunner field
├── UIDocument.uxml
├── app.js.txt              # built bundle (esbuild writes ../app.js.txt)
└── app.js.map.txt

then runs npm install and npm run build automatically.

Key model:

  • Panel Settings is the project marker. The folder containing the assigned PanelSettings asset defines the project; the bundle is always loaded from {that folder}/app.js.txt. A folder is considered valid when it contains ~/ or app.js.txt.
  • Or a root cart. A runner with Cart set runs a play.onejs.com cart from a folder at the project root (<root>/*/oj.json), linked by its oj.json name; its PanelSettings is then only panel settings, its editor bundle is Library/OneJS/Carts/{folder}/app.js.txt, and Unity writes nothing inside the cart. See the setup skill's root cart workflow.
  • Do not add a UIDocument. JSRunner adds and wires one at runtime (and an EventSystem if missing). On Unity 6.5+, do not substitute the new PanelRenderer either: it never attaches a panel outside Play mode, so edit-mode preview would render nothing.
  • Edit-mode preview: JSRunner renders the UI in the Game view without Play mode whenever Panel Settings is valid and app.js.txt exists, ticking at 30 Hz. The Scene view's OneJS overlay decides which previews tick: in the default Auto mode only the selected runner (with nothing selected, the one nearest the Scene view camera), so an unselected runner's timers freeze while its hot reload keeps working. Play Mode is never gated: every runner ticks every frame, as in a player build.
  • Scaffolding never overwrites existing files, and writes each default file once: ~/.onejs/scaffold records what the app was given, so a deleted file stays deleted until Restore in the Build tab brings it back.
  • ~/.onejs/ holds small per-app OneJS state the project commits, never caches or machine-local files.

Read the full file on GitHub · 184 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. 3d ago Changed · -2 lines · -227 tokens per session 66e015c319b0
  2. 5d ago Changed · +93 tokens per session 26ca1ed87d31
  3. 6d ago Changed · +90 tokens per session 9315c9863ee6
  4. 20d ago Changed · +16 tokens per session 138cbdbf2ee0
  5. 23d ago Changed · +1 lines · +93 tokens per session 5658c3032dc0
  6. 27d ago Changed · +1 lines · +52 tokens per session 7bf4ac215902
  7. 28d ago Changed · +52 tokens per session 4b1c6b8f0690
  8. 1mo ago Changed · +133 tokens per session 36879517d8b7
  9. 1mo ago Changed · +146 tokens per session 0d72c77cc874
  10. 1mo ago First seen · 184 lines · 3,829 tokens per session scan A d2c38c5ece08

Subscribe to this mod's changes

OneJS AGENTS.md is an instructions file published in the GitHub repository Singtaa/OneJS (362 stars, last pushed yesterday), licensed MIT. It adds 4,277 tokens to every session, about $0.0171 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-08-30.

Related

OneJS AGENTS.md compared with instructions from other repositories

OneJS AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
OneJS AGENTS.mdSingtaa/OneJSInstructions file362yesterdayMITA4,277Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode