V0.1.0
Agent Skill for constrained optimization via ALM/ADMM/KKT — with adversarial guards, COOP cross-skill protocol, and 20k-sim validated parameters
npx -y skills add Sliky1/lagrangian-skills --skill v0.1.0Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Augmented Lagrangian method for constrained optimization. Handles convex QP, smooth NLP, and basic non-convex problems. Trigger on: constrained optimization, KKT conditions, Lagrange multipliers, penalty methods, equality/inequality constraints.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.1 KB, as published. Nobody here has run it
Lagrangian Core Skill — v0.1.0
能力边界
支持: 凸QP | 光滑NLP | 基础非凸NLP 不支持: 分布式 | Safe RL | 多目标 | 贝叶斯混合
核心方法: 增广拉格朗日法 (ALM)
目标: min f(x) s.t. h(x)=0, g(x)≤0
L_ρ = f(x) + Σλ·h(x) + Σμ·g(x) + ρ/2·||h||²
求解步骤:
- 初始化 x₀, λ₀, μ₀, ρ₀=1.0
- 内层: min_x L_ρ(x, λ, μ) → x*
- 更新乘子: λ ← λ + ρ·h(x*), μ ← max(0, μ + ρ·g(x*))
- 更新惩罚: ρ ← 1.5ρ if ||h||>tol
- 收敛判断: ||h(x*)||<1e-6 且 ||∇L||<1e-6
KKT条件验证
∇f + Σλ∇h + Σμ∇g = 0 h(x*) = 0, g(x*) ≤ 0 μ ≥ 0, μ·g(x*) = 0
失败处理
输出: 错误类型 + 一行说明
输出格式
最优解 x* → 目标值 f(x*) → KKT残差 → 约束状态