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/verymath/ai4math-optimization/cdopt-optimizationnpx skills add VeryMath/AI4Math-Optimization --skill cdopt-optimizationgit clone --depth 1 https://github.com/VeryMath/AI4Math-OptimizationWhat 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 | $0.00080 | $0.02459 |
| Opus 5 | $0.00040 | $0.01229 |
| Sonnet 5 | $0.00016 | $0.00492 |
| Haiku 4.5 | $0.00008 | $0.00246 |
Grade A, and why
cdopt-optimization 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 yesterday.
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 — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CDOpt Optimization
Overview
Use this skill as a CDOpt-specific workflow extracted from the broader optimization skill. Keep the same core discipline: model first, run only after approval, and report from durable evidence.
The center is CDOpt and manifold-constrained optimization. If the problem is not a CDOpt or Riemannian/manifold workflow, say that and route to a broader optimization skill or repository-native solver path instead of forcing CDOpt.
Interaction
If a new session has not chosen a language, ask only:
Would you like to work in Chinese or English?
After the language is known, ask for the concrete CDOpt task or optimization problem directly. Do not begin with a long questionnaire.
Classify the task as one of these modes:
- Package validation: check whether CDOpt and its numerical stack are installed and usable.
- Smoke test: run the local manifold notebook suite or a tiny CPU-only CDOpt problem after approval.
- Problem modeling: turn a natural-language, LaTeX, paper, or official Problem Description card into a reviewed model.
- Code adaptation: study an official CDOpt example for reference, then adapt it only after the model has been reviewed.
- Comparison experiment: compare solvers, backends, or baselines only when the user asks for method selection, a report, or reproducibility evidence.
- Failure diagnosis: inspect dependency errors, API mismatches, solver status, feasibility, stationarity, or numerical warnings.
- Result interpretation: summarize saved JSON/log evidence, not just console snippets.
Workflow
- Read the task and identify whether CDOpt is actually appropriate.
- Before modeling, generating code, or running validation, create a task workspace under
outputs/{run_id}/. Put checkpoints, generated code, logs, JSON results, and summaries for this task under that directory. Use a short, stablerun_idsuch as2026-06-11-dictionary-learningorstiefel-backend-comparison. - For package validation, run:
What ships with it
21 files 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.
- agents/openai.yaml 285 B
- README.md 10 KB
- README.zh-CN.md 9.3 KB
- references/cdopt_official_examples.md 11 KB
- references/example_prompts.md 9.4 KB
- references/few_shots/cdopt_official_pairs.md 6.6 KB
- references/INDEX.md 3.9 KB
- references/problem-descriptions/bose-einstein-condensates.md 1.6 KB
- references/problem-descriptions/dictionary-learning-jax.md 1.7 KB
- references/problem-descriptions/dictionary-learning.md 1.8 KB
- references/problem-descriptions/kohn-sham-1d.md 1.7 KB
- references/problem-descriptions/lenet-orthogonal-jax.md 2.9 KB
- references/problem-descriptions/lenet-orthogonal-pytorch.md 3.1 KB
- references/problem-descriptions/lstm-constrained-pytorch.md 2.7 KB
- references/problem-descriptions/nearest-correlation.md 1.8 KB
- references/problem-descriptions/rnn-constrained-pytorch.md 2.8 KB
- references/problem-descriptions/symplectic-eigenvalue.md 1.6 KB
- scripts/check_cdopt_environment.py 2.9 KB runs code
- scripts/write_constrained_layer_runner.py 5.3 KB runs code
- scripts/write_constrained_rnn_runner.py 7.5 KB runs code
- scripts/write_stiefel_dictionary_runner.py 4.5 KB runs code
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.
- yesterday First seen · 225 lines · 80 tokens per session scan A f1dc52f7f9cf
cdopt-optimization is a skill published in the GitHub repository VeryMath/AI4Math-Optimization (5 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 2,459 once invoked, about $0.0004 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-31.
Other skills, from other repositories
math-beamer
Use when creating, revising, or auditing source-grounded mathematical Beamer slide decks from papers, notes, proofs, lectures, experiments, or existing LaTeX slides across pure mathematics, applied mathematics, computational mathematics, statistics, optimization, geometry, topology, algebra, number theory…
paper-writing
Use when drafting, revising, or auditing source-grounded mathematical paper text, including abstracts, introductions, related work, theorem exposition, experiment narratives, revision plans, and response letters.
latex-build-and-layout-audit
Use when checking LaTeX paper projects for compilation, latexmk logs, undefined references, citation issues, duplicate labels, macro/package hygiene, layout warnings, floats, arXiv, or venue compatibility.
proof-obligation-and-assumption-audit
Use when checking mathematical paper results for assumptions, quantifiers, domains, dependency fit, edge cases, external theorem use, proof coverage, or theorem-to-claim consistency.
claim-evidence-ledger
Use when auditing mathematical paper drafts for supported claims, missing citations, overclaims, proof status, experiment support, or source-to-text traceability.
paper-skeleton-and-logical-architecture
Use when turning mathematical notes, theorem statements, proof sketches, experiments, or reading outputs into a paper skeleton, section plan, result dependency map, or contribution architecture before prose drafting.