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.
npx agentmods add skills/tensorcircuit/tensorcircuit-ng/contraction-tunernpx skills add tensorcircuit/tensorcircuit-ng --skill contraction-tunergit clone --depth 1 https://github.com/tensorcircuit/tensorcircuit-ngWrote 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.
[](https://agentmods.dev/skills/tensorcircuit/tensorcircuit-ng/contraction-tuner)<a href="https://agentmods.dev/skills/tensorcircuit/tensorcircuit-ng/contraction-tuner"><img src="https://agentmods.dev/badge/skills/tensorcircuit/tensorcircuit-ng/contraction-tuner.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.02429 |
| Opus 5 | $0.00026 | $0.01215 |
| Sonnet 5 | $0.00010 | $0.00486 |
| Haiku 4.5 | $0.00005 | $0.00243 |
Grade A, and why
contraction-tuner 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.
How it starts
The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Contraction Tuner
Use this skill when a task asks to optimize, compare, or benchmark tensor-network contraction paths, slicing targets, OMECO, cotengra, contraction width, FLOPs, write, or slice count for TensorCircuit-NG.
Core Principle
Treat contraction tuning as an empirical search problem. Do not infer quality from width alone. Always report at least:
- path/search time and slicer/reconfiguration time separately
log10(total FLOPs)log2(max intermediate size)log2(total write)- number of sliced indices and total slice tasks
- package versions and topology size (
ntensors,nindices)
For dim-2 circuit indices, k sliced indices means 2**k slice tasks. A path with more slices can still have lower total FLOPs if per-slice contractions are much cheaper.
Metric Hygiene
- cotengra
target_sizeis a linear tensor element count. For target widthW, passtarget_size=2**W, notW. - cotengra
ContractionTree.total_flops()andtotal_write()include slicing multiplicity. - OMECO
SlicedEinsum.complexity()is per-slice. For fair comparison, convert the OMECO sliced tree to a cotengraContractionTreeand applyremove_ind_()for eachsliced.slicing()label, or multiply per-slice FLOPs/write byprod(size_dict[ix] for ix in sliced.slicing()). - OMECO
SlicedEinsum.num_slices()is the number of sliced labels, not total slice tasks. - A result where
sliced.slicing()is empty but width improves means OMECO slicer reoptimized the tree enough to meet the target without actual slicing.
OMECO Workflow
Use OMECO as the default first pass for large/deep tensor networks because it often finds strong seed trees much faster than cotengra.
Recommended seed search grid:
seed_configs = ["8x48", "12x64", "24x64"]
score = omeco.ScoreFunction(
tc_weight=1.0,
sc_weight=0.0,
rw_weight=64.0,
sc_target=64.0,
)
Parse AxB as ntrials=A, niters=B, and use len(betas)=B, for example:
betas = [float(1.0 / x) for x in np.geomspace(2.0, 0.05, niters)]
tree = omeco.optimize_code(
inputs,
output,
sizes,
omeco.TreeSA(ntrials=ntrials, niters=niters, betas=betas, score=score),
)
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.
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.
- 6d ago First seen · 179 lines · 51 tokens per session scan A e5194bbe578b
contraction-tuner is a skill published in the GitHub repository tensorcircuit/tensorcircuit-ng (89 stars, last pushed 4d ago), licensed Apache-2.0. It adds 51 tokens to every session and 2,429 once invoked, about $0.0003 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.
Other skills, from other repositories
physicsnemo-discover
Official NVIDIA-authored guidance for navigating PhysicsNeMo — pick the model, datapipe, or example for a SciML/AI4Science task (surrogates, forecasting, downscaling, physics-informed, inverse, generative). Points at existing files via live repo search; never writes code. Do NOT use for installation or environment…
cellxgene-census-query
Query CZ CELLxGENE Census (61M+ cells). Filter by cell type/tissue/disease, retrieve expression data, and integrate with scanpy/PyTorch for population-scale single-cell analysis. Use this skill when: (1) Querying single-cell expression data by cell type, tissue, or disease, (2) Exploring available single-cell datasets…
start-experiment
Start the autoresearch optimization loop for a specific model + lane. Resolves the hierarchical program.md (root → model → lane), asks the user for hardware (local TPU VM or GKE cluster of a specified TPU type + topology), discovers available clusters from .env/, checks occupancy with USERPREFIX-aware attribution…
stop-experiment
Stop the autoresearch optimization loop cleanly. Disarms the launch-armed process watcher, cancels pending wakeups, reaps orphan workloads on the project's cluster pool, files any missing experiment pages, runs lint, and appends a clean-shutdown marker to wiki/log.md. Invoke at the end of an autoresearch session.
edit-model-code
Coding-discipline guidelines for surgically modifying model code inside a per-experiment fork in the autoresearch loop. Adapts Andrej Karpathy's LLM-coding guidelines (think before coding, simplicity first, surgical changes, goal-driven execution) to this project's invariants — no semantics drift, one mechanism per…
author-kernel
Authoring discipline for kernel-family candidates (the author role of kernelexperiments/program.md step K4). Load BEFORE writing any kernel candidate — whether you are a solo agent running the whole K0–K9 loop (production: Gemini / Claude / Codex from a bare prompt) or a dispatched author process in the trial…