/vibe:skill-convexity-checkerfrom vibe
Determines if an optimization problem is convex and recommends the appropriate solver. Covers Hessian checks, composition rules, and common ML objective convexity.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
How to verify whether an optimization problem is convex, and what to do with the answer.
| Test | Applies to | Method |
|---|---|---|
| Second derivative >= 0 | Scalar functions f(x) | Compute f''(x). If f''(x) >= 0 for all x, convex. |
| Hessian is PSD | Multivariate functions f(x) | Compute H(x). If all eigenvalues >= 0 everywhere, convex. |
| Definition test | Any function | Check f(tx + (1-t)y) <= t*f(x) + (1-t)*f(y) for sampled x, y, t. |
| Composition rules | Composed functions | See composition table below. |
| Restriction to a line | Multivariate f | f is convex iff g(t) = f(x + tv) is convex in t for all x, v. |
| Operation | Result |
|---|---|
| f + g (both convex) | Convex |
| c * f (c > 0, f convex) | Convex |
| max(f, g) (both convex) | Convex |
| f(Ax + b) where f is convex | Convex |
| g(f(x)) where g is convex non-decreasing and f is convex | Convex |
| g(f(x)) where g is convex non-increasing and f is concave | Convex |
| sum of convex functions | Convex |
| pointwise supremum of convex functions | Convex |
| Objective | Convex? | Reason |
|---|---|---|
| MSE: (1/n) sum(y - Xw)^2 | Yes | Quadratic in w, Hessian = (2/n) X^T X is PSD |
| Logistic loss: sum(log(1 + exp(-y_i * w^T x_i))) | Yes | Sum of convex functions (log-sum-exp family) |
| Hinge loss: sum(max(0, 1 - y_i * w^T x_i)) | Yes | Max of convex (linear) functions |
| L2 regularization: lambda * ||w||^2 | Yes | Quadratic, Hessian = 2lambdaI |
| L1 regularization: lambda * ||w||_1 | Yes | Sum of absolute values (convex but not differentiable) |
| Ridge regression: MSE + L2 | Yes | Sum of two convex functions |
| LASSO: MSE + L1 | Yes | Sum of two convex functions |
| Elastic net: MSE + L1 + L2 | Yes | Sum of convex functions |
| SVM (primal): hinge + L2 | Yes | Sum of convex functions |
| Cross-entropy with softmax | Yes (in logits) | Log-sum-exp is convex |
| Neural network (any loss) | No | Nonlinear activations create non-convex composition |
| k-means objective | No | Discrete assignment step |
| Matrix factorization: ||X - UV^T||^2 | No | Bilinear in U and V |
| GAN loss | No | Minimax, non-convex in generator |
| Contrastive loss (InfoNCE) | No | Log of ratio of exponentials with negative samples |
| Problem type | Solver | Convergence guarantee |
|---|---|---|
| Convex, smooth, unconstrained | Gradient descent | O(1/k) to global minimum |
| Convex, smooth, unconstrained | L-BFGS | Superlinear to global minimum |
| Convex, smooth, unconstrained | Newton's method | Quadratic near minimum (if Hessian tractable) |
| Convex, smooth, constrained | Interior point method | Polynomial time |
| Convex, non-smooth (L1) | Proximal gradient / ISTA | O(1/k) to global minimum |
| Convex, non-smooth (L1) | ADMM | Flexible, handles constraints |
| Convex, quadratic | Conjugate gradient | Exact in n steps |
| Non-convex, smooth | SGD / Adam | Converges to local minimum |
| Non-convex, smooth | SGD + restarts | Better local minimum on average |
| Non-convex, smooth | Overparameterize + SGD | Flat minima, good generalization |
1. Write out the objective: minimize f(w) subject to constraints
2. For each term in f(w):
- Is it quadratic with PSD matrix? -> Convex
- Is it a norm? -> Convex
- Is it log-sum-exp? -> Convex
- Does it involve w nonlinearly (sigmoid(w), w1*w2)? -> Likely non-convex
3. Are all constraints linear or convex inequalities?
4. If ALL terms are convex and constraints are convex/linear -> problem is convex
5. If ANY term is non-convex -> problem is non-convex
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job