compare-experiments

compare-experiments is a skill for Claude Code, Codex from xingwudao/open-xquant. It costs 14 tokens per session (913 once invoked), scanned A, original, MIT.

A guide for comparing two completed open-xquant experiment runs, where a run is one recorded backtest or research execution.

In plain words
What is it for?
Use it to compare results and metadata from two runs in a legacy workspace; version-managed workspaces use a different comparison workflow.
Why use it?
It chooses the correct comparison process based on the workspace layout and keeps comparison summaries separate from the original runs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/xingwudao/open-xquant/compare-experiments
Any agent
npx skills add xingwudao/open-xquant --skill compare-experiments
Clone the repo
git clone --depth 1 https://github.com/xingwudao/open-xquant

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 compare-experiments

README.md
[![agentmods](https://agentmods.dev/badge/skills/xingwudao/open-xquant/compare-experiments.svg)](https://agentmods.dev/skills/xingwudao/open-xquant/compare-experiments)
Your own site
<a href="https://agentmods.dev/skills/xingwudao/open-xquant/compare-experiments"><img src="https://agentmods.dev/badge/skills/xingwudao/open-xquant/compare-experiments.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 913 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.1 $0.00014 $0.00913
Opus 5 $0.00007 $0.00456
Sonnet 5 $0.00003 $0.00183
Haiku 4.5 $0.00001 $0.00091

Measured 6d ago against content hash e14714ec6ef4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

compare-experiments 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 6d 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.

agent/skills/compare-experiments/SKILL.md · 103 lines

How it starts

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

Experiment Comparator

Use this skill when the user asks to compare two completed runs. The comparison is cross-experiment metadata, so do not write outputs inside either run directory. Resolve the comparison output root from .open-xquant/workspace.yaml when it exists: use paths.comparisons_dir for the comparison directory root and paths.comparison_registry for the summary registry. Fall back to comparisons/ and comparisons/comparisons.jsonl only when no workspace config value is present.

Do not use this skill in a version-governed workspace. Stop before reading run artifacts or writing comparison outputs and route the request to compare-strategy-versions, including when the user only says "compare two experiments". The version-aware comparator must validate each candidate against its claimed version manifest and backtest phase.

Classify the workspace exactly as the CLI does: it is version-governed if and only if workflow.layout == version_governed or the paths.versions_dir key is present. Otherwise it is legacy, even when .open-xquant/workspace.yaml exists. Use this legacy comparator only in the latter case.

Preconditions

Both runs must contain:

  • strategy_spec.yaml
  • metrics.json
  • equity_curve.csv
  • execution_assumptions.json
  • research_bias_audit.json
  • reproducibility_audit.json

If a run lacks metrics.json, say that the experiment has not completed a backtest and cannot be compared yet. If either run lacks audit or execution-assumption artifacts, stop and explain that audited comparison requires those artifacts before naming winners or writing spec-impact conclusions. If an audit contains fatal findings, do not present that run as comparable to an audited candidate without making the audit failure the primary result.

Workflow

  1. Read both strategy_spec.yaml files and generate spec_diff.yaml.
    • Compare fields recursively.
    • Include path, run A value, run B value, and likely impact.
  2. Read execution_assumptions.json and both audit artifacts for each run.
    • Verify execution assumptions are comparable before interpreting metric differences.
    • Treat reproducibility or research-bias failures as blockers for winner-style conclusions.
  3. Read both metrics.json files and generate metrics_comparison.json.
    • Include key metrics for each run.
    • Include deltas and winners by return, Sharpe, and drawdown where present.
  4. Generate figures under <comparisons_dir>/<comparison_id>/figures/.
    • equity_overlay.png
    • drawdown_overlay.png
    • metrics_bar.png Do not leave figures/ empty. If no figure will be generated, do not create the directory.
  5. Write comparison_report.md.
    • Explain which spec differences plausibly drove the metric differences.
    • Do not claim causality when the evidence only supports association.
  6. Append a summary row to <comparison_registry>.

Read the full file on GitHub · 103 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. 6d ago First seen · 103 lines · 14 tokens per session scan A e14714ec6ef4

Subscribe to this mod's changes

compare-experiments is a skill published in the GitHub repository xingwudao/open-xquant (126 stars, last pushed 3d ago), licensed MIT. It adds 14 tokens to every session and 913 once invoked, about $0.0001 per session on Opus 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.