360 Secure SkillHub
360 安全技能中心

GPU CLI: Remote GPU Compute for ML Training and Inference

该 Skill 通过捆绑的 runner.sh 包装本地 gpu 二进制,仅允许执行单条 gpu 子命令并配合只读文件访问,可用于状态查询、doctor 诊断、GPU 作业与模型推理运行;建议先做 doctor/status 预检,并可用 --json 获取结构化输出。安全方面说明字符黑名单与子命令白名单、避免 shell 链式与重定向,并提示可能产生付费实例。

angusbezzina
angusbezzina
热度 63.59
最近更新 2026-05-11 17:27:20
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gpu-cli
Metadata
name
gpu-cli
description
Safely run local `gpu` commands via a guarded wrapper (`runner.sh`) with preflight checks and budget/time caps.
argument-hint
runner.sh gpu [subcommand] [flags]
allowed-tools
Bash(runner.sh*), Read

GPU CLI Skill (Stable)

Use this skill to run the local gpu binary from your agent. It only allows invoking the bundled runner.sh (which internally calls gpu) and read-only file access.

What it does

  • Runs gpu commands you specify (e.g., runner.sh gpu status --json, runner.sh gpu run python train.py).
  • Recommends a preflight: gpu doctor --json then gpu status --json.
  • Streams results back to chat; use --json for structured outputs.

Safety & scope

  • Allowed tools: Bash(runner.sh*), Read. No network access requested by the skill; gpu handles its own networking.
  • Avoid chaining or redirection; provide a single runner.sh gpu … command.
  • You pay your provider directly; this may start paid pods.

Quick prompts

  • "Run runner.sh gpu status --json and summarize pod state".
  • "Run runner.sh gpu doctor --json and summarize failures".
  • See templates/prompts.md for more examples.

Security

  • Input sanitization: character blocklist (; & | \ ( ) > < $ { }+ newlines) plus subcommand allowlist. Commands are executed via directgpu binary invocation — no shell re-evaluation (bash -c/eval`).
  • See SECURITY.md for the full threat model, permission rationale, and version history.

Notes

  • For image/video/LLM work, ask the agent to include appropriate flags (e.g., --gpu-type "RTX 4090", -p 8000:8000, or --rebuild).