lexq-simulation

lexq-simulation is a skill for Claude Code, Codex from lexq-io/lexq-cli. It costs 0 tokens per session (3,004 once invoked), scanned A, original, Apache-2.0.

A LexQ command-line guide for testing rule versions before release. It describes quick single-input checks, side-by-side comparisons, and batch simulations using historical data.

In plain words
What is it for?
Use it to inspect required input facts, run a dry run, compare two versions, or simulate many historical cases. A regression test checks that existing behavior still works after a change.
Why use it?
It helps catch incorrect requirements or regressions before a version is published or deployed to production.

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/lexq-io/lexq-cli/lexq-simulation
Any agent
npx skills add lexq-io/lexq-cli --skill lexq-simulation
Clone the repo
git clone --depth 1 https://github.com/lexq-io/lexq-cli

Made for: Claude Code, 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 lexq-simulation

README.md
[![agentmods](https://agentmods.dev/badge/skills/lexq-io/lexq-cli/lexq-simulation.svg)](https://agentmods.dev/skills/lexq-io/lexq-cli/lexq-simulation)
Your own site
<a href="https://agentmods.dev/skills/lexq-io/lexq-cli/lexq-simulation"><img src="https://agentmods.dev/badge/skills/lexq-io/lexq-cli/lexq-simulation.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,004 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.03004
Opus 5 $0.00000 $0.01502
Sonnet 5 $0.00000 $0.00601
Haiku 4.5 $0.00000 $0.00300

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

Security

Grade A, and why

lexq-simulation 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.

skills/lexq-simulation/SKILL.md · 393 lines

How it starts

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

LexQ CLI — Simulation & Testing

Prerequisite: Read lexq-shared/SKILL.md first.

Overview

LexQ provides three levels of pre-deploy validation:

Tool Scope When to Use
Dry Run Single input Quick validation of one scenario
Dry Run Compare Single input, two versions Side-by-side version comparison
Simulation Batch (historical data) Full regression test before deploy

Golden rule: Always dry-run before publishing, always simulate before deploying to production.

1. Requirements Analysis

Before testing, check what facts a version expects:

lexq analytics requirements --group-id <gid> --version-id <vid>

Response includes:

{
  "groupId": "...",
  "versionId": "...",
  "versionNo": 3,
  "requiredFacts": [
    {
      "key": "paymentAmount",
      "type": "NUMBER",
      "required": true,
      "usedBy": [
        "VIP Discount",
        "Premium Block"
      ]
    },
    {
      "key": "customerTier",
      "type": "STRING",
      "required": true,
      "usedBy": [
        "VIP Discount"
      ]
    }
  ],
  "exampleRequest": {
    "facts": {
      "paymentAmount": 0,
      "customerTier": ""
    },
    "context": {}
  }
}

Always run this before dry-run. Copy exampleRequest.facts as your starting template and fill in real values.

exampleRequest.context comes back empty, and it stays empty even when the group has an A/B test running. Live execution requests against such a group also need context.trafficKey or the test version receives no traffic — see the A/B testing section of the groups skill. Dry-run itself is unaffected: it always evaluates the version you name, so routing never applies here.

2. Dry Run (Single Input)

Test a single set of facts against a version:

lexq analytics dry-run --version-id <vid> --json '{
  "facts": {
    "paymentAmount": 150000,
    "customerTier": "VIP"
  }
}'

Read the full file on GitHub · 393 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 First seen · 393 lines · 0 tokens per session scan A 1fd1db45e40b

Subscribe to this mod's changes

lexq-simulation is a skill published in the GitHub repository lexq-io/lexq-cli (0 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,004 tokens. 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-31.