convex-optimization

convex-optimization is a skill for Claude Code from parcadei/Continuous-Claude-v3. It costs 13 tokens per session (943 once invoked), scanned A, original, MIT.

A guide to convex optimization, where the objective or allowed region has a shape that makes local best points global best points. It covers linear, quadratic, general convex, and semidefinite problems, plus KKT conditions and SciPy solvers.

In plain words
What is it for?
Use it to test convexity, convert problems into standard form, solve constrained convex problems, and verify solutions with SciPy or logical tools.
Why use it?
It helps classify an optimization problem and choose a suitable solver. It also provides checks for convexity, constraints, and whether the resulting solution is globally optimal.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it to test convexity, convert problems into standard form, solve constrained convex problems, and verify solutions with SciPy or logical tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/parcadei/continuous-claude-v3/convex-optimization
About the project

Continuous-Claude-v3 is a Claude Code development environment that preserves working context between sessions, coordinates specialized agents, and stores project knowledge through ledgers, handoffs, and analysis tools. It is for people using Claude Code on ongoing or complex software work. Its catalogue entries are the skills, agents, hooks, plugin, and setting that provide its workflows and orchestration.

parcadei/Continuous-Claude-v3 · 3,938 stars · on GitHub

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 parcadei/Continuous-Claude-v3 --skill convex-optimization
Clone the repo
git clone --depth 1 https://github.com/parcadei/Continuous-Claude-v3

Made for: Claude Code.

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 convex-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/parcadei/continuous-claude-v3/convex-optimization/github.svg)](https://agentmods.dev/skills/parcadei/continuous-claude-v3/convex-optimization)
Your own site
<a href="https://agentmods.dev/skills/parcadei/continuous-claude-v3/convex-optimization"><img src="https://agentmods.dev/badge/skills/parcadei/continuous-claude-v3/convex-optimization/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 convex-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/parcadei/continuous-claude-v3/convex-optimization"><img src="https://agentmods.dev/badge/skills/parcadei/continuous-claude-v3/convex-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 943 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 76
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
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.00013 $0.00943
Opus 5 $0.00006 $0.00472
Sonnet 5 $0.00003 $0.00189
Haiku 4.5 $0.00001 $0.00094

Measured 9d ago against content hash 2b726ee0abb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

convex-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 9d 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.

.claude/skills/math/optimization/convex-optimization/SKILL.md · 77 lines

How it starts

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

Convex Optimization

When to Use

Use this skill when working on convex-optimization problems in optimization.

Decision Tree

  1. Verify Convexity

    • Objective function: Hessian positive semidefinite?
    • Constraint set: intersection of convex sets?
    • z3_solve.py prove "hessian_psd"
  2. Problem Classification

    Type Solver
    Linear Programming scipy.optimize.linprog
    Quadratic Programming scipy.optimize.minimize(method='SLSQP')
    General Convex Interior point methods
    Semidefinite CVXPY with SDP solver
  3. Standard Form

    • minimize f(x) subject to g_i(x) <= 0, h_j(x) = 0
    • Convert max to min by negating
    • Convert >= to <= by negating
  4. KKT Conditions (Necessary & Sufficient)

    • Stationarity: grad L = 0
    • Primal feasibility: g_i(x) <= 0, h_j(x) = 0
    • Dual feasibility: lambda_i >= 0
    • Complementary slackness: lambda_i * g_i(x) = 0
    • z3_solve.py prove "kkt_conditions"
  5. Solve and Verify

    • scipy.optimize.minimize(f, x0, constraints=cons)
    • Check constraint satisfaction
    • Verify solution is global minimum (convex guarantees this)

Tool Commands

Scipy_Linprog

uv run python -c "from scipy.optimize import linprog; res = linprog([-1, -2], A_ub=[[1, 1], [2, 1]], b_ub=[4, 5]); print('Optimal:', -res.fun, 'at x=', res.x)"

Scipy_Minimize

uv run python -c "from scipy.optimize import minimize; res = minimize(lambda x: (x[0]-1)**2 + (x[1]-2)**2, [0, 0]); print('Minimum at', res.x)"

Z3_Kkt

uv run python -m runtime.harness scripts/z3_solve.py prove "kkt_conditions"

Key Techniques

From indexed textbooks:

  • [Additional Exercises for Convex Optimization (with] Finally, there are lots of methods that will do better than this, usually by taking this as a starting point and ‘polishing’ the result after that. Several of these have been shown to give fairly reliable, if modest, improvements. You were not required to implement any of these methods.
  • [Additional Exercises for Convex Optimization (with] K { X = x Ax yi } where e is the p-dimensional vector of ones. This is a polyhedron and thus a convex set. Rm has the form − The residual Aˆx − Describe a heuristic method for approximately solving this problem, using convex optimization.
  • [Additional Exercises for Convex Optimization (with] We then pick a small positive number , and a vector c cT x minimize subject to fi(x) 0, hi(x) = 0, f0(x) ≤ p + . There are dierent strategies for choosing c in these experiments. The simplest is to choose the c’s randomly; another method is to choose c to have the form ei, for i = 1, .
  • [Additional Exercises for Convex Optimization (with] We formulate the solution as the following bi-criterion optimization problem: (J ch, T ther) cmax, cmin, 0, minimize subject to c(t) c(t) a(k) ≤ ≥ t = 1, . T The key to this problem is to recognize that the objective T ther is quasiconvex. The problem as stated is convex for xed values of T ther.
  • [nonlinear programming_tif] Optimization Over a Convex Set** - Focuses on optimization problems constrained within a convex set. Optimality Conditions:** Similar to unconstrained optimization, but within the context of convex sets. Feasible Directions and Conditional Gradient** - Explores methods that ensure feasibility within constraints.

Read the full file on GitHub · 77 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. 9d ago First seen · 77 lines · 13 tokens per session scan A 2b726ee0abb8

Subscribe to this mod's changes

convex-optimization is a skill published in the GitHub repository parcadei/Continuous-Claude-v3 (3,938 stars, last pushed 7mo ago), licensed MIT. It adds 13 tokens to every session and 943 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

tooluniverse-organic-chemistry

Organic chemistry reasoning guide for reaction product prediction, mechanism analysis (electrophilic/nucleophilic substitution, addition, elimination, pericyclic, radical), and spectroscopy interpretation (1H/13C NMR, IR, MS). Reasons from first principles (electron flow, kinetic vs thermodynamic) rather than…

mims-harvard/ToolUniverse · 86 tokens

scaffold-exercises

Scaffold a graded problem set with sections, problems, worked solutions, and short "why this matters" explainers across analytical, empirical, and coding types. Use when user says "make a problem set on X", "scaffold exercises for this lecture", "create practice problems", "generate homework with a solution key"…

pedrohcgs/claude-code-my-workflow · 101 tokens

assess-holistic-health

Conduct temperament-based health assessment from Hildegard von Bingen's Causae et Curae. Evaluates the four temperaments (sanguine, choleric, melancholic, phlegmatic), elemental correspondences (air, fire, earth, water), and provides dietary and lifestyle recommendations for rebalancing. Use when understanding…

pjt222/agent-almanac · 113 tokens

analyze-prime-numbers

Analyze prime numbers using primality tests, factorization algorithms, prime distribution analysis, and sieve methods. Covers trial division, Miller-Rabin, Sieve of Eratosthenes, and the Prime Number Theorem. Use when determining whether an integer is prime or composite, finding prime factorizations, counting or…

pjt222/agent-almanac · 91 tokens

construct-geometric-figure

Perform a ruler-and-compass construction with step-by-step justification for each operation, producing a constructible geometric figure from given elements. Covers classical Euclidean constructions including perpendicular bisectors, angle bisectors, parallel lines, regular polygons, and tangent lines. Use when given…

pjt222/agent-almanac · 92 tokens

derive-theoretical-result

Derive a theoretical result step-by-step from first principles or established theorems, with every step explicitly justified and special cases checked. Use when deriving a formula or theorem from first principles, proving a mathematical statement by logical deduction, re-deriving a textbook result for verification or…

pjt222/agent-almanac · 86 tokens