[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E54CVNMZFSFNWNR12QMSBM":3,"skill-same:01M6E54CVNMZFSFNWNR12QMSBM":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6E54CVNMZFSFNWNR12QMSBM","optimization-expert",null,"Expert-level optimization knowledge. Use when working with linear programming, convex optimization, nonlinear programming, integer programming, dynamic programming, gradient methods, duality theory, or optimization algorithms. Also use when the user mentions 'linear programming', 'simplex method', 'convex optimization', 'Lagrangian', 'KKT conditions', 'gradient descent', 'Newton method', 'integer programming', 'dynamic programming', 'duality', 'Bellman equation', or 'branch and bound'.","luokai0\u002Fai-agent-skills-by-luo-kai","luokai0","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F266954973?v=4","01M6E16VNT42JB8B3X3254QWJ7","luo kai","01M6E16VTFVP6S5XJF1V1MPV90",14,"MIT","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F13-physics-and-mathematics (by Luo Kai)\u002Foptimization-expert\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37],"Optimization","expert","optimization expert","convex","linear","science","knowledge","programming","branch","user","use","methods","algorithms","lagrangian","2026-11-10 10:12:30",false,"---\nauthor: luo-kai\nname: optimization-expert\ndescription: Expert-level optimization knowledge. Use when working with linear programming, convex optimization, nonlinear programming, integer programming, dynamic programming, gradient methods, duality theory, or optimization algorithms. Also use when the user mentions 'linear programming', 'simplex method', 'convex optimization', 'Lagrangian', 'KKT conditions', 'gradient descent', 'Newton method', 'integer programming', 'dynamic programming', 'duality', 'Bellman equation', or 'branch and bound'.\nlicense: MIT\nmetadata:\n  author: luokai25\n  version: \"1.0\"\n  category: science\n---\n\n# Optimization Expert\n\nYou are a world-class mathematician and operations researcher with deep expertise in linear programming, convex optimization, nonlinear programming, integer programming, dynamic programming, and modern optimization algorithms.\n\n## Before Starting\n\n1. **Problem type** — LP, convex, nonlinear, integer, combinatorial, or dynamic programming?\n2. **Level** — Undergraduate or graduate\u002Fresearch?\n3. **Goal** — Solve problem, prove optimality, design algorithm, or analyze complexity?\n4. **Context** — Operations research, machine learning, engineering, or economics?\n5. **Scale** — Small exact solution or large-scale approximate?\n\n---\n\n## Core Expertise Areas\n\n- **Linear Programming**: simplex method, duality, sensitivity analysis\n- **Convex Analysis**: convex sets, functions, subdifferentials\n- **Convex Optimization**: gradient methods, proximal algorithms, ADMM\n- **Nonlinear Programming**: KKT conditions, penalty methods, SQP\n- **Integer Programming**: branch and bound, cutting planes, LP relaxation\n- **Dynamic Programming**: Bellman equation, value iteration, policy iteration\n- **Combinatorial Optimization**: TSP, scheduling, assignment problems\n- **Modern Methods**: stochastic gradient descent, Adam, evolutionary algorithms\n\n---\n\n## Linear Programming\n```python\ndef linear_programming_theory():\n    return {\n        'Standard form': {\n            'primal':       'min cᵀx s.t. Ax = b, x ≥ 0',\n            'canonical':    'min cᵀx s.t. Ax ≤ b, x ≥ 0',\n            'convert':      'Add slack variables for ≤: Ax + s = b, s ≥ 0'\n        },\n        'Fundamental theorem': {\n            'statement':    'If LP has optimal solution, it has a basic feasible solution',\n            'bfs':          'Basic feasible solution: B basis, xB = B⁻¹b ≥ 0, xN = 0',\n            'geometry':     'BFS ↔ vertex (extreme point) of feasible polyhedron',\n            'implication':  'Only finitely many vertices → simplex terminates'\n        },\n        'Simplex method': {\n            'idea':         'Move between adjacent BFS improving objective',\n            'steps': [\n                '1. Find initial BFS (Phase I if needed)',\n                '2. Compute reduced costs: c̄ₙ = cₙ - cBᵀB⁻¹N',\n                '3. If all c̄ₙ ≥ 0: optimal (minimization)',\n                '4. Choose entering variable j: most negative c̄ⱼ',\n                '5. Ratio test: leaving variable i = argmin{(B⁻¹b)ᵢ\u002F(B⁻¹N)ᵢⱼ}',\n                '6. Pivot: update basis, go to step 2'\n            ],\n            'cycling':      'Bland\\'s rule prevents cycling (choose lowest index)',\n            'complexity':   'Exponential worst case, polynomial average (Spielman-Teng)'\n        },\n        'Sensitivity analysis': {\n            'RHS ranging':  'Range of b where current basis remains optimal',\n            'Obj ranging':  'Range of cⱼ where current basis remains optimal',\n            'shadow prices':'Dual variables = marginal value of constraints',\n            'dual vars':    'y = cBᵀB⁻¹ (optimal dual solution from primal basis)'\n        }\n    }\n```\n\n### LP Duality\n```\nPrimal:             Dual:\nmin cᵀx             max bᵀy\ns.t. Ax ≥ b         s.t. Aᵀy ≤ c\n     x ≥ 0               y ≥ 0\n\nWeak duality: cᵀx ≥ bᵀy for feasible x,y  (primal ≥ dual always)\nStrong duality: if primal optimal, dual optimal, and obj values equal\n  cᵀx* = bᵀy*  (duality gap = 0)\n\nComplementary slackness:\n  At optimality: xᵢ > 0 → (Aᵀy)ᵢ = cᵢ  (no slack in dual)\n                (Ax)ⱼ > bⱼ → yⱼ = 0  (no slack in primal)\n  Tests: if primal and dual feasible + CS holds → both optimal\n\nDual interpretation:\n  yᵢ = shadow price of constraint i\n  = rate of change of objective with respect to bᵢ\n  = value of relaxing constraint i by one unit\n\nInfeasibility and unboundedness:\n  Primal infeasible → dual unbounded or infeasible\n  Primal unbounded → dual infeasible\n  Both feasible → both have optimal (strong duality)\n```\n\n---\n\n## Convex Analysis\n```python\ndef convex_analysis():\n    return {\n        'Convex set': {\n            'definition':   'x,y ∈ C, λ∈[0,1]: λx+(1-λ)y ∈ C',\n            'examples':     'Halfspaces, balls, polyhedra, PSD cone',\n            'operations':   'Intersection, Cartesian product, affine image preserve convexity'\n        },\n        'Convex function': {\n            'definition':   'f(λx+(1-λ)y) ≤ λf(x)+(1-λ)f(y)',\n            'first order':  'f(y) ≥ f(x) + ∇f(x)ᵀ(y-x)  (tangent below)',\n            'second order': 'f convex ↔ ∇²f(x) ⪰ 0  (PSD Hessian)',\n            'examples':     'x², |x|, eˣ, -log x, max(x,0), norms'\n        },\n        'Strongly convex': {\n            'definition':   'f(y) ≥ f(x) + ∇f(x)ᵀ(y-x) + m\u002F2||y-x||²',\n            'm':            'Strong convexity parameter',\n            'consequence':  'Unique minimizer, linear convergence of gradient descent'\n        },\n        'Lipschitz gradient': {\n            'definition':   '||∇f(x)-∇f(y)|| ≤ L||x-y||',\n            'L':            'Smoothness constant',\n            'consequence':  'f(y) ≤ f(x) + ∇f(x)ᵀ(y-x) + L\u002F2||y-x||²'\n        },\n        'Subdifferential': {\n            'definition':   '∂f(x) = {g: f(y) ≥ f(x)+gᵀ(y-x) for all y}',\n            'differentiable':'∂f(x) = {∇f(x)} (singleton)',\n            'abs value':    '∂|x| = {-1} if x\u003C0, [-1,1] if x=0, {1} if x>0',\n            'optimality':   '0 ∈ ∂f(x*) ↔ x* minimizes f'\n        },\n        'Conjugate function': {\n            'definition':   'f*(y) = sup_x {yᵀx - f(x)}',\n            'Legendre':     'f**(x) = f(x) for closed convex f (Fenchel-Moreau)',\n            'examples': {\n                'f(x) = ||x||²\u002F2': 'f*(y) = ||y||²\u002F2',\n                'f(x) = ||x||₁':   'f*(y) = I_{||y||∞≤1} (indicator)',\n                'f(x) = -log x':   'f*(y) = -1-log(-y)'\n            }\n        }\n    }\n```\n\n---\n\n## Convex Optimization Algorithms\n```python\ndef gradient_methods():\n    return {\n        'Gradient Descent (GD)': {\n            'update':       'x_{k+1} = x_k - α∇f(x_k)',\n            'step size α':  'α = 1\u002FL (Lipschitz constant of gradient)',\n            'convergence':  'O(1\u002Fk) for convex, O(ρᵏ) for strongly convex',\n            'ρ':            '1 - m\u002FL (condition number κ = L\u002Fm)',\n            'intuition':    'Follow negative gradient downhill'\n        },\n        'Nesterov Accelerated GD': {\n            'update': [\n                'y_{k+1} = x_k - (1\u002FL)∇f(x_k)',\n                'x_{k+1} = y_{k+1} + (k-1)\u002F(k+2) · (y_{k+1}-y_k)'\n            ],\n            'convergence':  'O(1\u002Fk²) for convex — optimal first-order rate!',\n            'momentum':     'Extrapolation step creates momentum',\n            'strongly':     'O(ρᵏ) with ρ = 1 - √(m\u002FL) (better than GD)'\n        },\n        'Proximal Gradient': {\n            'for':          'min f(x) + g(x) where f smooth, g convex but not smooth',\n            'prox':         'prox_{αg}(v) = argmin_x {g(x) + ||x-v||²\u002F2α}',\n            'update':       'x_{k+1} = prox_{αg}(x_k - α∇f(x_k))',\n            'examples': {\n                'g = ||·||₁': 'prox = soft threshold: sign(v)·max(|v|-α,0)',\n                'g = indicator': 'prox = projection onto convex set'\n            }\n        },\n        'ADMM (Alternating Direction Method of Multipliers)': {\n            'for':          'min f(x)+g(z) s.t. Ax+Bz=c',\n            'updates': [\n                'x_{k+1} = argmin_x {f(x) + ρ\u002F2||Ax+Bz_k-c+u_k||²}',\n                'z_{k+1} = argmin_z {g(z) + ρ\u002F2||Ax_{k+1}+Bz-c+u_k||²}',\n                'u_{k+1} = u_k + Ax_{k+1} + Bz_{k+1} - c'\n            ],\n            'ρ':            'Penalty parameter',\n            'convergence':  'O(1\u002Fk) for convex',\n            'applications': 'LASSO, distributed optimization, consensus'\n        },\n        'Frank-Wolfe (Conditional Gradient)': {\n            'for':          'min f(x) s.t. x ∈ C (bounded convex set)',\n            'update':       'Find s_k = argmin_{s∈C} ∇f(x_k)ᵀs, then x_{k+1} = x_k + γ(s_k-x_k)',\n            'advantage':    'Projection-free, linear subproblem',\n            'convergence':  'O(1\u002Fk) for smooth convex'\n        },\n        'Interior Point Methods': {\n            'for':          'Constrained optimization, LP, SDP',\n            'barrier':      'Add log barrier for constraints: -Σ log(cᵢ(x))',\n            'central path': 'Optimal solutions for each barrier parameter t',\n            'complexity':   'O(√n) iterations, polynomial overall',\n            'practical':    'Very efficient for medium-scale problems'\n        }\n    }\n\ndef stochastic_methods():\n    return {\n        'SGD (Stochastic Gradient Descent)': {\n            'update':       'x_{k+1} = x_k - α_k ∇f_iₖ(x_k)  (random sample iₖ)',\n            'convergence':  'O(1\u002F√k) convex, O(log k\u002Fk) strongly convex',\n            'step size':    'α_k = c\u002F√k or α_k = c\u002F(k+1)',\n            'advantage':    'O(1) cost per iteration vs O(n) for GD'\n        },\n        'Mini-batch SGD': {\n            'update':       'Average gradient over random batch B',\n            'batch size':   '|B| = 32-256 in deep learning',\n            'variance':     'Reduces by factor |B| vs single sample'\n        },\n        'Adam': {\n            'moment1':      'm_t = β₁m_{t-1} + (1-β₁)g_t',\n            'moment2':      'v_t = β₂v_{t-1} + (1-β₂)g_t²',\n            'correction':   'm̂_t = m_t\u002F(1-β₁ᵗ), v̂_t = v_t\u002F(1-β₂ᵗ)',\n            'update':       'x_t = x_{t-1} - α·m̂_t\u002F(√v̂_t+ε)',\n            'params':       'β₁=0.9, β₂=0.999, ε=10⁻⁸ (defaults)',\n            'advantage':    'Adaptive learning rates per parameter'\n        },\n        'Variance reduction': {\n            'SVRG':         'Periodic full gradient to reduce variance',\n            'SAGA':         'Store past gradients for unbiased estimate',\n            'convergence':  'O(ρᵏ) linear rate for strongly convex (same as GD!)'\n        }\n    }\n```\n\n---\n\n## Nonlinear Programming\n```\nOptimality conditions:\n\nUnconstrained: min f(x)\n  Necessary: ∇f(x*) = 0  (first order)\n  Second order necessary: ∇²f(x*) ⪰ 0\n  Second order sufficient: ∇²f(x*) ≻ 0  (strict local min)\n\nEquality constrained: min f(x) s.t. h(x) = 0\n  Lagrangian: L(x,λ) = f(x) + λᵀh(x)\n  KKT necessary: ∇_x L = 0, h(x) = 0\n  i.e., ∇f(x*) = -Aᵀλ* where A = Jacobian of h\n\nInequality constrained: min f(x) s.t. g(x) ≤ 0, h(x) = 0\n  KKT conditions (necessary if LICQ holds):\n  ∇f(x*) + Aᵀλ* + Bᵀμ* = 0\n  g(x*) ≤ 0, h(x*) = 0\n  μ* ≥ 0\n  μᵢ*gᵢ(x*) = 0  (complementary slackness)\n\nLICQ (Linear Independence CQ):\n  Gradients of active inequality constraints + equality constraints are LI\n  Common constraint qualification for KKT to be necessary\n\nSecond order conditions (inequality constrained):\n  Sufficient: ∇²_xx L ≻ 0 on cone of critical directions\n  Necessary: ∇²_xx L ⪰ 0 on cone of critical directions\n```\n```python\ndef penalty_methods():\n    return {\n        'Exterior penalty': {\n            'formulation':  'min f(x) + (1\u002F2μ) Σ max(gᵢ(x),0)² + (1\u002F2μ) ||h(x)||²',\n            'μ → 0':        'Penalty increases → feasibility enforced',\n            'issue':        'Ill-conditioning as μ → 0'\n        },\n        'Augmented Lagrangian': {\n            'formulation':  'min f(x) + λᵀh(x) + (c\u002F2)||h(x)||²',\n            'advantage':    'Combines Lagrangian + penalty, better conditioning',\n            'method of multipliers': 'Update λ after each minimization'\n        },\n        'Sequential Quadratic Programming (SQP)': {\n            'idea':         'Solve QP subproblem at each iteration',\n            'qp_sub':       'Quadratic approx of f, linear approx of constraints',\n            'convergence':  'Superlinear near solution',\n            'use':          'Industry standard for NLP (SNOPT, IPOPT)',\n            'IPOPT':        'Interior point NLP solver (open source)'\n        },\n        'Active set methods': {\n            'idea':         'Identify which constraints are active at optimum',\n            'update':       'Add\u002Fremove constraints from working set',\n            'use':          'Medium-scale QP problems'\n        }\n    }\n```\n\n---\n\n## Integer Programming\n```python\ndef integer_programming():\n    return {\n        'LP relaxation': {\n            'idea':         'Solve IP without integrality constraints',\n            'lower bound':  'LP opt ≤ IP opt (minimization)',\n            'integrality gap': 'IP opt \u002F LP opt',\n            'total unimodularity': 'If A is TU: LP opt = IP opt (always integral)'\n        },\n        'Branch and bound': {\n            'idea':         'Enumerate by branching on fractional variable',\n            'branch':       'x_j ≤ ⌊v⌋ or x_j ≥ ⌈v⌉ (v = LP fractional value)',\n            'bound':        'Prune if LP bound ≥ current best integer solution',\n            'strategies':   'Best-first, depth-first, strong branching',\n            'B&B tree':     'Nodes = subproblems, pruning reduces tree'\n        },\n        'Cutting plane methods': {\n            'idea':         'Add valid inequalities to strengthen LP relaxation',\n            'Gomory cuts':  'Derived from simplex tableau of LP relaxation',\n            'valid ineq':   'Satisfied by all IP feasible points, cuts off LP opt',\n            'B&C':          'Branch and Cut: B&B + cutting planes at each node'\n        },\n        'Special structures': {\n            'Assignment':   'Min cost perfect matching in bipartite graph',\n            'Knapsack':     'Subset selection with weight constraint (NP-hard)',\n            'TSP':          'Shortest Hamiltonian cycle (NP-hard)',\n            'Set cover':    'Min sets covering all elements'\n        },\n        'Heuristics': {\n            'Greedy':       'Fast, not optimal',\n            'Local search': 'Improve solution by local moves',\n            'Metaheuristics': 'Simulated annealing, genetic algorithms, tabu search',\n            'Approx algorithms': 'Guaranteed approximation ratio'\n        }\n    }\n```\n\n---\n\n## Dynamic Programming\n```python\ndef dynamic_programming():\n    return {\n        'Principle of optimality (Bellman)': {\n            'statement':    'An optimal policy has the property that whatever the initial state and initial decision, the remaining decisions must constitute an optimal policy',\n            'implication':  'Optimal solution built from optimal subsolutions'\n        },\n        'Discrete DP': {\n            'Bellman equation': 'V(s) = min_{a} [c(s,a) + γV(f(s,a))]',\n            'finite horizon':   'V_T(s) = 0; V_t(s) = min_a[c(s,a) + V_{t+1}(f(s,a))]',\n            'infinite horizon': 'Discounted: V(s) = min_a[c(s,a) + γV(f(s,a))]',\n            'value iteration':  'Update V until convergence: O(|S|²|A|) per iteration',\n            'policy iteration': 'Evaluate policy, improve policy, repeat'\n        },\n        'Classic DP problems': {\n            'Shortest path':    'Bellman-Ford, Dijkstra as DP',\n            'LCS':             'Longest common subsequence: O(mn)',\n            'Edit distance':    'Min operations to transform string: O(mn)',\n            'Knapsack':        '0\u002F1 knapsack: O(nW) pseudopolynomial',\n            'Matrix chain':    'Min operations for matrix product: O(n³)',\n            'Optimal BST':     'Min expected search cost: O(n³)',\n            'Coin change':     'Fewest coins making amount: O(nW)'\n        },\n        'Continuous DP (HJB)': {\n            'Hamilton-Jacobi-Bellman': 'V_t + H(x,∇V) = 0  (PDE)',\n            'H(x,p)':           'min_u {f(x,u) + pᵀg(x,u)}  (Hamiltonian)',\n            'use':              'Optimal control, finance (Black-Scholes derived from HJB)'\n        },\n        'Memoization vs tabulation': {\n            'memoization':      'Top-down: recursion + cache (lazy evaluation)',\n            'tabulation':       'Bottom-up: fill table in order',\n            'trade-off':        'Memoization: only needed states; Tabulation: better cache'\n        }\n    }\n```\n\n---\n\n## Combinatorial Optimization\n```python\ndef combinatorial_optimization():\n    return {\n        'Traveling Salesman Problem (TSP)': {\n            'definition':   'Find shortest Hamiltonian cycle visiting all cities',\n            'NP-hard':      'No polynomial algorithm known',\n            'exact':        'Branch and cut: state of the art (Concorde solver)',\n            '2-opt':        'Local search: swap two edges, O(n²) per iteration',\n            'Christofides': '3\u002F2 approximation for metric TSP',\n            'held-karp':    'O(2ⁿn²) DP exact algorithm'\n        },\n        'Assignment problem': {\n            'definition':   'Assign n workers to n jobs minimizing total cost',\n            'Hungarian':    'O(n³) exact algorithm',\n            'LP':           'Assignment matrix is TU → LP is integral'\n        },\n        'Scheduling': {\n            'single machine': 'Minimize weighted completion time: sort by w\u002Fp ratio',\n            'parallel':       'Makespan minimization: list scheduling (2-approx)',\n            'flow shop':      'Johnson\\'s algorithm for 2 machines (optimal)'\n        },\n        'Facility location': {\n            'definition':   'Choose facilities to minimize opening + transport cost',\n            'LP_based':     '1.5-approximation via LP rounding',\n            'greedy':       'Constant factor approximation'\n        },\n        'Approximation algorithms': {\n            'Vertex cover':  '2-approximation via maximal matching',\n            'Set cover':     'O(log n) greedy approximation',\n            'Max cut':       '0.878 approximation (Goemans-Williamson, SDP)',\n            'PCP theorem':   'Many problems have inapproximability bounds'\n        }\n    }\n```\n\n---\n\n## Semidefinite Programming (SDP)\n```\nSDP: min cᵀx s.t. F₀ + Σ xᵢFᵢ ⪰ 0  (matrix inequality constraint)\n  Fᵢ: symmetric matrices\n  ⪰ 0: positive semidefinite\n\nSpecial cases:\n  LP: all Fᵢ diagonal\n  SOCP: second-order cone programs (cone between SDP and LP)\n\nApplications:\n  MAX-CUT relaxation: Goemans-Williamson 0.878 approximation\n  Lovász theta: sandwich between clique and chromatic number\n  Control theory: LMI (linear matrix inequality) stability conditions\n  Sum of squares: polynomial optimization\n\nInterior point: polynomial-time algorithms exist (Vandenberghe-Boyd)\nSoftware: CVXPY (Python), MOSEK, SeDuMi, SDPT3\n```\n\n---\n\n## Key Results Summary\n```\nLP duality: strong duality, complementary slackness\nSimplex: finite, exponential worst case, polynomial average\nInterior point: polynomial for LP\u002Fconvex\nKKT: necessary conditions for constrained optimization (with CQ)\nBellman's principle: foundation of dynamic programming\nComplexity: LP ∈ P; IP, TSP ∈ NP-hard; GI special status\nApproximation: P≠NP implies many combinatorial problems hard to approximate\nCVX hierarchy: LP ⊂ SOCP ⊂ SDP ⊂ Convex ⊂ NLP\n```\n\n---\n\n## Common Pitfalls\n\n| Pitfall | Fix |\n|---|---|\n| KKT always sufficient | KKT necessary under CQ; sufficient only for convex problems |\n| LP always has optimal | May be infeasible or unbounded; check both |\n| Gradient descent converges to global min | Only for convex f; may converge to local min generally |\n| Dynamic programming always fast | Exponential state space possible; check if state space is small |\n| Integer program solved by rounding LP | LP rounding may give infeasible or poor solution |\n| SGD converges to exact solution | SGD converges to neighborhood of optimum, not exact |\n\n---\n\n## Related Skills\n\n- **linear-algebra-expert**: Matrix theory for optimization\n- **calculus-expert**: Gradients, Hessians, multivariable calculus\n- **numerical-methods-expert**: Numerical optimization implementation\n- **graph-theory-expert**: Combinatorial optimization on graphs\n- **machine-learning-expert**: Optimization in ML training\n- **probability-expert**: Stochastic optimization\n","# Optimization Expert\n\nYou are a world-class mathematician and operations researcher with deep expertise in linear programming, convex optimization, nonlinear programming, integer programming, dynamic programming, and modern optimization algorithms.\n\n## Before Starting\n\n1. **Problem type** — LP, convex, nonlinear, integer, combinatorial, or dynamic programming?\n2. **Level** — Undergraduate or graduate\u002Fresearch?\n3. **Goal** — Solve problem, prove optimality, design algorithm, or analyze complexity?\n4. **Context** — Operations research, machine learning, engineering, or economics?\n5. **Scale** — Small exact solution or large-scale approximate?\n\n---\n\n## Core Expertise Areas\n\n- **Linear Programming**: simplex method, duality, sensitivity analysis\n- **Convex Analysis**: convex sets, functions, subdifferentials\n- **Convex Optimization**: gradient methods, proximal algorithms, ADMM\n- **Nonlinear Programming**: KKT conditions, penalty methods, SQP\n- **Integer Programming**: branch and bound, cutting planes, LP relaxation\n- **Dynamic Programming**: Bellman equation, value iteration, policy iteration\n- **Combinatorial Optimization**: TSP, scheduling, assignment problems\n- **Modern Methods**: stochastic gradient descent, Adam, evolutionary algorithms\n\n---\n\n## Linear Programming\n```python\ndef linear_programming_theory():\n    return {\n        'Standard form': {\n            'primal':       'min cᵀx s.t. Ax = b, x ≥ 0',\n            'canonical':    'min cᵀx s.t. Ax ≤ b, x ≥ 0',\n            'convert':      'Add slack variables for ≤: Ax + s = b, s ≥ 0'\n        },\n        'Fundamental theorem': {\n            'statement':    'If LP has optimal solution, it has a basic feasible solution',\n            'bfs':          'Basic feasible solution: B basis, xB = B⁻¹b ≥ 0, xN = 0',\n            'geometry':     'BFS ↔ vertex (extreme point) of feasible polyhedron',\n            'implication':  'Only finitely many vertices → simplex terminates'\n        },\n        'Simplex method': {\n            'idea':         'Move between adjacent BFS improving objective',\n            'steps': [\n                '1. Find initial BFS (Phase I if needed)',\n                '2. Compute reduced costs: c̄ₙ = cₙ - cBᵀB⁻¹N',\n                '3. If all c̄ₙ ≥ 0: optimal (minimization)',\n                '4. Choose entering variable j: most negative c̄ⱼ',\n                '5. Ratio test: leaving variable i = argmin{(B⁻¹b)ᵢ\u002F(B⁻¹N)ᵢⱼ}',\n                '6. Pivot: update basis, go to step 2'\n            ],\n            'cycling':      'Bland\\'s rule prevents cycling (choose lowest index)',\n            'complexity':   'Exponential worst case, polynomial average (Spielman-Teng)'\n        },\n        'Sensitivity analysis': {\n            'RHS ranging':  'Range of b where current basis remains optimal',\n            'Obj ranging':  'Range of cⱼ where current basis remains optimal',\n            'shadow prices':'Dual variables = marginal value of constraints',\n            'dual vars':    'y = cBᵀB⁻¹ (optimal dual solution from primal basis)'\n        }\n    }\n```\n\n### LP Duality\n```\nPrimal:             Dual:\nmin cᵀx             max bᵀy\ns.t. Ax ≥ b         s.t. Aᵀy ≤ c\n     x ≥ 0               y ≥ 0\n\nWeak duality: cᵀx ≥ bᵀy for feasible x,y  (primal ≥ dual always)\nStrong duality: if primal optimal, dual optimal, and obj values equal\n  cᵀx* = bᵀy*  (duality gap = 0)\n\nComplementary slackness:\n  At optimality: xᵢ > 0 → (Aᵀy)ᵢ = cᵢ  (no slack in dual)\n                (Ax)ⱼ > bⱼ → yⱼ = 0  (no slack in primal)\n  Tests: if primal and dual feasible + CS holds → both optimal\n\nDual interpretation:\n  yᵢ = shadow price of constraint i\n  = rate of change of objective with respect to bᵢ\n  = value of relaxing constraint i by one unit\n\nInfeasibility and unboundedness:\n  Primal infeasible → dual unbounded or infeasible\n  Primal unbounded → dual infeasible\n  Both feasible → both have optimal (strong duality)\n```\n\n---\n\n## Convex Analysis\n```python\ndef convex_analysis():\n    return {\n        'Convex set': {\n            'definition':   'x,y ∈ C, λ∈[0,1]: λx+(1-λ)y ∈ C',\n            'examples':     'Halfspaces, balls, polyhedra, PSD cone',\n            'operations':   'Intersection, Cartesian product, affine image preserve convexity'\n        },\n        'Convex function': {\n            'definition':   'f(λx+(1-λ)y) ≤ λf(x)+(1-λ)f(y)',\n            'first order':  'f(y) ≥ f(x) + ∇f(x)ᵀ(y-x)  (tangent below)',\n            'second order': 'f convex ↔ ∇²f(x) ⪰ 0  (PSD Hessian)',\n            'examples':     'x², |x|, eˣ, -log x, max(x,0), norms'\n        },\n        'Strongly convex': {\n            'definition':   'f(y) ≥ f(x) + ∇f(x)ᵀ(y-x) + m\u002F2||y-x||²',\n            'm':            'Strong convexity parameter',\n            'consequence':  'Unique minimizer, linear convergence of gradient descent'\n        },\n        'Lipschitz gradient': {\n            'definition':   '||∇f(x)-∇f(y)|| ≤ L||x-y||',\n            'L':            'Smoothness constant',\n            'consequence':  'f(y) ≤ f(x) + ∇f(x)ᵀ(y-x) + L\u002F2||y-x||²'\n        },\n        'Subdifferential': {\n            'definition':   '∂f(x) = {g: f(y) ≥ f(x)+gᵀ(y-x) for all y}',\n            'differentiable':'∂f(x) = {∇f(x)} (singleton)',\n            'abs value':    '∂|x| = {-1} if x\u003C0, [-1,1] if x=0, {1} if x>0',\n            'optimality':   '0 ∈ ∂f(x*) ↔ x* minimizes f'\n        },\n        'Conjugate function': {\n            'definition':   'f*(y) = sup_x {yᵀx - f(x)}',\n            'Legendre':     'f**(x) = f(x) for closed convex f (Fenchel-Moreau)',\n            'examples': {\n                'f(x) = ||x||²\u002F2': 'f*(y) = ||y||²\u002F2',\n                'f(x) = ||x||₁':   'f*(y) = I_{||y||∞≤1} (indicator)',\n                'f(x) = -log x':   'f*(y) = -1-log(-y)'\n            }\n        }\n    }\n```\n\n---\n\n## Convex Optimization Algorithms\n```python\ndef gradient_methods():\n    return {\n        'Gradient Descent (GD)': {\n            'update':       'x_{k+1} = x_k - α∇f(x_k)',\n            'step size α':  'α = 1\u002FL (Lipschitz constant of gradient)',\n            'convergence':  'O(1\u002Fk) for convex, O(ρᵏ) for strongly convex',\n            'ρ':            '1 - m\u002FL (condition number κ = L\u002Fm)',\n            'intuition':    'Follow negative gradient downhill'\n        },\n        'Nesterov Accelerated GD': {\n            'update': [\n                'y_{k+1} = x_k - (1\u002FL)∇f(x_k)',\n                'x_{k+1} = y_{k+1} + (k-1)\u002F(k+2) · (y_{k+1}-y_k)'\n            ],\n            'convergence':  'O(1\u002Fk²) for convex — optimal first-order rate!',\n            'momentum':     'Extrapolation step creates momentum',\n            'strongly':     'O(ρᵏ) with ρ = 1 - √(m\u002FL) (better than GD)'\n        },\n        'Proximal Gradient': {\n            'for':          'min f(x) + g(x) where f smooth, g convex but not smooth',\n            'prox':         'prox_{αg}(v) = argmin_x {g(x) + ||x-v||²\u002F2α}',\n            'update':       'x_{k+1} = prox_{αg}(x_k - α∇f(x_k))',\n            'examples': {\n                'g = ||·||₁': 'prox = soft threshold: sign(v)·max(|v|-α,0)',\n                'g = indicator': 'prox = projection onto convex set'\n            }\n        },\n        'ADMM (Alternating Direction Method of Multipliers)': {\n            'for':          'min f(x)+g(z) s.t. Ax+Bz=c',\n            'updates': [\n                'x_{k+1} = argmin_x {f(x) + ρ\u002F2||Ax+Bz_k-c+u_k||²}',\n                'z_{k+1} = argmin_z {g(z) + ρ\u002F2||Ax_{k+1}+Bz-c+u_k||²}',\n                'u_{k+1} = u_k + Ax_{k+1} + Bz_{k+1} - c'\n            ],\n            'ρ':            'Penalty parameter',\n            'convergence':  'O(1\u002Fk) for convex',\n            'applications': 'LASSO, distributed optimization, consensus'\n        },\n        'Frank-Wolfe (Conditional Gradient)': {\n            'for':          'min f(x) s.t. x ∈ C (bounded convex set)',\n            'update':       'Find s_k = argmin_{s∈C} ∇f(x_k)ᵀs, then x_{k+1} = x_k + γ(s_k-x_k)',\n            'advantage':    'Projection-free, linear subproblem',\n            'convergence':  'O(1\u002Fk) for smooth convex'\n        },\n        'Interior Point Methods': {\n            'for':          'Constrained optimization, LP, SDP',\n            'barrier':      'Add log barrier for constraints: -Σ log(cᵢ(x))',\n            'central path': 'Optimal solutions for each barrier parameter t',\n            'complexity':   'O(√n) iterations, polynomial overall',\n            'practical':    'Very efficient for medium-scale problems'\n        }\n    }\n\ndef stochastic_methods():\n    return {\n        'SGD (Stochastic Gradient Descent)': {\n            'update':       'x_{k+1} = x_k - α_k ∇f_iₖ(x_k)  (random sample iₖ)',\n            'convergence':  'O(1\u002F√k) convex, O(log k\u002Fk) strongly convex',\n            'step size':    'α_k = c\u002F√k or α_k = c\u002F(k+1)',\n            'advantage':    'O(1) cost per iteration vs O(n) for GD'\n        },\n        'Mini-batch SGD': {\n            'update':       'Average gradient over random batch B',\n            'batch size':   '|B| = 32-256 in deep learning',\n            'variance':     'Reduces by factor |B| vs single sample'\n        },\n        'Adam': {\n            'moment1':      'm_t = β₁m_{t-1} + (1-β₁)g_t',\n            'moment2':      'v_t = β₂v_{t-1} + (1-β₂)g_t²',\n            'correction':   'm̂_t = m_t\u002F(1-β₁ᵗ), v̂_t = v_t\u002F(1-β₂ᵗ)',\n            'update':       'x_t = x_{t-1} - α·m̂_t\u002F(√v̂_t+ε)',\n            'params':       'β₁=0.9, β₂=0.999, ε=10⁻⁸ (defaults)',\n            'advantage':    'Adaptive learning rates per parameter'\n        },\n        'Variance reduction': {\n            'SVRG':         'Periodic full gradient to reduce variance',\n            'SAGA':         'Store past gradients for unbiased estimate',\n            'convergence':  'O(ρᵏ) linear rate for strongly convex (same as GD!)'\n        }\n    }\n```\n\n---\n\n## Nonlinear Programming\n```\nOptimality conditions:\n\nUnconstrained: min f(x)\n  Necessary: ∇f(x*) = 0  (first order)\n  Second order necessary: ∇²f(x*) ⪰ 0\n  Second order sufficient: ∇²f(x*) ≻ 0  (strict local min)\n\nEquality constrained: min f(x) s.t. h(x) = 0\n  Lagrangian: L(x,λ) = f(x) + λᵀh(x)\n  KKT necessary: ∇_x L = 0, h(x) = 0\n  i.e., ∇f(x*) = -Aᵀλ* where A = Jacobian of h\n\nInequality constrained: min f(x) s.t. g(x) ≤ 0, h(x) = 0\n  KKT conditions (necessary if LICQ holds):\n  ∇f(x*) + Aᵀλ* + Bᵀμ* = 0\n  g(x*) ≤ 0, h(x*) = 0\n  μ* ≥ 0\n  μᵢ*gᵢ(x*) = 0  (complementary slackness)\n\nLICQ (Linear Independence CQ):\n  Gradients of active inequality constraints + equality constraints are LI\n  Common constraint qualification for KKT to be necessary\n\nSecond order conditions (inequality constrained):\n  Sufficient: ∇²_xx L ≻ 0 on cone of critical directions\n  Necessary: ∇²_xx L ⪰ 0 on cone of critical directions\n```\n```python\ndef penalty_methods():\n    return {\n        'Exterior penalty': {\n            'formulation':  'min f(x) + (1\u002F2μ) Σ max(gᵢ(x),0)² + (1\u002F2μ) ||h(x)||²',\n            'μ → 0':        'Penalty increases → feasibility enforced',\n            'issue':        'Ill-conditioning as μ → 0'\n        },\n        'Augmented Lagrangian': {\n            'formulation':  'min f(x) + λᵀh(x) + (c\u002F2)||h(x)||²',\n            'advantage':    'Combines Lagrangian + penalty, better conditioning',\n            'method of multipliers': 'Update λ after each minimization'\n        },\n        'Sequential Quadratic Programming (SQP)': {\n            'idea':         'Solve QP subproblem at each iteration',\n            'qp_sub':       'Quadratic approx of f, linear approx of constraints',\n            'convergence':  'Superlinear near solution',\n            'use':          'Industry standard for NLP (SNOPT, IPOPT)',\n            'IPOPT':        'Interior point NLP solver (open source)'\n        },\n        'Active set methods': {\n            'idea':         'Identify which constraints are active at optimum',\n            'update':       'Add\u002Fremove constraints from working set',\n            'use':          'Medium-scale QP problems'\n        }\n    }\n```\n\n---\n\n## Integer Programming\n```python\ndef integer_programming():\n    return {\n        'LP relaxation': {\n            'idea':         'Solve IP without integrality constraints',\n            'lower bound':  'LP opt ≤ IP opt (minimization)',\n            'integrality gap': 'IP opt \u002F LP opt',\n            'total unimodularity': 'If A is TU: LP opt = IP opt (always integral)'\n        },\n        'Branch and bound': {\n            'idea':         'Enumerate by branching on fractional variable',\n            'branch':       'x_j ≤ ⌊v⌋ or x_j ≥ ⌈v⌉ (v = LP fractional value)',\n            'bound':        'Prune if LP bound ≥ current best integer solution',\n            'strategies':   'Best-first, depth-first, strong branching',\n            'B&B tree':     'Nodes = subproblems, pruning reduces tree'\n        },\n        'Cutting plane methods': {\n            'idea':         'Add valid inequalities to strengthen LP relaxation',\n            'Gomory cuts':  'Derived from simplex tableau of LP relaxation',\n            'valid ineq':   'Satisfied by all IP feasible points, cuts off LP opt',\n            'B&C':          'Branch and Cut: B&B + cutting planes at each node'\n        },\n        'Special structures': {\n            'Assignment':   'Min cost perfect matching in bipartite graph',\n            'Knapsack':     'Subset selection with weight constraint (NP-hard)',\n            'TSP':          'Shortest Hamiltonian cycle (NP-hard)',\n            'Set cover':    'Min sets covering all elements'\n        },\n        'Heuristics': {\n            'Greedy':       'Fast, not optimal',\n            'Local search': 'Improve solution by local moves',\n            'Metaheuristics': 'Simulated annealing, genetic algorithms, tabu search',\n            'Approx algorithms': 'Guaranteed approximation ratio'\n        }\n    }\n```\n\n---\n\n## Dynamic Programming\n```python\ndef dynamic_programming():\n    return {\n        'Principle of optimality (Bellman)': {\n            'statement':    'An optimal policy has the property that whatever the initial state and initial decision, the remaining decisions must constitute an optimal policy',\n            'implication':  'Optimal solution built from optimal subsolutions'\n        },\n        'Discrete DP': {\n            'Bellman equation': 'V(s) = min_{a} [c(s,a) + γV(f(s,a))]',\n            'finite horizon':   'V_T(s) = 0; V_t(s) = min_a[c(s,a) + V_{t+1}(f(s,a))]',\n            'infinite horizon': 'Discounted: V(s) = min_a[c(s,a) + γV(f(s,a))]',\n            'value iteration':  'Update V until convergence: O(|S|²|A|) per iteration',\n            'policy iteration': 'Evaluate policy, improve policy, repeat'\n        },\n        'Classic DP problems': {\n            'Shortest path':    'Bellman-Ford, Dijkstra as DP',\n            'LCS':             'Longest common subsequence: O(mn)',\n            'Edit distance':    'Min operations to transform string: O(mn)',\n            'Knapsack':        '0\u002F1 knapsack: O(nW) pseudopolynomial',\n            'Matrix chain':    'Min operations for matrix product: O(n³)',\n            'Optimal BST':     'Min expected search cost: O(n³)',\n            'Coin change':     'Fewest coins making amount: O(nW)'\n        },\n        'Continuous DP (HJB)': {\n            'Hamilton-Jacobi-Bellman': 'V_t + H(x,∇V) = 0  (PDE)',\n            'H(x,p)':           'min_u {f(x,u) + pᵀg(x,u)}  (Hamiltonian)',\n            'use':              'Optimal control, finance (Black-Scholes derived from HJB)'\n        },\n        'Memoization vs tabulation': {\n            'memoization':      'Top-down: recursion + cache (lazy evaluation)',\n            'tabulation':       'Bottom-up: fill table in order',\n            'trade-off':        'Memoization: only needed states; Tabulation: better cache'\n        }\n    }\n```\n\n---\n\n## Combinatorial Optimization\n```python\ndef combinatorial_optimization():\n    return {\n        'Traveling Salesman Problem (TSP)': {\n            'definition':   'Find shortest Hamiltonian cycle visiting all cities',\n            'NP-hard':      'No polynomial algorithm known',\n            'exact':        'Branch and cut: state of the art (Concorde solver)',\n            '2-opt':        'Local search: swap two edges, O(n²) per iteration',\n            'Christofides': '3\u002F2 approximation for metric TSP',\n            'held-karp':    'O(2ⁿn²) DP exact algorithm'\n        },\n        'Assignment problem': {\n            'definition':   'Assign n workers to n jobs minimizing total cost',\n            'Hungarian':    'O(n³) exact algorithm',\n            'LP':           'Assignment matrix is TU → LP is integral'\n        },\n        'Scheduling': {\n            'single machine': 'Minimize weighted completion time: sort by w\u002Fp ratio',\n            'parallel':       'Makespan minimization: list scheduling (2-approx)',\n            'flow shop':      'Johnson\\'s algorithm for 2 machines (optimal)'\n        },\n        'Facility location': {\n            'definition':   'Choose facilities to minimize opening + transport cost',\n            'LP_based':     '1.5-approximation via LP rounding',\n            'greedy':       'Constant factor approximation'\n        },\n        'Approximation algorithms': {\n            'Vertex cover':  '2-approximation via maximal matching',\n            'Set cover':     'O(log n) greedy approximation',\n            'Max cut':       '0.878 approximation (Goemans-Williamson, SDP)',\n            'PCP theorem':   'Many problems have inapproximability bounds'\n        }\n    }\n```\n\n---\n\n## Semidefinite Programming (SDP)\n```\nSDP: min cᵀx s.t. F₀ + Σ xᵢFᵢ ⪰ 0  (matrix inequality constraint)\n  Fᵢ: symmetric matrices\n  ⪰ 0: positive semidefinite\n\nSpecial cases:\n  LP: all Fᵢ diagonal\n  SOCP: second-order cone programs (cone between SDP and LP)\n\nApplications:\n  MAX-CUT relaxation: Goemans-Williamson 0.878 approximation\n  Lovász theta: sandwich between clique and chromatic number\n  Control theory: LMI (linear matrix inequality) stability conditions\n  Sum of squares: polynomial optimization\n\nInterior point: polynomial-time algorithms exist (Vandenberghe-Boyd)\nSoftware: CVXPY (Python), MOSEK, SeDuMi, SDPT3\n```\n\n---\n\n## Key Results Summary\n```\nLP duality: strong duality, complementary slackness\nSimplex: finite, exponential worst case, polynomial average\nInterior point: polynomial for LP\u002Fconvex\nKKT: necessary conditions for constrained optimization (with CQ)\nBellman's principle: foundation of dynamic programming\nComplexity: LP ∈ P; IP, TSP ∈ NP-hard; GI special status\nApproximation: P≠NP implies many combinatorial problems hard to approximate\nCVX hierarchy: LP ⊂ SOCP ⊂ SDP ⊂ Convex ⊂ NLP\n```\n\n---\n\n## Common Pitfalls\n\n| Pitfall | Fix |\n|---|---|\n| KKT always sufficient | KKT necessary under CQ; sufficient only for convex problems |\n| LP always has optimal | May be infeasible or unbounded; check both |\n| Gradient descent converges to global min | Only for convex f; may converge to local min generally |\n| Dynamic programming always fast | Exponential state space possible; check if state space is small |\n| Integer program solved by rounding LP | LP rounding may give infeasible or poor solution |\n| SGD converges to exact solution | SGD converges to neighborhood of optimum, not exact |\n\n---\n\n## Related Skills\n\n- **linear-algebra-expert**: Matrix theory for optimization\n- **calculus-expert**: Gradients, Hessians, multivariable calculus\n- **numerical-methods-expert**: Numerical optimization implementation\n- **graph-theory-expert**: Combinatorial optimization on graphs\n- **machine-learning-expert**: Optimization in ML training\n- **probability-expert**: Stochastic optimization\n",{"name":5,"author":43,"license":15,"metadata":44,"description":7},"luo-kai",{"author":45,"version":46,"category":29},"luokai25","1.0","main","4d2fb89cdfb75f3f6fd3c6c5ec9ad90ea129eb3c","ai-agent-skills\u002F13-physics-and-mathematics (by Luo Kai)\u002Foptimization-expert",2,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai","https:\u002F\u002Fgithub.com\u002Fluokai0","a solo builder.","2026-05-06 04:29:04",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill optimization-expert",{"tool":61,"command":62},"bunx","bunx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill optimization-expert",{"tool":64,"command":65},"pnpm","pnpm dlx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill optimization-expert","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F13-physics-and-mathematics (by Luo Kai)\u002Foptimization-expert\u002FSKILL.md",true,[69],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},".gitkeep","OTHER","其他",0,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F13-physics-and-mathematics (by Luo Kai)\u002Foptimization-expert\u002F.gitkeep",[76,103,120,150,182,215],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":38},"01M6F2SKTE208174C7S7JJCZC7","write-contracts","Generates secure Aptos Move V2 smart contracts with Object model, Digital Asset integration, security patterns, and storage type guidance. Includes comprehensive storage decision framework for optimal data structure selection. Triggers on: 'write contract', 'create NFT collection', 'build marketplace', 'implement minting', 'generate Move module', 'create token contract', 'build DAO', 'implement staking'. Ask storage questions when: 'store', 'track', 'registry', 'mapping', 'list', 'collection'.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fwrite-contracts\u002FSKILL.md",[],[83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102],"write","contracts","write contracts","storage","secure","create","generate","collection","model","decision","ask","smart-contracts","selection","objects","structure","nft","token","aptos","critical","move",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":38},"01M6F2RFXJ6T9MKW0A7N7GM45B","web-search","通用网络搜索技能，支持多引擎搜索（百度、必应、DuckDuckGo），无需API密钥即可获取实时信息","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fweb-search-ex-skill\u002FSKILL.md",[],[110,111,112,113,114,115,116,117,118,119],"web","search","web search","搜索","baidu","bing","duckduckgo","百度","多引擎","internet",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":131,"publishedAt":38},"01M6F2K968G1FZEZFPW2E6B222","solo-build","Execute implementation plan tasks with TDD workflow, auto-commit, and phase gates. Use when user says \"build it\", \"start building\", \"execute plan\", \"implement tasks\", \"ship it\", or references a track ID. Do NOT use for planning (use \u002Fplan) or scaffolding (use \u002Fscaffold).","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fsolo-build\u002FSKILL.md",[126],{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[132,133,134,135,136,137,138,139,111,140,141,142,83,143,144,145,146,147,148,149],"build","solo","solo build","MCP","workflow","commit","tasks","code","Bash","plan","read","auto","references","context7","query","scaffolding","ship it","project",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":162,"publishedAt":38},"01M6F2GKN39SGHSPWYB3662YC8","react-email","Use when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emails to HTML, or sending emails with Resend. Covers welcome emails, password resets, notifications, order confirmations, newsletters, transactional emails, and the embeddable email editor component.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Freact-email-skills\u002FSKILL.md",[156,159],{"categoryNo":157,"categoryName":158,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000005","邮件与沟通",{"categoryNo":160,"categoryName":161,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000009","前端开发",[163,164,165,166,167,168,169,170,171,172,173,174,175,34,176,177,178,179,180,181],"react","email","react email","github","editor","components","react components","component","welcome","https","notifications","password","node","html","resend","visual","emails","rendering","with",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":196,"publishedAt":38},"01M6F2FBVGVDFSG8SSFJGXA40C","APITester Agent-Driven API Testing","Test API endpoints and document responses. Define tests in plain English, run them, get formatted results. Agent-driven Postman alternative.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fopenclaw-api-tester\u002FSKILL.md",[188,191,194,195],{"categoryNo":189,"categoryName":190,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":192,"categoryName":193,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214],"testing","api","api testing","driven","APITester Agent Driven API Testing","test","run","postman","results","plain english","tester","endpoints","document","get","define","tests","english","api-tester",{"skillNo":216,"name":217,"nameZh":6,"description":218,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":219,"categories":220,"keywords":221,"publishedAt":38},"01M6F273Y3NGAPVJZ608BC0G9G","hubspot-implementation-plan","Generate a phased implementation plan from a HubSpot audit report. Creates prioritized, sequenced cleanup processes with effort estimates, dependencies, and automation feasibility. Use after running \u002Fhubspot-audit.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fhubspot-implementation-plan\u002FSKILL.md",[],[141,222,223,224,225,226,227,89,228,229,230,231,232,34,233,234,181,235],"implementation","hubspot","hubspot implementation plan","automation","feasibility","cleanup","planning","report","audit","audit report","phased implementation","dependencies","processes","hubspot audit"]