← Back to Skills Marketplace
ljw2024polyu

HPR Solver

by jiawei_polyu · GitHub ↗ · v0.0.9 · MIT-0
cross-platform ⚠ suspicious
309
Downloads
1
Stars
0
Active Installs
12
Versions
Install in OpenClaw
/install hpr-solver
Description
Solve optimization & planning problems using natural language. Just describe what you need — fast, accurate, and built for AI agents.
README (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
Usage Guidance
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.
Capability Analysis
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/).
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install hpr-solver
  3. After installation, invoke the skill by name or use /hpr-solver
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug hpr-solver
Version 0.0.9
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 12
Frequently Asked Questions

What is HPR Solver?

Solve optimization & planning problems using natural language. Just describe what you need — fast, accurate, and built for AI agents. It is an AI Agent Skill for Claude Code / OpenClaw, with 309 downloads so far.

How do I install HPR Solver?

Run "/install hpr-solver" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is HPR Solver free?

Yes, HPR Solver is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does HPR Solver support?

HPR Solver is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created HPR Solver?

It is built and maintained by jiawei_polyu (@ljw2024polyu); the current version is v0.0.9.

💬 Comments