← 返回 Skills 市场
ljw2024polyu

HPR Solver

作者 jiawei_polyu · GitHub ↗ · v0.0.9 · MIT-0
cross-platform ⚠ suspicious
309
总下载
1
收藏
0
当前安装
12
版本数
在 OpenClaw 中安装
/install hpr-solver
功能描述
Solve optimization & planning problems using natural language. Just describe what you need — fast, accurate, and built for AI agents.
使用说明 (SKILL.md)

HPR Solver

Solve Linear Programming problems using HPR solver.

Trigger

When user wants to solve an LP problem (MPS file or natural language description).

Usage

For MPS Files

User provides path to .mps file. Confirm parameters first:

⚠️ Please confirm parameters:
1. stoptol (default 1e-6): ?
2. time_limit (default 3600s): ?
3. device_number (0=GPU, -1=CPU): ?
4. Need variable values? (Yes/No)

After confirmation, run:

~/julia/julia-1.10.4/bin/julia --project ~/.openclaw/workspace/HPR-LP \
  ~/.openclaw/workspace/HPR-LP/hprlp_solve.jl \x3Cmps_file> \x3Ctime_limit> \x3Cstoptol> \x3Cdevice>

For Natural Language

  1. Parse problem, output mathematical model for confirmation:
📐 Mathematical Model:

```max
[objective function]
[constraint 1]
[constraint 2]
[constraint 3]

Variables:

  • x₁ = [description]
  • x₂ = [description]

2. After user confirms, ask parameters (same as MPS)

3. Model in Julia/JuMP:

```julia
using JuMP
using HPRLP

model = Model(HPRLP.Optimizer)
set_optimizer_attribute(model, "stoptol", \x3Cvalue>)
set_optimizer_attribute(model, "time_limit", \x3Cvalue>)
set_optimizer_attribute(model, "device_number", \x3Cvalue>)
set_optimizer_attribute(model, "verbose", true)

@variable(model, x1 >= 0)
@variable(model, x2 >= 0)

@constraint(model, c1, \x3Cconstraint 1>)
@constraint(model, c2, \x3Cconstraint 2>)

@objective(model, Max, \x3Cobjective>)

optimize!(model)
  1. Output Solution Summary:
📊 HPR-LP Results

=== Solution Summary ===
Status: [OPTIMAL/INFEASIBLE/...]
Iterations: \x3Ccount>
Solve Time: \x3Cseconds>
Primal Objective: \x3Cvalue>
Dual Objective: \x3Cvalue>
KKT Error: \x3Cerror>

=== Variables ===
x₁ = \x3Cvalue>
x₂ = \x3Cvalue>

Parameters

Parameter Default Description
stoptol 1e-6 Stopping tolerance
time_limit 3600 Time limit (seconds)
device_number 0 GPU device (-1 for CPU)

Non-LP Problems

If problem is NOT linear (has integer vars, x², products, etc.), respond:

⚠️ HPR only supports Linear Programming (LP).

This appears to be:
- Integer/MILP (use GLPK, CBC, HiGHS)
- Non-linear (use Ipopt)
- Quadratic (use Gurob, CPLEX)

Requirements

  • Julia 1.10.4
  • HPR-LP
  • Linux/macOS/Windows
安全使用建议
This skill contains local solver scripts (expected) but also a Python 'hybrid' parser that calls an external LLM (openrouter.ai) and includes hard-coded user paths. Before installing or using it: 1) Inspect scripts/hpr_hybrid.py fully to see whether it sends problem text or other data to the remote LLM and whether it expects an API key in an env var (the skill metadata does not declare any). 2) If you don't want your problem descriptions sent outside your environment, do not run the hybrid parser; instead run the local Julia hprlp_solve.jl directly after installing Julia and HPR-LP manually. 3) Fix hard-coded paths (e.g., /home/ljw) to point to your environment or use the tilde-based paths described in the README. 4) Ask the maintainer to document any remote network calls and required environment variables (API keys) in SKILL.md and to remove or make the LLM fallback explicit and opt-in. If the author confirms there are no remote calls or that the LLM fallback is removed/opt-in, the concerns would be largely resolved.
功能分析
Type: OpenClaw Skill Name: hpr-solver Version: 0.0.9 The skill contains a 'phone-home' mechanism in 'scripts/hpr_hybrid.py' that uses 'os.system' to send execution progress and status updates to a hardcoded WhatsApp number (+85259562906) via the OpenClaw CLI. It also features a high-risk execution pattern where Julia code generated by an external LLM (MiniMax via OpenRouter) is written to /tmp and executed directly using 'os.popen'. Furthermore, the bundle is poorly sanitized, containing numerous hardcoded absolute paths tied to a specific local user environment (/home/ljw/).
能力评估
Purpose & Capability
Name/description claim LP solving with HPR-LP and Julia, which matches the Julia/JuMP usage and hprlp_solve.sh script. However, the package also contains a Python 'hybrid' parser that calls an external LLM endpoint (openrouter.ai) to generate Julia code; that networked LLM fallback is not mentioned in SKILL.md or README and is not obviously required for an HPR-LP solver (the skill could parse NL locally or ask the user). The README additionally claims "No custom code is executed," which contradicts the presence of scripts in the bundle.
Instruction Scope
SKILL.md instructs running Julia and local solver scripts and does not describe any remote LLM calls. The included scripts (scripts/hpr_hybrid.py) contain an LLM_API_URL and model name and appear to send problem text to a third-party API as a fallback parser — this could transmit user problem text externally. The shell script uses absolute user-specific paths (/home/ljw/...), which differ from the tilde-paths in SKILL.md and README and could fail or lead to unintended file access if executed as-is.
Install Mechanism
No formal install spec in registry metadata (instruction-only), which is low-risk. README suggests manual git clone of upstream HPR-LP and installing Julia — these are from official sources. However, the bundle does include executable scripts that would be run; there is no automated installer but the code would be executed by the agent if invoked.
Credentials
Metadata declares no required env vars, but the Python script references an external LLM endpoint and likely needs an API key (not declared). The skill may therefore expect credentials (e.g., OpenRouter API key) or rely on network access without disclosing it in SKILL.md/README. That mismatch between declared environment requirements and actual code is concerning because it can lead to unintended secret use or data exfiltration.
Persistence & Privilege
The skill is not marked always:true and does not request system-wide persistence. It does contain scripts that, if executed, call local Julia binaries and run solver scripts; there is no evidence it modifies other skills or agent-wide settings. The hard-coded /home/ljw paths are brittle but not an elevated privilege request.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hpr-solver
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hpr-solver 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.9
Security notice in SKILL.md. Description: optimization & planning via natural language.
v0.0.8
Security notice moved to SKILL.md only. Description reverted to original short format.
v0.0.7
Added security notice to address false positive flags. Downloads only official Julia binary and official HPR-LP solver from PolyU-IOR. No custom code executed.
v1.0.1
Added security notice to address false positive flags. Downloads only official Julia binary and official HPR-LP solver from PolyU-IOR. No custom code executed.
v0.0.6
Improved install script with better Julia detection and juliaup
v0.0.5
Fixed Julia installation - using official S3 source
v0.0.4
Fixed hardcoded paths
v0.0.1-beta
Updated description
v0.0.3
Updated description
v0.0.2
HPR-solver: Solve optimization & planning problems using natural language. Just describe what you need — fast, accurate, and built for AI agents.
v0.0.1
Initial release of HPR-solver: Fast LP solver using HPR-LP. Supports MPS files and natural language input with guided parameter setup.
v1.0.0
Initial release
元数据
Slug hpr-solver
版本 0.0.9
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 12
常见问题

HPR Solver 是什么?

Solve optimization & planning problems using natural language. Just describe what you need — fast, accurate, and built for AI agents. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 309 次。

如何安装 HPR Solver?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install hpr-solver」即可一键安装,无需额外配置。

HPR Solver 是免费的吗?

是的,HPR Solver 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

HPR Solver 支持哪些平台?

HPR Solver 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 HPR Solver?

由 jiawei_polyu(@ljw2024polyu)开发并维护,当前版本 v0.0.9。

💬 留言讨论