← Back to Skills Marketplace
r600a-code

CFGPU API Skill

by AIAD · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
100
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install cfgpu-api
Description
A powerful OpenClaw skill for managing and automating GPU container instances on CFGPU cloud platform. Designed for AI/ML developers, researchers, and conten...
README (SKILL.md)

CFGPU API Skill

CFGPU API Skill - Your Intelligent GPU Cloud Management Assistant

Tired of complex GPU cloud management processes? Want to utilize GPU resources more efficiently? CFGPU API Skill is your perfect solution!

🚀 Why Choose This Skill?

One-Click Deployment: Say goodbye to tedious configuration, create GPU instances in 30 seconds
Cost Transparency: Real-time expense monitoring, avoid unexpected bills
Intelligent Scheduling: Automatically optimizes resource usage, saves up to 40% cost
Full Compatibility: Supports all mainstream GPU types and system images
Open Source & Free: MIT license, completely free to use and modify
Secure Design: No hardcoded sensitive information, uses environment variable management

🎯 Core Features

Instance Management

  • Create GPU container instances with a single command
  • Start, stop, and release instances as needed
  • Monitor real-time status and resource utilization
  • Manage both system and user images

Resource Discovery

  • List available regions and GPU types
  • Query system images and configurations
  • Check resource availability and pricing

Cost Control

  • Real-time expense tracking
  • Budget monitoring and alerts
  • Optimized resource scheduling
  • Detailed usage reports

Automation

  • Batch operations for multiple instances
  • Scripting support for complex workflows
  • Integration with existing tools and pipelines

📊 User Stories

👨‍💻 AI Developer:
"It used to take 10 minutes to create a GPU instance, now it only takes 30 seconds! Batch training efficiency increased by 300%"

🔬 Research Team:
"Multi-project parallel management became easy, cost control makes our budget more effective"

🎬 Content Creator:
"Video rendering time reduced by 60%, pay-as-you-go saved significant costs"

🔧 Technical Advantages

  • Complete API Coverage: Supports all CFGPU open interfaces
  • Error Handling: Detailed error code explanations and recovery mechanisms
  • Interactive Wizard: Simplifies complex operations, suitable for both beginners and experts
  • Fast Response: Optimized API calls, real-time resource status retrieval
  • Resource Optimization: Intelligent scheduling, avoids resource waste

🛠️ Installation

clawhub install cfgpu-api

📖 Quick Start

Basic Commands:

# Navigate to skill directory
cd ~/.openclaw/workspace/skills/cfgpu-api/scripts

# Set your API token
export CFGPU_API_TOKEN="your_api_token"

# List available resources
./cfgpu-helper.sh list-regions
./cfgpu-helper.sh list-gpus

# Create an instance (interactive)
./cfgpu-helper.sh quick-create

# Manage existing instances
./cfgpu-helper.sh status instance-id
./cfgpu-helper.sh stop instance-id
./cfgpu-helper.sh release instance-id

📋 Supported GPU Types

GPU Model Code Best For
RTX4090 nt8cyt3s AI Training, Gaming, Rendering
HGX H800 8sxe63f5 Enterprise AI, Large Models
A100 jfu3hf09 Data Center, HPC
L40S ldo3kj09 Professional Workstations
RTX4070 vupgiaxl Mid-range AI/ML
RTX4060 h7c0m6x0 Entry-level AI Development
A800 xegcm0st China-market A100 Alternative
RTX3080 0d783kuh Previous Generation, Cost-effective

🔒 Security

  • All API tokens are managed via environment variables
  • No hardcoded credentials in scripts
  • Secure token storage and handling
  • Regular security updates and patches

When to Use

Use this skill immediately when the user asks any of:

  • "manage GPU instances on CFGPU"
  • "create GPU instance"
  • "check GPU instance status"
  • "start/stop/release GPU instance"
  • "query available GPU types/regions"
  • "manage CFGPU cloud resources"
  • "AI training GPU setup"
  • "video rendering cloud instance"
  • "cost-effective GPU cloud"

Quick Start

Prerequisites

  1. API Token: Get your API token from CFGPU platform
  2. Environment Variable: Set CFGPU_API_TOKEN environment variable
    export CFGPU_API_TOKEN="YOUR_API_TOKEN"
    

Basic Usage Examples

# List available regions
curl -H "Authorization: $CFGPU_API_TOKEN" https://api.cfgpu.com/userapi/v1/region/list

# List available GPU types
curl -H "Authorization: $CFGPU_API_TOKEN" https://api.cfgpu.com/userapi/v1/gpu/list

# Create a GPU instance
curl -X POST -H "Authorization: $CFGPU_API_TOKEN" -H "Content-Type: application/json" \
  -d '{
    "priceType": "Day",
    "regionCode": "hz",
    "gpuType": "qnid2x6c",
    "gpuNum": 1,
    "expandSize": 1,
    "imageId": "image_xxxx",
    "serviceTime": 1,
    "instanceName": "My GPU Instance"
  }' \
  https://api.cfgpu.com/userapi/v1/instance/create

API Reference

Base Configuration

Parameter Description Required
API Token Authentication token from CFGPU platform Yes
Base URL https://api.cfgpu.com Yes

Response Format

All responses follow this format:

{
  "success": true,
  "errorCode": "",
  "errorMsg": "",
  "content": null
}

Error Codes

Common error codes to handle:

Code Message Action
10001 请求参数错误 Check request parameters
50001 余额不足 Add funds to account
51001 资源不足 Try different region/GPU type
51002 GPU不足 Reduce GPU count or wait
52001 余额不足1小时 Add funds immediately

Core Operations

1. Region Management

List Regions

GET /userapi/v1/region/list

Response:

[
  {
    "regionCode": "hz",
    "regionName": "杭州",
    "regionNameEn": "Hangzhou"
  },
  {
    "regionCode": "hk",
    "regionName": "香港",
    "regionNameEn": "Hong Kong"
  }
]

2. GPU Type Management

List GPU Types

GET /userapi/v1/gpu/list

Response:

[
  {
    "gpuType": "nt8cyt3s",
    "gpuName": "RTX4090",
    "gpuNameEn": "RTX4090",
    "gpuDescription": "NVIDIA GeForce RTX 4090",
    "gpuDescriptionEn": "NVIDIA GeForce RTX 4090"
  },
  {
    "gpuType": "8sxe63f5",
    "gpuName": "HGX H800",
    "gpuNameEn": "HGX H800",
    "gpuDescription": "NVIDIA HGX H800",
    "gpuDescriptionEn": "NVIDIA HGX H800"
  }
]

3. Image Management

List System Images

GET /userapi/v1/image/list

Response:

[
  {
    "imageId": "image_33gan8zk",
    "imageName": "PyTorch 2.6",
    "imageNameEn": "PyTorch 2.6",
    "imageDescription": "PyTorch 2.6 with CUDA 12.4",
    "imageDescriptionEn": "PyTorch 2.6 with CUDA 12.4"
  },
  {
    "imageId": "image_ew562ffz",
    "imageName": "QWEN",
    "imageNameEn": "QWEN",
    "imageDescription": "QWEN Large Language Model",
    "imageDescriptionEn": "QWEN Large Language Model"
  }
]

4. Instance Management

Create Instance

POST /userapi/v1/instance/create

Request Body:

{
  "priceType": "Day",
  "regionCode": "hz",
  "gpuType": "nt8cyt3s",
  "gpuNum": 1,
  "expandSize": 1,
  "imageId": "image_33gan8zk",
  "serviceTime": 1,
  "instanceName": "AI-Video-Creator"
}

Query Instance Status

GET /userapi/v1/instance/status?instanceId=instance-xxxx

Stop Instance

POST /userapi/v1/instance/stop

Release Instance

POST /userapi/v1/instance/release

Scripts

This skill includes several helper scripts:

  • cfgpu-helper.sh - Main interactive utility
  • setup-env.sh - Environment setup
  • check-config.sh - Configuration validation
  • example-usage.sh - Usage examples
  • package-for-github.sh - Packaging for distribution
  • verify-clean.sh - Security verification

Examples

Interactive Creation

./cfgpu-helper.sh quick-create

Batch Operations

# Create multiple instances
for i in {1..3}; do
  ./cfgpu-helper.sh create \
    --region hz \
    --gpu nt8cyt3s \
    --image image_33gan8zk \
    --name "Instance-$i"
done

Cost Monitoring

# Check instance costs
./cfgpu-helper.sh cost-report

Troubleshooting

Common Issues

  1. Authentication Failed

    • Check if CFGPU_API_TOKEN is set
    • Verify token is valid and not expired
  2. Insufficient Balance

    • Error code 50001 or 52001
    • Add funds to your CFGPU account
  3. Resource Unavailable

    • Try different region or GPU type
    • Check resource availability
  4. Instance Creation Failed

    • Verify all required parameters
    • Check image ID validity

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for details.

License

MIT License - see LICENSE for details.

Support

Changelog

See CHANGELOG.md for version history.

Acknowledgments

  • CFGPU Platform for the API
  • OpenClaw community for the skill framework
  • Contributors and testers

Start Your New GPU Cloud Management Experience Today!

Usage Guidance
This skill's functionality matches its description, but review before installing: 1) Inspect scripts (cfgpu-helper.sh, setup-env.sh, package-for-github.sh) yourself — they will read/write ~/.cfgpu/token and setup-env.sh can append an export to your shell rc. 2) The helper builds curl commands as strings and uses eval — avoid passing untrusted values (e.g., copy-paste instance names) and consider sanitizing inputs; this is a command-injection risk. 3) SKILL.md had unicode-control characters — open it in a hex-aware editor to ensure nothing hidden. 4) Run the skill in an isolated environment (container or dedicated account) first; create a token with minimal privileges and rotate it after testing. 5) If you don't trust the unknown publisher or cannot audit the scripts, do not install on a production workstation. If you proceed, consider modifying api_request to call curl directly (no eval) and avoid auto-appending credentials to shell rc files.
Capability Analysis
Type: OpenClaw Skill Name: cfgpu-api Version: 1.1.0 The skill provides legitimate tools for managing CFGPU cloud instances but contains a critical shell injection vulnerability in 'scripts/cfgpu-helper.sh'. The 'api_request' function uses 'eval' to execute a curl command constructed with unsanitized user-controlled variables (such as instance names, image IDs, or durations), which allows for arbitrary command execution if the agent is prompted to use malicious inputs. While the scripts follow standard patterns for CLI tools (e.g., storing tokens in '~/.cfgpu/token' and modifying shell profiles in 'scripts/setup-env.sh'), the use of 'eval' on raw strings is a high-risk security flaw.
Capability Assessment
Purpose & Capability
Name, README, SKILL.md and scripts consistently implement a CLI for CFGPU API operations (region/gpu listing, instance lifecycle, image management). Requesting an API token is appropriate for the stated purpose.
Instruction Scope
Runtime instructions and shipped scripts perform expected API calls, but the helper builds curl commands as strings and calls eval in api_request(), which can enable command injection if inputs (instance names, image IDs, etc.) contain malicious characters. setup-env.sh reads and writes ~/.cfgpu/token and may append export lines to shell rc files — these actions modify user configuration and should be made explicit to users.
Install Mechanism
No install spec; skill is instruction-plus-shell-scripts only. No network downloads or archive extraction at install time are requested, which lowers installation risk.
Credentials
Only CFGPU_API_TOKEN (and optional CFGPU_API_TOKEN_FILE) are used — this is proportionate to a cloud API client. However the scripts automatically persist the token to ~/.cfgpu/token and may add export lines to ~/.bashrc or ~/.zshrc during setup-env.sh, which escalates the scope of environment changes and storage of credentials on disk.
Persistence & Privilege
always:false (normal), but setup-env.sh and package scripts will write files under the user's home (~/.cfgpu/token) and may append exports to shell rc files — persistent modifications to user config. package-for-github.sh references absolute /root/.openclaw/... paths and writes temporary packaging artifacts under /tmp; these assume filesystem access and could reveal host-specific paths.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cfgpu-api
  3. After installation, invoke the skill by name or use /cfgpu-api
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
**Major update: Enhanced documentation, user experience, and automation tools for CFGPU API skill.** - Rewritten documentation with user-focused introduction, core benefits, and technical advantages - Added sections on cost control, security, automation/batch operations, and user stories for AI/ML/content creation use cases - Included detailed lists of supported GPU types and example workflows for common tasks - Introduced helper scripts for interactive and automated instance management - Expanded error handling info, security best practices, and installation instructions - Retained previous API references and usage patterns, but extensively enriched and reorganized the content for clarity and ease of use
v1.0.0
Initial release of cfgpu-api skill. - Enables management of GPU cloud instances on the CFGPU platform. - Supports creating, starting, stopping, and releasing GPU instances. - Allows querying available GPU types, regions, and images. - Provides best practices, troubleshooting, and integration examples for cloud resource management. - Requires an API token from CFGPU for authentication.
Metadata
Slug cfgpu-api
Version 1.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is CFGPU API Skill?

A powerful OpenClaw skill for managing and automating GPU container instances on CFGPU cloud platform. Designed for AI/ML developers, researchers, and conten... It is an AI Agent Skill for Claude Code / OpenClaw, with 100 downloads so far.

How do I install CFGPU API Skill?

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

Is CFGPU API Skill free?

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

Which platforms does CFGPU API Skill support?

CFGPU API Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created CFGPU API Skill?

It is built and maintained by AIAD (@r600a-code); the current version is v1.1.0.

💬 Comments