second-order-cone-programming

second-order-cone-programming is a skill for Claude Code, Codex from VeryMath/AI4Math-Optimization. It costs 111 tokens per session (3,070 once invoked), scanned A, original, MIT.

A tool for modelling and solving second-order cone programs (SOCPs), a class of optimisation problems that can express limits involving distances, sizes, and other square-root relationships.

In plain words
What is it for?
Use it for portfolio risk optimisation, robust optimisation, antenna calibration, filter design, and other problems that fit SOCP form or can be converted to it.
Why use it?
It helps solve optimisation problems that ordinary linear rules cannot describe directly, including certain risk and uncertainty constraints.

Skill for Claude CodeCodex

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

Good fit Use it for portfolio risk optimisation, robust optimisation, antenna calibration, filter design, and other problems that fit SOCP form or can be converted to it.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/verymath/ai4math-optimization/second-order-cone-programming
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 VeryMath/AI4Math-Optimization --skill second-order-cone-programming
Clone the repo
git clone --depth 1 https://github.com/VeryMath/AI4Math-Optimization

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 second-order-cone-programming

README.md
[![agentmods](https://agentmods.dev/badge/skills/verymath/ai4math-optimization/second-order-cone-programming/github.svg)](https://agentmods.dev/skills/verymath/ai4math-optimization/second-order-cone-programming)
Your own site
<a href="https://agentmods.dev/skills/verymath/ai4math-optimization/second-order-cone-programming"><img src="https://agentmods.dev/badge/skills/verymath/ai4math-optimization/second-order-cone-programming/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 second-order-cone-programming

Your own site · 80×15
<a href="https://agentmods.dev/skills/verymath/ai4math-optimization/second-order-cone-programming"><img src="https://agentmods.dev/badge/skills/verymath/ai4math-optimization/second-order-cone-programming.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,070 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00111 $0.03070
Opus 5.5 $0.00044 $0.01228
Sonnet 5.5 $0.00022 $0.00614
Haiku 4.5 $0.00011 $0.00307

Measured 28d ago against content hash b9a463a2a42a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

second-order-cone-programming 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 28d 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.

skills/second-order-cone-programming/SKILL.md · 254 lines

How it starts

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

二阶锥规划(Second-Order Cone Program, SOCP)求解

适用场景

  • 标准 SOCP:线性目标 + 二阶锥约束 ||A_i x + b_i||_2 <= d_i^T x + e_i
  • 可转化为 SOCP 的问题:二次约束(通过 Cholesky 分解)、分式目标(通过 Charnes-Cooper 变换)、概率约束(正态分布假设下)、Group Lasso 等
  • 投资组合优化:最小化风险、最大化夏普比率、鲁棒组合等
  • 鲁棒优化:椭球不确定集下的线性规划鲁棒对等
  • 工程优化:天线阵列校准、塑性极限分析、FIR 滤波器设计等

输入:可以是自然语言/应用题,也可以是已给的系数矩阵或 JSON。

Quick Start(先做这个)

按下面清单执行并在回答中保留结构。环境准备必须先于求解。

  • 求解器选择与环境准备:
    1. 本建模任务先确认问题类型为 SOCP,并明确用户或当前任务已选定的求解器后端
    2. 目标需要安装或配置时,将后端名称、cvxpy 接口、Python 环境及实际报错交给 ../or-solver/SKILL.md;该 skill 只配置指定目标
    3. 配置后由本任务继续求解;配置失败时,由本任务决定下一步,必要时走 GitHub 搜索路径
  • 路径判断:用户给的是自然语言描述、矩阵/JSON,还是要求从 GitHub 找代码
  • 求解器选择:优先使用可用求解器(COPT > Gurobi > MOSEK > CPLEX > CLARABEL > ECOS > SCS > CVXOPT > COSMO),无可用求解器时走 GitHub 搜索路径
  • 问题类型:是标准的 SOCP(锥约束),还是可转化为 SOCP 的问题
  • 输出重述(1-2 句)
  • 列变量/目标/约束(符号化)
  • 需要时提关键澄清问题,或明确写出假设
  • 给出求解结果(目标值 + 变量值)
  • 用 1-2 句解释业务含义

执行流程(三条路径)

flowchart LR
  A[Matrix_or_JSON]
  B[Natural_language]
  C[GitHub_search]
  A --> A1[Build_or_solve_socp_via_cvxpy]
  B --> B1[Restate]
  B1 --> B2[Clarify_or_assume]
  B2 --> B3[Symbolic_model]
  B3 --> B4[Model_with_cvxpy]
  B4 --> B5[Solve_and_report]
  A1 --> B5
  C --> C1[Search_GitHub_for_SOCP_code]
  C1 --> C2[Fetch_and_adapt_code]
  C2 --> C3[Run_and_report]

路径 A:已有矩阵或 JSON

  1. 核对维度:目标系数、约束矩阵、锥约束参数一致。
  2. 直接用 cvxpy 建模求解。

路径 B:自然语言 / 应用题

用户未给数字矩阵时,Agent 不要先索要 JSON。按下面交付物顺序推进:

步骤 内容
1. 重述 用一两句话复述题意,便于用户确认理解是否正确。
2. 符号化 变量表:名称、含义、单位(若有)、是否非负。目标:min 还是 max,线性式。约束:逐条写出,标明是线性约束还是锥约束。
3. 数值化 把符号模型写成 c、锥约束参数等;或用 cvxpy.Variable + cvxpy.SOC 直接建模。
4. 求解与回答 给出最优值、各变量取值;必要时用一句话解释经济/物理含义。

Read the full file on GitHub · 254 lines

Files

What ships with it

4 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.

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. 28d ago Changed · +3 lines · -3 tokens per session b9a463a2a42a
  2. 2mo ago Changed 315e18fc12b0
  3. 3mo ago First seen · 251 lines · 114 tokens per session scan A c6a14de5605f

Subscribe to this mod's changes

second-order-cone-programming is a skill published in the GitHub repository VeryMath/AI4Math-Optimization (12 stars, last pushed 29d ago), licensed MIT. It adds 111 tokens to every session and 3,070 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-08-31.

Related

second-order-cone-programming compared with skills from other repositories

second-order-cone-programming next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
second-order-cone-programmingVeryMath/AI4Math-OptimizationSkill1229d agoMITA111Claude Code, Codex
math-beamerVeryMath/AI4Math-WritingSkill1229d agoMITA100Codex
paper-writingVeryMath/AI4Math-WritingSkill1229d agoMITA40Claude Code, Codex
latex-build-and-layout-auditVeryMath/AI4Math-WritingSkill1229d agoMITA48Claude Code, Codex
paper-skeleton-and-logical-architectureVeryMath/AI4Math-WritingSkill1229d agoMITA45Claude Code, Codex
proof-obligation-and-assumption-auditVeryMath/AI4Math-WritingSkill1229d agoMITA43Claude Code, Codex
claim-evidence-ledgerVeryMath/AI4Math-WritingSkill1229d agoMITA35Claude Code, Codex