← 返回 Skills 市场
lintqiu

调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。

作者 lintqiu · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
223
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install java-api-lin-skill
功能描述
调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。
使用说明 (SKILL.md)

\r \r

Java Skill API\r

\r 基于 JavaSkillController 的 OpenClaw/OpenLaw Skill 能力:通过 HTTP 调用本服务的执行入口与健康检查接口。\r \r 配置与安全说明:本 skill 不包含任何硬编码的 API 地址(skill.json 中无 apiUrl)。后端基地址通过环境变量 JAVA_API_URL 指定(如 http://your-server:8080),所有请求均发往您配置的地址,不会向任何第三方端点发送数据。使用脚本或平台调用前请设置 JAVA_API_URL 为可信的后端服务地址。\r \r

When to use\r

\r

  • 用户或智能体需要「执行技能」「调用 Java 接口」「提交/查询业务」时\r
  • 用户提到「调用 openLaw 接口」「执行法律/业务相关操作」时\r
  • 需要探测或确认 Java Skill 服务是否可用时(健康检查)\r \r

Instructions\r

\r

  1. 确认基地址:从环境变量 JAVA_API_URL 读取 Java 服务根 URL(如 http://your-server:8080),接口前缀为 /api/skill。勿使用未在文档中声明的其他 URL。\r
  2. 选择接口:\r
    • 执行业务:使用 POST /api/skill/executePOST /api/skill/execute-v2,Body 为 JSON(见 Parameters)。\r
    • 健康检查:使用 GET /api/skill/health,无需 Body。\r
  3. 请求:设置 Content-Type: application/json(POST 时),按参数构造 JSON。\r
  4. 解析响应:统一格式 { "code": 0, "msg": "success", "data": ... }code === 0 表示成功。\r \r

API 说明(与 JavaSkillController 一致)\r

\r | 接口 | 方法 | 说明 |\r |------|------|------|\r | /api/skill/execute | POST | 通用执行入口,Body 为任意 JSON(建议含 action、userId) |\r | /api/skill/execute-v2 | POST | 使用 DTO 的入口,Body 为 SkillExecuteRequest 结构 |\r | /api/skill/health | GET | 健康检查,返回 data: "ok" |\r \r

请求体(execute / execute-v2)\r

\r 与 SkillExecuteRequest 对应:\r \r | 参数名 | 类型 | 必填 | 说明 |\r |--------|------|------|------|\r | action | string | 否 | 操作类型,如 query / submit |\r | userId | number | 否 | 用户 ID |\r | extra | object | 否 | 扩展参数,键值对 |\r \r 示例:\r \r

{\r
  "action": "query",\r
  "userId": 123,\r
  "extra": { "keyword": "合同" }\r
}\r
```\r
\r
### 响应体(SkillExecuteResponse)\r
\r
```json\r
{\r
  "code": 0,\r
  "msg": "success",\r
  "data": "用户ID:123,操作:query 执行完成"\r
}\r
```\r
\r
- `code === 0`:成功;非 0 表示业务/系统失败。\r
- `msg`:提示信息;`data`:业务结果(字符串或对象)。\r
\r
## 脚本调用(可选)\r
\r
使用 `scripts/call_java_api.py` 可调用上述三个接口。**必须**设置环境变量 `JAVA_API_URL`(脚本运行时会校验,未配置则报错)。\r
\r
```bash\r
# 设置基地址(不含 /api/skill/...),为必填项\r
export JAVA_API_URL=http://your-server:8080\r
\r
# 执行(默认 POST /api/skill/execute)\r
python scripts/call_java_api.py --action query --userId 123\r
\r
# 使用 execute-v2\r
python scripts/call_java_api.py --endpoint execute-v2 --action submit --userId 456\r
\r
# 健康检查\r
python scripts/call_java_api.py --health\r
```\r
\r
## Parameters(供 OpenClaw/skill.json 使用)\r
\r
| 参数名 | 类型 | 必填 | 说明 |\r
|--------|------|------|------|\r
| action | string | 否 | 操作类型 |\r
| userId | number | 否 | 用户 ID |\r
| extra | object | 否 | 扩展参数 |\r
安全使用建议
This skill appears to do what it says: call your JavaSkillController via an HTTP base URL you must supply. Before installing: (1) confirm the registry metadata is updated to declare the required environment variable (JAVA_API_URL) so operators know a network call will occur; (2) ensure JAVA_API_URL points to a trusted internal service (do not set it to an external or unknown host); (3) validate network policies (eg. restrict egress to your Java service) and review logs on the target service to verify expected behavior; (4) if you plan to run the included script, ensure the Python 'requests' package is available; (5) prefer installing only from a known publisher or source — the skill's source/homepage are missing. These mismatches are likely sloppy/operational omissions rather than malicious, but treat the network endpoint as sensitive until verified.
功能分析
Type: OpenClaw Skill Name: java-api-lin-skill Version: 1.0.1 The skill bundle is a legitimate integration for interacting with a Java-based backend API. It follows security best practices by requiring the target URL to be configured via an environment variable (JAVA_API_URL) rather than hardcoding endpoints. The Python script (scripts/call_java_api.py) and the agent instructions (SKILL.md) are transparent, well-documented, and lack any indicators of malicious intent, data exfiltration, or unauthorized command execution.
能力评估
Purpose & Capability
Name/description claim a simple HTTP client for JavaSkillController (execute/execute-v2/health). The included script and SKILL.md implement exactly that functionality; requiring a base URL and calling /api/skill endpoints is proportional to the stated purpose.
Instruction Scope
Runtime instructions are narrowly scoped: they read one environment variable (JAVA_API_URL) and call three HTTP endpoints under /api/skill. They do not instruct reading arbitrary files or other environment variables, nor do they send data to hard-coded third-party endpoints. However, SKILL.md and the script explicitly require JAVA_API_URL while the registry metadata lists no required env vars — an instruction/metadata mismatch.
Install Mechanism
This is an instruction-only skill with no install spec. The only runtime dependency is the Python 'requests' package referenced in scripts/call_java_api.py; that dependency is typical for a simple client but is not declared in any install metadata (not a security risk by itself, but an operational omission).
Credentials
The skill needs a single environment variable (JAVA_API_URL) to operate — that's reasonable. However, the registry metadata lists 'Required env vars: none' while SKILL.md and the script require JAVA_API_URL. This mismatch means the skill may be deployed without the operator realizing a network endpoint will be contacted. No other secrets are requested.
Persistence & Privilege
Skill is not always-enabled, does not request broad platform privileges, and does not modify other skills or system-wide settings. Autonomous invocation is allowed (platform default) but not combined with other high-risk flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install java-api-lin-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /java-api-lin-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Clarified skill configuration and security: the API base URL is no longer hardcoded anywhere and must be specified using the JAVA_API_URL environment variable. - Added guidance and warnings to ensure only trusted backend endpoints are used. - Updated script usage section: JAVA_API_URL is now mandatory, and the script checks for its presence before execution. - No changes to API endpoints or request/response formats.
v1.0.0
- Initial release of java-api-lin-skill for OpenClaw/OpenLaw integration. - Provides HTTP endpoints for business operations (/execute, /execute-v2) and health check (/health). - Supports JSON-based POST requests and uniform response format. - Includes documentation for usage scenarios, instructions, API structure, and script-based invocation. - Parameters and response examples outlined for OpenClaw/skill.json integration.
元数据
Slug java-api-lin-skill
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。 是什么?

调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 223 次。

如何安装 调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。?

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

调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。 是免费的吗?

是的,调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。 支持哪些平台?

调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 调用 JavaSkillController 提供的 HTTP 接口,供 OpenClaw/OpenLaw 执行业务操作、健康检查。?

由 lintqiu(@lintqiu)开发并维护,当前版本 v1.0.1。

💬 留言讨论