Agent skill

Add Solver

by jolars in jolars/basin

Add one research-grounded numerical optimization solver to Basin, including its public API, state and math integration, backend tests, rustdoc references, and solver-catalog synchronization.

Apache-2.0Auto-check passed

Install Add Solver

skills CLI
$ npx skills add jolars/basin --skill add-solver -a claude-code

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

GitHub CLI
$ gh skill install jolars/basin add-solver --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/jolars/basin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/add-solver .claude/skills/add-solver && 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
add-solver
GitHub stars
124
Token cost
~2.5k tokens
SKILL.md length
1,231 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add one research-grounded numerical optimization solver to Basin, including its public API, state and math integration, backend tests, rustdoc references, and solver-catalog synchronization.

  • A new concrete solver
  • SKILL.md covers Establish the Algorithm, Design Tests First, Integrate with Basin and Document the Contract and…, plus 1 more section
  • Calls cargo
  • Not for routine fixes to an existing solver

What it does

Add Solver is an agent skill from jolars/basin. Add one research-grounded numerical optimization solver to Basin, including its public API, state and math integration, backend tests, rustdoc references, and solver-catalog synchronization. Use for a new concrete solver, not for routine fixes to an existing solver or a line-search component alone.

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

The repository describes itself as: Numerical optimization in Rust, with pluggable linear-algebra backends and WASM support. The licence is Apache-2.0.

When your agent uses it

  • A new concrete solver
  • Not for routine fixes to an existing solver
  • A line-search component alone

Example prompts

  • “/add-solver”

What it can do on your machine

Read from SKILL.md and the folder at commit 4e72a4a. 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

Add Solver loads about 2.5k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 1,231 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~2.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 jolars/basin at commit 4e72a4a, republished under its Apache-2.0 licence (© jolars). 1,231 words, ~2,500 tokens.

Download SKILL.mdSave it as .claude/skills/add-solver/SKILL.md (or your agent's skills folder).
name
add-solver
description
Add one research-grounded numerical optimization solver to Basin, including its public API, state and math integration, backend tests, rustdoc references, and solver-catalog synchronization. Use for a new concrete solver, not for routine fixes to an existing solver or a line-search component alone.

Add a Basin Solver

Implement one public solver per invocation and carry it through code, tests, documentation, and catalogue integration. Preserve the solver and variant the user requested. If no solver has been selected and the user has not delegated the choice, identify the missing choice before implementation; recommendations should be based on a concrete gap in Basin's current catalogue.

Establish the Algorithm

Read AGENTS.md, the relevant sections of CONTRIBUTING.md, crates/basin/src/core/solver.rs, and the closest existing solver before designing the change. Inspect the state and math traits the algorithm appears to need rather than assuming a new abstraction is necessary.

Research the algorithm from authoritative sources before writing production code:

  • Find at least one credible primary source: the original paper, an archival algorithm description, an official technical report, or an authoritative monograph treatment. Prefer both a paper and reference code when they exist.
  • Prefer author-maintained code, an ACM TOMS implementation, or a well-maintained research library as the executable reference. Record its exact version or commit and its license.
  • Lock down the named variant, equations, update ordering, defaults, convergence test, constraint model, and documented exceptional cases. Resolve material disagreements between paper, pseudocode, and code before implementation.
  • Use reference code as an oracle only when it implements the requested variant completely and its outputs are legally and practically usable for comparison. Treat incomplete, materially different, or untrusted code as corroborating evidence, not an oracle. Do not copy or vendor code with an unclear or incompatible license.
  • When no usable executable oracle exists, implement independently from the primary equations and state transitions. Replace trajectory parity with analytical or paper-backed invariants and, where applicable, exhaustive decision-table tests. Record why parity was omitted.
  • Put downloaded papers and external source trees under the gitignored references/ directory. Commit only durable, license-compatible artifacts needed by tests, such as compact output fixtures and their regeneration driver or instructions.

If neither a credible algorithm source nor a trustworthy executable reference can be found, explain the evidence gap before presenting the implementation as research-based. Cite the sources that actually guided the code—do not borrow a nearby citation merely because it is conventional.

Before coding, settle these design facts: public type and constructor, required problem traits, constraint support, state shape, minimum math capabilities, claimed backends, scalar genericity, solver-specific controls, and the test oracle. Raise a breaking public-API requirement rather than quietly changing an existing signature or trait contract.

Design Tests First

Start with focused tests that fail for the missing solver. Exercise the public Executor path, not only private kernels. Choose tests in proportion to the algorithm, including:

  • an analytic benchmark with a known solution or other paper-backed invariant;
  • deterministic reference or trajectory parity when usable reference code exists—compare only invariants the two implementations should genuinely share;
  • initialization and one-step invariants, including consistency among the current parameter, cost, derivative data, and evaluation counts;
  • constraints, degeneracies, invalid configuration, and non-finite behavior relevant to the algorithm;
  • deterministic seeds and reproducible trajectories for stochastic methods;
  • all four dense backends (Vec, nalgebra, ndarray, and faer) for vector-based solvers, with both f32 and f64, plus every claimed sparse backend, using scale-appropriate approximate comparisons; and
  • f32 round-trip coverage when the new public surface stores or exposes a scalar-valued state.

Scalar algorithms do not require a linear-algebra backend.

For a solver that wraps or orchestrates an existing solver, concentrate new tests on the outer algorithm: state transfer, restart or phase decisions, evaluation accounting, and end-to-end behavior. Do not duplicate unchanged inner-solver mechanics, but retain at least one public-path test proving that the composition works.

Keep parity fixtures small and document their provenance, locked inputs, comparison tolerances, and regeneration procedure in crates/basin/tests/fixtures/README.md. Do not demand floating-point-identical trajectories when algebraic ordering or a legitimate variant differs.

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

Integrate with Basin

Put the solver in crates/basin/src/solver/<snake_case>.rs; use sibling files under solver/<snake_case>/ for a substantial implementation and never add mod.rs. Follow the closest solver's public shape where the research does not dictate a difference.

  • Reuse an existing state when it honestly represents the iterate and solver history. Add a state only for a genuinely new shape, keep its fields pub(crate), expose data through the appropriate traits, and carry F: Scalar with an F = f64 default through scalar-valued public types.
  • Implement the Solver lifecycle exactly. init must seed every field that termination criteria or next_iter can read at iteration zero. Each successful step must return mutually consistent current state. Use terminate for clean current-state convergence, return a TerminationReason for mid-step soft stops, and propagate the user's typed problem error for hard aborts.
  • Route all objective and derivative evaluations through Problem; never maintain evaluation counters by hand. Use batch evaluation where the algorithm has independent points, while preserving deterministic ordering.
  • Keep generic budgets and tolerances in the shared termination layer. Put only controls peculiar to the algorithm on the solver.
  • Keep constraints on the problem side and bound the solver on the precise constraint traits it supports.
  • Bound only the math capabilities the method needs. Keep first-order and derivative-free methods on the universal vector tier when possible; add a linalg capability only when every dense backend can provide the real operation in pure Rust without a fake fallback. Implement missing dense capabilities in the same change. Sparse support is optional and must be documented separately.
  • Use Basin's RNG infrastructure and an explicit seed for stochastic methods. Gate parallel execution behind the existing parallel feature and preserve reproducibility across serial and parallel evaluation.
  • Preserve the default wasm32-unknown-unknown build. Avoid new dependencies when existing math traits suffice; assess the MSRV, WASM support, feature semantics, and license before adding any dependency.

Add the module and re-export in crates/basin/src/solver.rs, then re-export the public solver—and any state or strategy users must name—from crates/basin/src/lib.rs. Keep the addition semver-compatible. Update a matching TODO.md item if one exists; do not reorganize unrelated TODOs.

Document the Contract and Evidence

The solver rustdoc should explain the implemented variant, essential update rule, configuration, caller and state requirements, termination behavior, numerical safeguards, and a runnable public example. Include a # Backends section whose claims are verified by tests. Give complete research references, including DOI or stable source URL when available, and identify the reference implementation and version when parity was used.

Synchronize web/src/routes/docs/solvers/+page.svx in the same change:

  • add the solver to the appropriate prose family with the same reference;
  • use the canonical docs.rs URL containing the defining snake-case module;
  • keep backend notes consistent with the rustdoc # Backends claim; and
  • place caveats about custom strategies or inner solvers beside the relevant solver entry.

The catalogue must still equal the solver re-exports in crates/basin/src/lib.rs. Do not expand the visualizer or add unrelated web pages unless the user requested that work.

Verify

Run focused tests during development, followed by the repository checks that a new default-path solver requires:

text
cargo fmt --all -- --check
cargo test -p basin --features nalgebra_latest,ndarray_latest,faer_latest,problems,parallel
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo doc --no-deps -p basin --features nalgebra_latest-lapack,ndarray_latest-blas,faer_latest,parallel,problems,serde
cargo build --target wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown --no-default-features

Because the solver catalogue changes, run from web/:

text
pnpm format:check
pnpm lint
pnpm check
pnpm build

Do not substitute a bare cargo test --all-features; the repository intentionally needs an explicit BLAS/LAPACK provider to link that matrix. Report the research basis and variant, implementation and public-surface changes, backend coverage, parity status, and every verification result. Distinguish failures caused by the change from pre-existing or environment failures. Attempt every required check, but do not broaden the task merely to repair an unrelated baseline failure. If a repository-wide check fails only in untouched files, confirm that fact from the diff and with the narrow checks that cover the changed area. Report the failing command and evidence accurately—a pre-existing failure is neither a regression nor a passing check.

© jolars, 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 .codex/skills/add-solver of jolars/basin.

Open the folder on GitHubat commit 4e72a4a

Compare with similar skills

Add Solver 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.

Add Solver compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Solver this skilljolars/basin124—~2.5kAutomated safety check: PassApache-2.0
Basincloudflare/skills3k1 repos~684Automated safety check: PassApache-2.0
Solveratopile/atopile4k—~2.3kAutomated safety check: PassMIT
Grounded CitationsNousResearch/hermes-agent252k—~3.1kAutomated safety check: PassMIT
Numerical Integrationparcadei/Continuous-Claude-v33.9k1 repos~948Automated safety check: NotesMIT
Grounded Vaultwshobson/agents40k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Basin

    cloudflare/skills

    Official

    Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL.

    3k GitHub starsUsed in 1 repo~684 tokens
    DatabasesAuto-check passed
  • Solver

    atopile/atopile

    How the Faebryk parameter solver works (Sets/Literals, Parameters, Expressions), the core invariants enforced during mutation, and practical workflows for debugging and extending the solver.

    4k GitHub stars~2.3k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Grounded Citations

    NousResearch/hermes-agent

    Attaches a numbered, URL-backed citation to every outside fact in an answer or document, rejecting quotes that aren't real.

    252k GitHub stars~3.1k tokensUpdated today
    Research & ScienceAuto-check passed
  • Numerical Integration

    parcadei/Continuous-Claude-v3

    Problem-solving strategies for numerical integration in numerical methods

    3.9k GitHub starsUsed in 1 repo~948 tokens
    Research & ScienceAuto-check: notes
  • Grounded Vault

    wshobson/agents

    A skill your agent uses when maintaining a durable Markdown knowledge store that agents compile from sources, when every number or quote in a wiki page must trace back to an immutable source, or…

    40k GitHub stars~1.4k tokensUpdated 4 days ago
    Knowledge ManagementAuto-check passed
  • Grounding

    gridaco/grida

    Establish what is actually true and current for the surface you are about to change — not just search.

    2.7k GitHub stars~1.1k tokensUpdated today
    Business, Finance & HRAuto-check passed

More from jolars/basin

  • Investigate performance in this Basin repository using its solver and backend benchmarks, competitor harnesses, evaluation accounting, and profiling tools.

    124 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed

Questions about Add Solver

What does Add Solver do?

Add one research-grounded numerical optimization solver to Basin, including its public API, state and math integration, backend tests, rustdoc references, and solver-catalog synchronization. Add Solver is an agent skill from jolars/basin. Add one research-grounded numerical optimization solver to Basin, including its public API, state and math integration, backend tests, rustdoc references, and solver-catalog synchronization.

When should I use Add Solver?

Add Solver fits situations like: A new concrete solver; not for routine fixes to an existing solver; A line-search component alone.

How do I install Add Solver in Claude Code?

Run `npx skills add jolars/basin --skill add-solver -a claude-code`. Or copy the skill folder (.codex/skills/add-solver in jolars/basin) into .claude/skills/add-solver in your project. Claude Code loads it when a task matches its description.

How do I install Add Solver in Codex?

Run `npx skills add jolars/basin --skill add-solver -a codex`. Or copy the skill folder (.codex/skills/add-solver in jolars/basin) into .agents/skills/add-solver in your project. Codex loads it when a task matches its description.

Can I use Add Solver 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 jolars/basin --skill add-solver -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-solver, .gemini/skills/add-solver, .github/skills/add-solver and .opencode/skills/add-solver in your project.

What does Add Solver need to run?

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

Does Add Solver 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 Add Solver 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 Add Solver use?

Add Solver 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 Add Solver use?

About 2.5k tokens (SKILL.md is roughly 10k 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 Add Solver?

Skills that share tags, products or a category with Add Solver: Basin (cloudflare/skills, 3k stars), Solver (atopile/atopile, 4k stars), Grounded Citations (NousResearch/hermes-agent, 252k stars) and Numerical Integration (parcadei/Continuous-Claude-v3, 3.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Solver?

jolars (a GitHub user) maintains it in jolars/basin, which has 124 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 8, 2026.

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