← 返回
未分类 Key 中文

ai-payment-token

Use this skill when the user wants to configure, export, or validate AICADE Galaxy dynamic services for AI use, including setting AICADE_GALAXY_* environment...
在用户需要为 AI 配置、导出或校验 AICADE Galaxy 动态服务(包括设置 AICADE_GALAXY_* 环境变量)时使用此技能。
shifenghu shifenghu 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 460
下载
💾 0
安装
1
版本
#ai payments#aicade galaxy#latest

概述

AICADE Galaxy Skills

Use This Skill When

  • The user wants to configure AICADE Galaxy access
  • The user wants to export dynamic capabilities from /admin/gateway/services
  • The user wants to invoke a tool from the exported artifact
  • The user wants to validate or inspect the generated artifact
  • The user asks how AICADE_GALAXY_API_KEY, X-API-Key, responsePaths, or --args-file work

Required Configuration

This skill uses these environment variables in .env:

  • AICADE_GALAXY_BASE_URL
  • AICADE_GALAXY_API_KEY
  • AICADE_GALAXY_OUTPUT_PATH

Authentication rule:

  • Header name: X-API-Key
  • Header value source: AICADE_GALAXY_API_KEY

Usage

This skill has three main actions:

  1. Configure .env
  2. Export aicade-galaxy-skill.json
  3. Invoke a tool from the exported artifact

Runtime selection rule:

  • Prefer node first
  • If node is unavailable, use python3
  • If both are unavailable, tell the user to install Node.js and then rerun the skill commands

Suggested runtime checks:

node --version
python3 --version

Configure Environment

If .env is missing or incomplete, run:

node {baseDir}/scripts/setup_env.mjs

Fallback when node is unavailable:

python3 {baseDir}/scripts/setup_env.py

This initializes:

  • AICADE_GALAXY_BASE_URL
  • AICADE_GALAXY_API_KEY
  • AICADE_GALAXY_OUTPUT_PATH

Recommended default output directory:

  • output

Export Dynamic Services

To export the current dynamic services, run:

node {baseDir}/scripts/export_artifact.mjs

Fallback when node is unavailable:

python3 {baseDir}/scripts/export_artifact.py

The exported artifact path is:

{AICADE_GALAXY_OUTPUT_PATH}/aicade-galaxy-skill.json

Default output directory:

output

Invoke Exported Tools

Use the exported artifact together with an args file:

node {baseDir}/scripts/invoke_artifact.mjs --artifact {AICADE_GALAXY_OUTPUT_PATH}/aicade-galaxy-skill.json --tool TOOL_NAME --args-file /tmp/invoke.json

Fallback when node is unavailable:

python3 {baseDir}/scripts/invoke_artifact.py --artifact {AICADE_GALAXY_OUTPUT_PATH}/aicade-galaxy-skill.json --tool TOOL_NAME --args-file /tmp/invoke.json

The args file must contain a JSON object, for example:

{
  "city": "北京",
  "responsePaths": ["reason", "error_code"]
}

Invoker behavior:

  • Reads the artifact file and locates the target tool by name
  • Reads request arguments from --args-file
  • Validates required fields and field types against inputSchema
  • Sends the request using the tool's method, path, and authentication metadata
  • Returns a normalized JSON result

Normalized output shape:

  • Success:

{"ok": true, "status": 200, "tool": "...", "serviceId": "...", "data": ..., "raw": ...}

  • Failure:

{"ok": false, "status": 4xx/5xx, "tool": "...", "serviceId": "...", "error": {"message": "...", "raw": ...}}

Examples

Export AICADE Galaxy Services

  1. Configure .env if needed:

```bash

node {baseDir}/scripts/setup_env.mjs

```

  1. Export services:

```bash

node {baseDir}/scripts/export_artifact.mjs

```

  1. Read {AICADE_GALAXY_OUTPUT_PATH}/aicade-galaxy-skill.json and summarize or validate the generated tools.

If node is not available, use these fallback commands instead:

python3 {baseDir}/scripts/setup_env.py
python3 {baseDir}/scripts/export_artifact.py

Invoke A Tool From Artifact

  1. Prepare an args file:

```json

{

"city": "北京",

"responsePaths": ["reason", "error_code"]

}

```

  1. Invoke the tool:

```bash

node {baseDir}/scripts/invoke_artifact.mjs --artifact {AICADE_GALAXY_OUTPUT_PATH}/aicade-galaxy-skill.json --tool simple_weather --args-file /tmp/invoke.json

```

  1. Read the normalized JSON output and summarize it for the user.

Explain Response Selection

If the user asks how to return only part of a JSON response:

  1. Explain that the skill uses responsePaths
  2. Give examples such as:
    • ["city", "weather"]
    • ["received.prompt"]
  3. Explain:
    • One path returns the selected value directly
    • Multiple paths return a nested JSON object containing only the selected fields

Service Rules

  • All service responses are JSON
  • GET services use query parameters
  • POST services use JSON request bodies
  • Dynamic service discovery comes from GET /admin/gateway/services
  • Tool invocation should use the exported artifact metadata instead of guessing request shapes

Response Selection

Use responsePaths when the caller wants only part of the JSON response.

  • ["city", "weather"]
  • ["received.prompt"]
  • ["result.realtime.temperature", "result.city"]

Behavior:

  • One path returns the selected value directly
  • Multiple paths return a nested JSON object containing only the selected fields

Files In This Skill

  • scripts/setup_env.mjs: preferred interactive .env setup for Node hosts
  • scripts/export_artifact.mjs: preferred artifact export for Node hosts
  • scripts/invoke_artifact.mjs: preferred standalone artifact invoker for Node hosts
  • scripts/setup_env.py: interactive .env setup
  • scripts/export_artifact.py: export dynamic services into a reusable skill artifact
  • scripts/invoke_artifact.py: standalone artifact invoker for Python hosts

Important Constraints

  • Prefer using the configured .env values rather than hardcoding endpoints or keys
  • Prefer node scripts/.mjs first, then fall back to python3 scripts/.py
  • If neither node nor python3 is available, tell the user to install Node.js
  • Do not ask the user to manually craft the artifact if node scripts/export_artifact.mjs or python3 scripts/export_artifact.py can generate it
  • Do not ask the AI to construct raw HTTP requests when scripts/invoke_artifact.mjs or scripts/invoke_artifact.py can invoke the tool from artifact metadata
  • Always pass tool arguments through --args-file as a JSON object
  • If export fails with 401 or 403, check AICADE_GALAXY_API_KEY first

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 04:05 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,245 📥 272,067
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,423 📥 326,269
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,131 📥 903,126