critpt-solver

TotalClaw 作者 totalclaw

验证并执行 CritPt 基准问题的 Python 解决方案。当用户要求检查生成的解决方案或运行测试用例时使用。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~wanng-ide-critpt-solver
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~wanng-ide-critpt-solver/file -o wanng-ide-critpt-solver.md
## 概述(中文)

验证并执行 CritPt 基准问题的 Python 解决方案。当用户要求检查生成的解决方案或运行测试用例时使用。

## 原文

# CritPt Solver

Wraps Python execution for CritPt problems.

## Usage

```javascript
const solver = require('./index');
const code = "..."; // Python code implementing answer(p)
const result = await solver.runPythonCode(code);
console.log(result);
```

## How it works

1.  **Format Prompt**: Creates a structured prompt for the LLM to generate Python code.
2.  **Generate Code**: (Optionally calls LLM, or expects LLM to call it).
3.  **Validate**: Checks syntax and executes `answer(p)` with test values if possible.