sublinear-solver

sublinear-solver is a skill for Claude Code, Codex from ruvnet/sublinear-time-solver. It costs 96 tokens per session (644 once invoked), scanned A, original, MIT.

A library and agent service for calculations on sparse matrices and graphs. It can solve certain linear equations, rank graph nodes with PageRank, and estimate local scores without calculating every result.

In plain words
What is it for?
Use it to solve diagonally dominant systems of the form A x = b, rank nodes or personalised results in a graph, find top-scoring nodes, and estimate one solution entry.
Why use it?
It provides focused tools for large, mostly empty mathematical systems and networks. This can avoid processing a full graph or matrix when only selected scores or a local result is needed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to solve diagonally dominant systems of the form A x = b, rank nodes or personalised results in a graph, find top-scoring nodes, and estimate one solution entry.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ruvnet/sublinear-time-solver/sublinear-solver
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.

Any agent
npx skills add ruvnet/sublinear-time-solver --skill sublinear-solver
Clone the repo
git clone --depth 1 https://github.com/ruvnet/sublinear-time-solver

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 sublinear-solver

README.md
[![agentmods](https://agentmods.dev/badge/skills/ruvnet/sublinear-time-solver/sublinear-solver/github.svg)](https://agentmods.dev/skills/ruvnet/sublinear-time-solver/sublinear-solver)
Your own site
<a href="https://agentmods.dev/skills/ruvnet/sublinear-time-solver/sublinear-solver"><img src="https://agentmods.dev/badge/skills/ruvnet/sublinear-time-solver/sublinear-solver/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sublinear-solver

Your own site · 80×15
<a href="https://agentmods.dev/skills/ruvnet/sublinear-time-solver/sublinear-solver"><img src="https://agentmods.dev/badge/skills/ruvnet/sublinear-time-solver/sublinear-solver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00096 $0.00644
Opus 5.5 $0.00038 $0.00258
Sonnet 5.5 $0.00019 $0.00129
Haiku 4.5 $0.00010 $0.00064

Measured today against content hash 9c62dc13dace, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sublinear-solver 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 today.

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.

.agents/skills/sublinear-solver/SKILL.md · 43 lines

How it starts

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

Sublinear solver

Pick the entry point

  • Library code: npm i @ruvnet/sublinear-core. It has 0 dependencies and provides ESM, CJS and types.
  • Agent tools: the MCP server npx -y sublinear-time-solver serve. The tools to use are solve, pageRank, estimateEntry and analyzeMatrix.
  • Rust: cargo add sublinear.

Recipes

import { solve, graphFromEdges, pageRank, personalizedPageRank, forwardPush, backwardPush, estimateEntry, topK } from '@ruvnet/sublinear-core';

// A x = b. A is COO {rows, cols, rowIndices, colIndices, values}, dense rows, or a CsrMatrix.
const { x, residual, converged, method } = solve(A, b, { tolerance: 1e-10 });

// Graph ranking with string ids; edges are [source, target, weight?].
const g = graphFromEdges(edges);
topK(pageRank(g).scores, 10, g);
topK(personalizedPageRank(g, seedId, { damping: 0.85 }).scores, 10, g);

// Large graph, local answer: the cost depends on epsilon, not on n.
topK(forwardPush(g, seedId, { epsilon: 1e-6 }).scores, 10, g);
backwardPush(g, targetId);              // ppr_s(target) for every source s

// One entry of x without solving for all of x (requires strict row diagonal dominance).
estimateEntry(A, b, i, { walks: 20000 }); // { estimate, standardError }

Rules

  • damping is the probability of following an edge. A restart probability α means damping = 1 - α.
  • Check converged and residual before relying on x. The residual is recomputed from the returned vector.
  • Jacobi, Neumann and Gauss-Seidel need diagonal dominance. Conjugate gradient needs a symmetric positive definite matrix. method: 'auto' picks between them.
  • A full solution vector costs time linear in nnz per iteration. Only forwardPush, backwardPush and estimateEntry have a cost independent of n.
  • The MCP solveTrueSublinear tool is approximate. Check its verified_relative_residual, or use solve when you need accuracy.
  • The consciousness, psycho-symbolic, emergence and temporal-lead MCP tools are experimental simulations, not solvers.

Read the full file on GitHub · 43 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. today First seen · 43 lines · 96 tokens per session scan A 9c62dc13dace

Subscribe to this mod's changes

sublinear-solver is a skill published in the GitHub repository ruvnet/sublinear-time-solver (92 stars, last pushed yesterday), licensed MIT. It adds 96 tokens to every session and 644 once invoked, about $0.0004 per session on Opus 5.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-11-06.

Related

sublinear-solver compared with skills from other repositories

sublinear-solver next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sublinear-solverruvnet/sublinear-time-solverSkill92yesterdayMITA96Claude Code, Codex
cqlib-kernelxi-zhao/OpenQuantumSkill71yesterdayMITA42Claude Code, Codex
qiskit-machine-learningxi-zhao/OpenQuantumSkill71yesterdayMITA51Claude Code, Codex
squlearn-learningxi-zhao/OpenQuantumSkill71yesterdayMITA41Claude Code, Codex
ml-experiment-reviewNeoXider/neoxider-mcp-hubSkill19d agoMITA0Claude Code, Codex
transfer-learnpregHosh/Solitarius-mcpSkill12mo agoApache-2.0A46Claude Code
deepspot-mK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA70Claude Code