javascript-runtime

A guide for running short JavaScript programs in an agent's built-in runtime.

In plain words
What is it for?
Filtering or grouping data, generating structured output, running single-file scripts, and combining read-only tool results.
Why use it?
It makes repeatable data reshaping, calculations, string processing, and small tool workflows easier to perform consistently.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/day1labs/openava/javascript-runtime
Any agent
npx skills add Day1Labs/OpenAva --skill javascript-runtime
Clone the repo
git clone --depth 1 https://github.com/Day1Labs/OpenAva

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00038 $0.01602
Opus 5 $0.00019 $0.00801
Sonnet 5 $0.00008 $0.00320
Haiku 4.5 $0.00004 $0.00160

Measured 2d ago against content hash 02c5bf759dbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

javascript-runtime scanned grade A with 1 finding 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 2d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Do not assume ESM `import`, package resolution, built-in Node modules, timers, `Buffer`, `child_process`, or other Node standard libraries are available
OpenAva/Runtime/Agent/Skills/javascript-runtime/SKILL.md · 187 lines

How it starts

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

JavaScript Runtime

Use this skill when the task is better solved by executing short, deterministic JavaScript inside OpenAva's built-in JavaScript runtime instead of reasoning everything manually. You can either pass inline code directly or run a single workspace script through script_path, and both entry modes share the same minimal CommonJS shape with require, module.exports, exports, __filename, __dirname, and a minimal process. When later steps need to keep variables, helper functions, or intermediate state, reuse the same session_id.

Typical fits:

  • JSON reshaping, filtering, grouping, sorting, aggregation
  • String parsing, normalization, templating, and report generation
  • Small deterministic calculations with multiple intermediate steps
  • Calling one or more read-only tools from JavaScript and combining the results
  • Running a small reusable workspace script file without introducing a separate sub-agent
  • Producing stable structured output that should be derived from code, not guesswork

Avoid using this skill when:

  • A direct tool call already solves the task cleanly
  • The transformation is trivial enough to do in plain reasoning
  • The task needs browser DOM APIs or a web page context
  • The task requires complex, long-running, open-ended state management better handled by a dedicated sub-agent or another mechanism

Runtime Model

The javascript_execute tool runs code inside Apple system JavaScriptCore.

Important runtime rules:

  • Provide exactly one of code or script_path
  • script_path must point to a single file inside the active workspace
  • Your code is executed as the body of an async function
  • Use return for the final result
  • You may use await
  • Input data is exposed as openava.input
  • You may provide session_id to reuse the same persistent JavaScript context
  • Shared cross-call state is available through openava.session
  • Tool calls are available through await openava.tools.call(functionName, args)
  • console.log/info/warn/error are captured and returned in the tool result
  • code and script_path share the same minimal CommonJS surface: require, module.exports, exports, __filename, __dirname
  • Both entry modes also expose a minimal process object with argv, cwd(), env, platform, and versions
  • A built-in path module is available through require("path") or require("node:path")
  • When using inline code, relative require() resolves from the active workspace root
  • Do not assume ESM import, package resolution, built-in Node modules, timers, Buffer, child_process, or other Node standard libraries are available

Read the full file on GitHub · 187 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. 2d ago First seen · 187 lines · 38 tokens per session scan A 02c5bf759dbd

Subscribe to this mod's changes

javascript-runtime is a skill published in the GitHub repository Day1Labs/OpenAva (10 stars, last pushed 1mo ago), licensed MIT. It adds 38 tokens to every session and 1,602 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-harness-fault-injection

Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.

sickn33/agentic-awesome-skills · 34 tokens

hedging-strategy

Hedging strategy design (beta hedge / option protection / tail risk / cross-asset hedging), including hedge-ratio calculation and cost evaluation.

HKUDS/Vibe-Trading · 35 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

oma-scholar

Scholarly research companion using Knows sidecar spec (.knows.yaml). Generates, validates, reviews, queries, and compares structured research-paper sidecars, and fetches them from knows.academy. Use for academic literature search, survey synthesis, paper authoring assistance, and peer review with token-efficient…

first-fluke/oh-my-agent · 73 tokens

oma-hwp

Convert HWP / HWPX / HWPML files to Markdown using kordoc. Extracts text, headings, tables, lists, images, footnotes, and hyperlinks. Use for Korean word processor files (Hangul), government documents, and AI-ready data preparation.

first-fluke/oh-my-agent · 59 tokens

error-recovery

Standard recovery patterns for all squad agents. When something fails, adapt — don't just report the failure.

bradygaster/squad · 24 tokens