Agent skill

Author Rhai Tests

by LunCoSim in LunCoSim/lunco-sim

Author and review LunCoSim behavioral, asset-backed, component, mission, visual, and requirements-verification tests.

Apache-2.0Auto-check passed

Install Author Rhai Tests

skills CLI
$ npx skills add LunCoSim/lunco-sim --skill author-rhai-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LunCoSim/lunco-sim author-rhai-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LunCoSim/lunco-sim.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/author-rhai-tests .claude/skills/author-rhai-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
author-rhai-tests
GitHub stars
107
Token cost
~3.5k tokens
SKILL.md length
1,872 words
Files
1
Skills in repo
40
Repo updated
First seen
Licence
Apache-2.0

At a glance

Author and review LunCoSim behavioral, asset-backed, component, mission, visual, and requirements-verification tests.

  • Works in 4 steps: Split the behavior into the smallest… → Inspect the owning USD/SysML/Modelica… → Make positive conformance evidence the… → …
  • A test observes a Twin
  • SKILL.md covers Ownership rule, Authoring workflow, Production commands and Review checklist
  • Calls cargo

What it does

Author Rhai Tests is an agent skill from LunCoSim/lunco-sim. Author and review LunCoSim behavioral, asset-backed, component, mission, visual, and requirements-verification tests. Use when a test observes a Twin, USD stage, Modelica participant, runtime asset, or authored policy; keep the test in the Twin's Rhai scenario and run it through production. Use Rust tests only for generic engine mechanisms that Rhai cannot observe.

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Rust. The repository describes itself as: Collaborative Multiphysics Cosimulator For Space Missions 🌎🚀🌚. The licence is Apache-2.0.

When your agent uses it

  • A test observes a Twin
  • Modelica participant
  • Authored policy
  • Keep the test in the Twins Rhai scenario and run it through production

Example prompts

  • “/author-rhai-tests”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Split the behavior into the smallest independently verifiable component
  2. Inspect the owning USD/SysML/Modelica source and existing tool libraries
  3. Make positive conformance evidence the default: prove that the required
  4. For requirements, read the mounted SysML snapshot and evaluate composed USD

What it can do on your machine

Read from SKILL.md and the folder at commit 4c48dd0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Author Rhai Tests loads about 3.5k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 1,872 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LunCoSim/lunco-sim at commit 4c48dd0, republished under its Apache-2.0 licence (© LunCoSim). 1,872 words, ~3,520 tokens.

Download SKILL.mdSave it as .claude/skills/author-rhai-tests/SKILL.md (or your agent's skills folder).
name
author-rhai-tests
description
Author and review LunCoSim behavioral, asset-backed, component, mission, visual, and requirements-verification tests. Use when a test observes a Twin, USD stage, Modelica participant, runtime asset, or authored policy; keep the test in the Twin's Rhai scenario and run it through production. Use Rust tests only for generic engine mechanisms that Rhai cannot observe.

Author tests in the right layer

Use this skill whenever a test is intended to prove what a mission Twin does, what an authored component looks like, whether a USD relationship is wired, whether a Modelica participant responds, or whether a public runtime command or query produces the required result.

Ownership rule

The default decision is simple: if the test includes an authored asset or runtime behavior, author it in Rhai beside the Twin asset and execute it with the production luncosim scene-test/runtime surface. This includes USD, SysML/KerML, Modelica, terrain, materials, component files, scene paths, and visual evidence. A Rust implementation does not make an observable behavior a Rust-owned test.

Rust tests are reserved for generic mechanisms that Rhai cannot observe without already depending on the mechanism under test: pure math/lowering, parser and schema contracts, serialization, generic path/identity resolution, and lifecycle/resource seams. Keep those fixtures inline or temporary and generic; do not embed a repository or Twin asset path in a Rust test. A Rust resolver test may prove the generic TwinRoots contract, but it must not become a second asset acceptance runner.

The source-of-truth split is:

Fact or behaviorAuthoritative sourceTest owner
Prim identity, topology, transforms, dimensions, materials, physics schemasUSDRhai scene gate
Requirement intent, traceability, scalar limits, verification namesSysML/KerMLRhai verifier reading the mounted SysML report
Continuous equations and participant stateModelicaRhai observer through the public runtime surface
Sequence, stimulus, policy, verdict, visual inspection rubricRhaiRhai
Generic parser, resolver, serializer, or engine invariantRust owner crateRust unit/integration test

Do not copy a threshold, prim path, clock value, or component parameter into a test when it is already authored in SysML or USD. Load the authoritative source, then use the generic helpers in assets/scripting/tools/sysml_requirements.rhai and the public query/command surface to evaluate it.

Authoring workflow

  1. Split the behavior into the smallest independently verifiable component (bus, leg, wheel, ramp, panel, tank, joint, controller, or mission phase). Give the component its own authored requirement/verification mapping and Rhai observer when the contract is independently useful.

  2. Inspect the owning USD/SysML/Modelica source and existing tool libraries before adding helpers. Put reusable mechanics in a namespaced Rhai library; keep the observer short and declarative. If a helper needs engine state that the public API cannot expose, add one generic Rust capability at its owner, then consume it from Rhai.

  3. Make positive conformance evidence the default: prove that the required component, topology, relationship, datum, or runtime outcome is present and correct. Do not write a negative test merely to assert that an obsolete implementation name, old shape, or superseded path is absent; update the positive requirement and observe the required result instead.

    Add a negative case only when rejection or safe failure is itself a real contract, for example malformed source, non-finite values, missing safety-critical relationships, invalid units or clocks, stale-generation mutation, unsupported commands, or a required fail-safe response. Such a case must be bounded, non-destructive, and reach the public diagnostic/verdict boundary without crashing or silently substituting a default. A historical regression example alone is not sufficient reason to add a negative test.

  4. For requirements, read the mounted SysML snapshot and evaluate composed USD evidence. Keep the requirement ID/limit in SysML and emit structured check evidence (name, measured value, units, criterion, source revision, and pass/fail) from Rhai.

For support-gated motion, distinguish authored geometry from runtime state: QueryPhysicsState.support_footprint_count is only the number of declared probes, while support_contact_count is the latest evaluated contact count and support_sample_tick proves freshness. Treat a missing (null) contact count as unavailable evidence and fail the check; never infer contact from a non-empty footprint. 5. For visual requirements, define the camera, lighting/time contract, reference artifact, measurable geometry/placement rubric, and capture window. A screenshot is evidence only when the observer records the exact camera/source revision and verdict; visual inspection must not be reduced to an unbounded “looks good” assertion. 6. Run the narrowest production gate. Use --validate only as parse/preflight evidence; it is not a behavior or visual verdict. For a live Editor session, use RunRhai/run_rhai_test.sh or an attached RunScenario and preserve the current process and camera. Do not rebuild Rust for a Rhai-only change. Scene discovery is recursive. Give independent Editor fixtures nested one-scene directories so each windowed run mounts its own Twin and preview state. The production test wrappers give each process a run-scoped LUNCOSIM_CONFIG, isolating saved workspace/session state as well as ephemeral settings and runtime overlays. 7. Repeat with deterministic clocks and explicit seeds. Record the clock contract, timestep/substeps, source revision, and finite-state result. A repeatability check compares the same sampled evidence, not merely a zero exit code. For an owner-only hook, exercise valid context through its real production owner and rejection from an authored off-cycle invocation. Use RunRhai's Application/Repl/Evaluation route for deliberate policy inspection; it does not stand in for the live owner context. World-bound RunRhai requests drain one per application update in FIFO order, and excess queue submissions or over-budget invocations return terminal errors. Keep public command behavior assertions in authored Rhai; test only the generic batch and FIFO seam in Rust.

For cross-run determinism, keep profile selection and state comparison in the authored Rhai test. It reads the runner's typed parameters, selects a matching profile from scripts/tests/fixtures/deterministic-physics-reference.json, and requests only the expected row for each selected state. Rust decodes that JSON at the luncosim test --determinism-reference PATH process boundary and serves typed rows through the existing query(...) bridge. Rhai compares the six selected physics checkpoints, the sparse Modelica checkpoints, articulated checkpoints, and the explicit final stage with exact equality (numeric_tolerance=0). It also deliberately alters one selected physics row and verifies the comparison rejects it. It retains only the selected tick numbers and the first mismatch message; it does not accumulate a state trace or emit a result bundle. report_verdict and the scene-test process exit code are the completion contract. The Bash and PowerShell matrices in scripts/test-deterministic-physics-profiles.sh and scripts/test-deterministic-physics-profiles.ps1 invoke the production test for each profile and stop on a nonzero exit; they do not parse logs or compare JSON. Rhai print/log lines remain diagnostics.

A fresh-scene startup test asserts that on_start observes tick 0 and the first on_tick observes tick 1; startup readiness must hold the shared clock until those callbacks can begin in order. For USD Modelica networks, the startup gate also covers member-source resolution, network synthesis, and generated port-surface publication; the binding epoch must not classify authored connections while that interface is pending. Solver compilation publishes the initialized time-zero state; do not advance Modelica or physics clocks to prime a first exchange before opening the scenario gate. The first live exchange uses the shared fixed tick and its normal causal barrier. Keep the production scene-test's connection diagnostics in the pass condition. Do not normalize startup ticks or reset elapsed time to make a trace begin at zero. The production fixed runner completes a started causal cycle and retains its remaining fixed time while an owner hold is active; verify startup stays at tick 0 with no fixed elapsed time or overstep before readiness. Never subtract a scenario start tick or translate traces to a relative tick sequence. Match equivalent authored subjects by their USD-owned stable facts, and omit ECS allocation and wall-clock timing from the comparison.

Show full SKILL.md (674 more words)Show less

For observable multi-actor ordering, attach scenarios to distinct authored hosts and assert the same-pass handoff in Rhai. Keep Rust coverage for the generic identity key and reverse-completion commit mechanism; a Rust assertion alone does not prove the production script path.

When a public query reports asynchronous analysis, a test may sample that query from its test-only on_tick until the exact requested generation reaches a terminal state. Assert pending as retryable and inspect diagnostics only after ready; do not use elapsed wall time to decide which result is current. If a running scenario needs those facts before it can initialize, declare the owner and identity in simulation_dependencies(...).required_inputs and assert from on_start that the committed source revision is available. The generic scenario lifecycle test may verify Pending-to-Ready hold/release mechanics; the authored scene gate must verify the domain key and source revision.

For transient USD curve views, use InspectUsdCurveView to wait until completed_revision == requested_revision, fail immediately on state == "failed", and require applied_revision == requested_revision for a successful mesh. Assert local_visibility and result vertex count rather than reading the unchanged USD curve seed. A route with fewer than two active points must finish with hidden local visibility and zero generated vertices; adding the second point must produce an applied mesh revision.

For ordered asynchronous scene checks, author the sequence with the existing Rhai task tree (seq, once, wait_until, check, and sel) rather than a numeric phase switch in on_tick. Use named Fn("callback") leaves when a step needs persistent test state; the task driver binds that state's this to the callback. Prefer wait_for/wait_for_from when the owner publishes the completion event; use wait_until only when no suitable event exists. wait uses deterministic simulation time, not wall time. For an interruptible sequence, put a cheap state guard in reactive_seq and let a failed check cancel its running child; event handlers can update that guard's state, which the task kernel observes on its next deterministic pass. Keep test-only on_tick for a bounded fixed-step watchdog that reports the exact condition that timed out. Do not add a separate Rust timer callback or phase runner: task progression already owns deterministic waits and callback cadence. Any future task deadline must specify its clock and cancellation/failure result as part of the task contract. The shared auto_tests.rhai prelude already owns assertions and terminal verdicts; do not add a parallel test DSL unless the Rhai task surface demonstrably cannot express a required contract.

Production commands

Resolve the production binary once:

bash
export LUNCOSIM_BIN="${LUNCOSIM_BIN:-luncosim}"
./scripts/run_scene_tests.sh --no-build --exact <scene-name> -j 4

Use -j 1 when diagnosing ordering or nondeterminism. Keep the production binary and API session explicit; never substitute an old sandbox executable, cargo run, or a temporary Rust runner. For same-session iteration, register or reload the Twin Rhai library, run a minimal namespaced call, then execute the observer through the API as described by test-via-api.

Review checklist

  • Is this observable behavior or an authored asset? If yes, it is Rhai-owned.
  • If a test loads, composes, edits, or inspects a USD/Modelica asset, author it as a Twin Rhai scenario. Keep Rust tests for pure, asset-free engine primitives and routing predicates; do not embed fixture documents or asset identifiers in core tests.
  • Does the test load the real Twin/USD/Modelica source rather than recreate it?
  • Are requirements and dimensions read from SysML/USD instead of duplicated?
  • Is the component independently scoped and its evidence structured?
  • If a negative case exists, is rejection or safe failure an explicit contract, and does it have a named, non-crashing diagnostic? Do not require a negative case for ordinary conformance or obsolete-implementation cleanup.
  • Are units, coordinate frame, camera/time contract, and deterministic clocks explicit where they affect the result?
  • Is canonical numeric state kept as native f64/USD double, with any f32/float conversion explicit and limited to a renderer/GPU boundary or a USD field whose schema requires it?
  • Is the test short enough to reuse libraries rather than becoming a batch builder or a second runtime in Rhai?
  • Did the run use the production binary/API and prove a real verdict?

Defer to sysml-requirements for SysML source-set and traceability rules, interactive-component-authoring for the one-component Editor loop, and validate-assets for parse/lint preflight.

© LunCoSim, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/author-rhai-tests of LunCoSim/lunco-sim.

Open the folder on GitHubat commit 4c48dd0

Compare with similar skills

Author Rhai Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Author Rhai Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Author Rhai Tests this skillLunCoSim/lunco-sim107—~3.5kAutomated safety check: PassApache-2.0
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0
Firecrawl Page Scrape Integrationfirecrawl/firecrawl190k1 repos~944Automated safety check: PassISC
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Rust TDD Workflowrtk-ai/rtk83k—~753Automated safety check: NotesApache-2.0
OpenLogi macOS Permissions TriageAprilNEA/OpenLogi23k—~2.5kAutomated safety check: NotesApache-2.0

Similar skills

  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Adds Firecrawl's /scrape endpoint to application code to pull markdown, HTML, links, screenshots or structured data from a single known URL.

    190k GitHub starsUsed in 1 repo~944 tokens
    Data & AnalyticsAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Enforces red-green-refactor for Rust work, with idiomatic test patterns, a naming convention and a pre-commit gate of cargo fmt, clippy and test.

    83k GitHub stars~753 tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check: notes
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed

More from LunCoSim/lunco-sim

All 40 skills in this repo
  • Nightly Changelog

    LunCoSim/lunco-sim

    Generate concise LunCoSim nightly GitHub release notes with platform downloads, installation guidance, an AI-agent mission prompt, and a changelog link.

    107 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Build or repair a reusable scene component through a live LunCoSim Editor session.

    107 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Assembly Quality

    LunCoSim/lunco-sim

    Build or review a componentized LunCoSim USD assembly with a realistic, dimensionally checkable presentation.

    107 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Author Rhai Tool

    LunCoSim/lunco-sim

    Create, extend, register, or debug a reusable LunCoSim Rhai tool library for live USD authoring, component linting, inspection, or test support.

    107 GitHub stars~5.2k tokensUpdated today
    Auto-check passed
  • Author Tutorial

    LunCoSim/lunco-sim

    Author an interactive tutorial, guided lesson, onboarding flow, coach-mark tour, or objectives checklist in LunCoSim.

    107 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Capability Discovery

    LunCoSim/lunco-sim

    Find existing LunCoSim capabilities before declaring a feature missing, unsupported, or impossible.

    107 GitHub stars~2.9k tokensUpdated today
    Auto-check passed

Works with

Questions about Author Rhai Tests

What does Author Rhai Tests do?

Author and review LunCoSim behavioral, asset-backed, component, mission, visual, and requirements-verification tests. Author Rhai Tests is an agent skill from LunCoSim/lunco-sim. Author and review LunCoSim behavioral, asset-backed, component, mission, visual, and requirements-verification tests.

When should I use Author Rhai Tests?

Author Rhai Tests fits situations like: A test observes a Twin; modelica participant; authored policy; keep the test in the Twins Rhai scenario and run it through production.

How do I install Author Rhai Tests in Claude Code?

Run `npx skills add LunCoSim/lunco-sim --skill author-rhai-tests -a claude-code`. Or copy the skill folder (skills/author-rhai-tests in LunCoSim/lunco-sim) into .claude/skills/author-rhai-tests in your project. Claude Code loads it when a task matches its description.

How do I install Author Rhai Tests in Codex?

Run `npx skills add LunCoSim/lunco-sim --skill author-rhai-tests -a codex`. Or copy the skill folder (skills/author-rhai-tests in LunCoSim/lunco-sim) into .agents/skills/author-rhai-tests in your project. Codex loads it when a task matches its description.

Can I use Author Rhai Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LunCoSim/lunco-sim --skill author-rhai-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/author-rhai-tests, .gemini/skills/author-rhai-tests, .github/skills/author-rhai-tests and .opencode/skills/author-rhai-tests in your project.

What does Author Rhai Tests need to run?

Going by SKILL.md and its folder, Author Rhai Tests needs the command-line tools its instructions call (cargo).

Does Author Rhai Tests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Author Rhai Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Author Rhai Tests use?

Author Rhai Tests is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Author Rhai Tests use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Author Rhai Tests?

Skills that share tags, products or a category with Author Rhai Tests: Update V8 Version (openinterpreter/openinterpreter, 69k stars), Firecrawl Page Scrape Integration (firecrawl/firecrawl, 190k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars) and Rust TDD Workflow (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Author Rhai Tests?

LunCoSim (a GitHub organization) maintains it in LunCoSim/lunco-sim, which has 107 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 11, 2026.

Source: LunCoSim/lunco-sim on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.