by realZillionX
InspireSkill: Local agent cockpit for the Inspire compute platform, unifying a composable CLI, Agent Skill, and Python SDK. Dispatch GPU jobs, connect Notebooks, sync storage, and inspect training metrics straight from Claude Code, Codex, Cursor, or your terminal.
# Add to your Claude Code skills
git clone https://github.com/realZillionX/InspireSkillInspireSkill is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by realZillionX. InspireSkill: Local agent cockpit for the Inspire compute platform, unifying a composable CLI, Agent Skill, and Python SDK. Dispatch GPU jobs, connect Notebooks, sync storage, and inspect training metrics straight from Claude Code, Codex, Cursor, or your terminal. It has 582 GitHub stars.
InspireSkill's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/realZillionX/InspireSkill" and add it to your Claude Code skills directory (see the Installation section above). InspireSkill ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
InspireSkill is primarily written in Python. It is open-source under realZillionX on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh InspireSkill against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
inspire is the local CLI (with a companion Python SDK) for the Inspire compute platform. Always treat inspire --help, inspire <group> --help, and inspire <group> <subcommand> --help as the source of truth for commands, flags, defaults, and examples. This document covers platform concepts, authentication, the core execution loop, and reference routing.
~/.inspire/accounts/<name>/. inspire account use <name> sets the persistent default account; passing --account <name> on any command overrides it for that invocation only. Each command pins its account at startup and is unaffected by concurrent switches. Web sessions, CAS sessions, SSH bridges, and local caches are isolated per account.inspire login):
inspire login --account <name> creates the account profile if missing and starts OAuth device authorization (or re-authenticates an existing account). Without --account, it uses the active account, or creates default when no accounts exist (if accounts exist with none active, pass --account or run inspire account use). inspire account add <name> creates a new account only and supports --no-login.--base-url and --proxy configure new accounts (ignored with a warning on existing accounts). When no account is active, the target account becomes active unless --no-use is passed; --use forces activation.--no-browser disables browser launch; --json returns account/token metadata without secret tokens). inspire init starts device login if the active account is logged out; other commands never prompt interactively for login.inspire login --account <name> in the background, relay the printed URL and code to the user immediately, and wait for completion — never retry login in a loop.inspire login --cas):
dataset list|show|tags|applications) require a CAS session stored in cas_session.json; dataset validate and --dataset mounts use the regular OAuth Bearer session.inspire login --cas feishu (scan the QR code printed to stderr; requires Chromium) or inspire login --cas sms --phone <number> (does not require Chromium; bare --cas prompts in a TTY). In non-interactive or --json mode, --cas sms --phone <number> sends the code and exits; complete within 10 minutes on the same account with --cas sms --phone <number> --sms-code <code> (phone numbers and codes are never saved).web_session.json and refresh automatically under the account lock. Session-bound refresh tokens carry a 12-hour idle window and 7-day cap; offline refresh tokens have no fixed expiry and follow server-side idle limits. Run inspire account check periodically (e.g., every 6 hours in unattended runs) to keep sessions warm, or pass --offline to inspect local state without network calls. Usernames and passwords are never stored or read.inspire logout): inspire logout [--account <name>] (equivalent to inspire account remove <name>, --yes for non-interactive use) deletes the local account profile, tokens, and bridge/tunnel state while platform workloads keep running.Break every task down into four planes before running commands:
| Plane | What It Binds |
|---|---|
| Scheduling | workspace, project, group, quota (GPU/CPU/Memory), Shared Memory, and image — where and at what spec the workload runs (TensorBoard uses a fixed 1 CPU / 2 GiB spec without quota or image). |
| Remote Files | Absolute shared-storage paths (/inspire/...) for code, data, weights, checkpoints, and outputs. Use shell environment variables for shorthand; the CLI stores no path aliases. Official datasets from the Dataset Hub mount read-only via --dataset. |
| Workload Type | Notebook for interactive debugging, internet staging, and image building; Job for fixed-scale background GPU workloads; HPC for CPU Slurm batch jobs; Ray for elastic workers, long-lived actors, or streaming pipelines; Serving for online HTTP model deployments. |
| Observation & Cleanup | Events for scheduling and pod startup; Logs for program output (on Job, HPC, Ray, and Serving; on Notebook use exec or shell); Metrics and Instances for per-unit load and node placement; Status for platform state and assigned nodes; shell for interactive container inspection; TensorBoard (inspire tensorboard) for training curves. Verify outputs and clean up resources when done. |
workspace, project, group, quota, and image explicitly when creating compute workloads (workspace, project, group, and summary-path for TensorBoard). There are no implicit defaults or saved workload profiles.group and quota from the same live <workload> quota row, and select a READY image from the target Workspace's image catalog. For GPU Jobs, --shm-size cannot exceed the instance memory in --quota (see references/compute-workloads.md).inspire cache status|refresh|clear (--resource <kind>). inspire cache refresh requires an explicit scope (--resource, --workspace, or --name) and is rarely needed in normal operation.--workspace or --pick.--limit/-n or --all adjusts the bound). Job logs apply line and character budgets with truncation notices. Pass root-level inspire --json ... for structured single-document JSON output.CPU资源空间 (CPU workspace) and 分布式训练空间 (distributed GPU training workspace) are the two default public Workspaces available to all users:
CPU资源空间 for CPU Notebooks, outbound internet downloads, dependency preparation, CPU HPC jobs, and CPU Ray jobs.分布式训练空间 for GPU Notebooks, GPU Jobs, multi-node training, Serving deployments, and GPU observation.分布式训练空间 typically has no outbound internet access. Stage external repositories, weights, and datasets from CPU资源空间 onto shared storage or bake dependencies into an image before launching GPU workloads (see references/internal-sources.md).Notebooks on H100 or H200 GPUs execute over JupyterTerminal rather than SSH. JupyterTerminal exec binds remote stdin to /dev/null and rejects local stdin forwarding: never pass --stdin or --bash-stdin, pipe local data, or redirect local files into inspire notebook exec on restricted Notebooks (or before transport is known). Stage scripts and input files on /inspire/... first, or use inspire notebook shell for interactive TTY sessions. SSH-backed Notebooks support exec --stdin and scp normally (see references/notebook.md).
INSPIRE.md)The CLI neither reads nor writes repository-local configuration files and never binds a repository to a single project. Select the target Project, Workspace, remote paths, and image explicitly for each task.
Maintain an optional INSPIRE.md in a downstream repository only when stable remote paths, base images, registered models, dataset versions, or long-lived infrastructure need to be shared across sessions and collaborators. Scope each entry by Project and Workspace, and never store credentials, transient status, or raw logs in INSPIRE.md (see references/assets.md).
INSPIRE.md exists, read the entries matching the target Project and Workspace.--help for exact command syntax and flags.--dry-run or a small probe before scaling out.events, logs, metrics, instances, status, or tensorboard.INSPIRE.md.stop then delete); clean up finished temporary workloads unless downstream consumers still need them.Always use CLI --help for command syntax. Load only the reference needed for the current task:
| Task or Decision | Reference |
|---|---|
| Login, logout, account initialization, proxy checks, updates, or uninstall | inspire login --help, inspire logout --help, inspire init --help, inspire account --help, inspire update --help, inspire uninstall --help |
INSPIRE.md conventions, project metadata (inspire project), and asset lifecycle |
references/assets.md |
| Workspaces, compute groups, quotas, live availability, usage attribution, and priority rules | references/resources.md |
| Task handoffs, Compute Group selection, and shared quotas across concurrent sessions | references/agent-ops.md |
| Shared storage scopes, storage pools, mount isolation, and remote paths | references/paths.md |
Dataset Hub search, official dataset mounting (--dataset), versions, and access requests |
references/dataset.md |
| Outbound internet staging, internal package mirrors, runtime dependency setup, and image baking | references/internal-sources.md |
Notebook creation, account-scoped connections, exec / shell / scp, HTTP proxy URLs, and image saving |
references/notebook.md |
GPU Job, CPU HPC, Ray, Serving, API keys (INF_API_KEY), TensorBoard, batch submission, and observation |
references/compute-workloads.md |
| Multi-stage project workflows across CPU staging, data processing, GPU training, and deployment | references/workflows.md |
| Image selection, external Docker registration and sync, visibility levels, and cleanup | references/image.md |
Model Registry, model versions, deployment sizing (deploy-config), and Serving boundaries |
references/model.md |
Python SDK (InspireClient, InspireAsyncClient, Accounts, typed models, remote exec, file transfer) |
references/sdk.md |
Load only when maintaining the CLI's Browser API wrappers, auditing frontend request contracts, or inspecting raw protocol behavior:
| Topic | Reference |
|---|---|
/api/v2 request/response envelopes, OAuth/CAS session lifecycle, pagination, workspace scoping, probing methodology, per-route Action tables, creation payload contracts, and Dataset Hub (plaza) protocol |
references/dev/browser-api.md |
在上海创智学院(SII)的日常科研中,启智平台承载着核心算力,但传统的网页端操作往往也是实验链路里最拖慢节奏的一环:查配额、开 Notebook、提训练、同步代码、看日志都要在浏览器里反复点选;碰上 GPU 训练区无法直连外网、H100 / H200 节点不开放常规 SSH 等限制,配环境和排查问题更是费时费力。
InspireSkill 的目标,是把启智平台的全部操作搬进本地命令行,并配齐面向 AI Agent 的技能手册与 Python SDK。你不需要改变原有的开发习惯——继续在熟悉的 Codex、Claude Code、Cursor 等客户端和本地终端里写代码、管 Git,就能直接通过对话或命令行完成平台上的全套操作。
在 @realZillionX、@JingYiJun 等开发者的长期打磨下,inspire CLI 并不是简单地把网页接口翻译成命令,而是围绕真实科研场景把整条实验链路彻底打通:
--json 输出,方便 Agent 和自动化脚本稳定读取。H100 / H200 受限节点自动切换至 JupyterTerminal 执行命令与打开终端;内置断网区平台内部软件源指引、在线保存与单层压平镜像、镜像可见性调整,并在提交 HPC 任务前自动拦截物理配额与 Slurm 参数冲突,避免空跑或卡死排队。| 组件 | 作用与定位 |
|---|---|
inspire CLI |
覆盖资源与配额查询、Notebook、GPU Job、CPU HPC、Ray、Serving、TensorBoard、镜像、模型注册表与官方数据集的本地命令行工具。 |
SKILL.md 与 references/ |
面向 AI Agent 编排的操作规范与领域参考手册,涵盖任务选型、环境准备、实时巡检与清理闭环,由安装器自动部署至本机 Agent 客户端。 |
| Python SDK | 随 inspire-skill 一同安装的同步(InspireClient)与异步(InspireAsyncClient)客户端,与 CLI 共享账号会话与类型化资源模型。 |
启智推出的 QWorks 是独立桌面客户端,需要将对话与开发迁移至其自有界面。InspireSkill 则直接嵌入你现有的本地开发工具链:
| 对比维度 | QWorks | InspireSkill |
|---|---|---|
| 使用入口 | 绑定 QWorks 独立桌面端 | 接入本地主流 Agent 客户端(共支持 13 款),也可在终端或脚本中直接调用 |
| 模型订阅 | 无法复用其他客户端已有订阅,外部模型需另配接口 | 直接沿用现有 Agent 客户端的模型配置与订阅套餐 |
| 平台覆盖 | 在客户端界面内连接平台环境 | CLI 与 Python SDK 完整覆盖配额情报、六类计算负载、镜像、模型与数据广场 |
| 工程协同 | 围绕客户端内部会话展开 | 与本地 Git 仓库、编辑器、Shell 脚本及 --json 自动化流水线无缝配合 |
支持 macOS、Linux 与原生 Windows(无需 WSL)。所有命令与参数的准确用法请以 inspire --help 及各子命令 --help 为准。
macOS / Linux(需 Python 3.10+、bash、curl、tar,以及 uv 或 pipx;若尚未安装 uv,先执行第一行):
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -fsSL https://raw.githubusercontent.com/realZillionX/InspireSkill/main/scripts/install.sh | bash
Windows PowerShell(需 Python 3.10+、uv 或 pipx,以及系统 OpenSSH 客户端;在克隆后的仓库根目录执行):
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Set-ExecutionPolicy -Scope Process Bypass
.\scripts\install.ps1
安装器会从 PyPI 安装 inspire-skill,准备 Playwright Chromium 运行时,并将 SKILL.md 与 references/ 自动写入本机检测到的 Agent 客户端目录。若本机暂未安装任何 Agent 客户端,CLI 仍会正常安装,后续安装客户端后运行 inspire update 即可补装 Skill 文件。
bash -s -- --harness codex,claude 指定目标客户端;--no-cli 仅安装 Skill 文档(未检测到且未指定客户端时报错退出);--no-schedule 跳过 macOS 每日更新检查任务。-SkipPlaywright(跳过浏览器运行时下载)、-SkipSkill(仅安装 CLI)与 -Version <x.y.z>(安装指定版本)。--index-url(或 PowerShell -IndexUrl)为本次包安装指定镜像源(仅作用于 Python 包下载,不修改浏览器与 Skill 下载源,日志会自动脱敏凭据):
curl -fsSL https://raw.githubusercontent.com/realZillionX/InspireSkill/main/scripts/install.sh | bash -s -- --index-url https://mirrors.aliyun.com/pypi/simple/
未显式传参时保留当前环境变量(uv 优先读取 UV_DEFAULT_INDEX 与 UV_INDEX_URL,pipx 读取 PIP_INDEX_URL)。Get-Command ssh -All 确认实际调用的 ssh.exe;系统 OpenSSH 与 Git for Windows 自带 OpenSSH 对 ProxyCommand 的解析存在差异。>> 默认使用 UTF-16LE 编码,写入 SSH 配置时请改用:inspire notebook ssh-config <notebook> | Out-File -Encoding utf8 -Append $env:USERPROFILE\.ssh\config(PowerShell 7+ 可直接使用 >>)。UNPROTECTED PRIVATE KEY FILE,请收紧 %USERPROFILE%\.ssh 目录 ACL 权限。文件传输可直接使用 inspire notebook scp,无需安装 rsync。若在校园网外访问平台,请先参考校外访问与代理配置设置网络代理,再执行以下命令完成账号登录与验证:
# 方式一(推荐):通过飞书扫码一次完成 CAS 与平台 OAuth 登录(同时开通数据广场检索权限)
inspire login --account <name> --cas feishu
# 方式二:仅通过浏览器完成平台 OAuth 设备授权(暂不登录数据广场 CAS)
inspire login --account <name>
inspire init # 校验并补全当前账号配置
inspire account check # 验证在线会话与令牌有效期
inspire resources availability --workspace 分布式训练空间 --include-cpu
inspire login 将统一身份认证(CAS)与平台 OAuth 设备授权整合在同一条命令中:
--cas feishu(终端内渲染飞书二维码扫码)或 --cas sms --phone <手机号>(大陆手机号短信验证;非交互模式下先发送验证码,10 分钟内对同一账号补传 --sms-code <验证码> 完成验证,手机号与验证码均不落盘)时,CLI 会先保存 CAS 会话(cas_session.json),随后自动使用该 CAS 会话批准平台的 OAuth 设备授权并保存令牌(web_session.json),一步同时打通启智平台与数据广场(aip.sii.edu.cn)目录检索(若自动批准受阻则回退打印授权链接与设备码)。--cas 时,命令直接发起平台 OAuth 设备授权(本地若已有有效 CAS 会话仍会优先自动批准,否则在交互终端下打开浏览器或打印设备码确认);算力调度、镜像、模型及 --dataset 挂载均可正常使用,仅 dataset list / show / tags / applications 目录检索需要有效的 CAS 会话。--account 时默认登录当前激活账号(首次使用自动创建 default)。连接配置保存在 ~/.inspire/accounts/<name>/config.toml(--base-url 与 --proxy 仅在新建账号时生效),CLI 从不存储或读取明文密码。inspire account check --account <name> 保活(--offline 可仅读取本地状态而不联网)。inspire account use <name> 切换默认账号,account current / account list 查看状态,account rename <old> <new> 重命名;任意命令均可传 --account <name> 临时指定单次账号,互不干扰已有会话与 SSH 连接。inspire logout --account <name> --yes(等价于 account remove)仅清理本地账号目录,不影响平台运行中的任务。inspire update # 升级 CLI 并同步最新 Skill 文档
inspire update --check # 仅检查是否有可用更新
inspire update --cli-only # 仅升级 CLI 与浏览器运行时(保留本地自定义 Skill)
inspire update --skill-only # 仅同步 SKILL.md 与 references/
inspire uninstall # 卸载 CLI 与已部署的 Skill 文档
inspire uninstall 默认保留 ~/.inspire 账号目录与 Playwright 浏览器缓存;如需一并清除,可附加 --purge 与 --purge-runtime(业务仓库中的 INSPIRE.md 永远不会被删除)。若 CLI 环境损坏无法执行,也可通过 install.sh --uninstall 清理。
安装完成后,直接在 Claude Code、Codex、Cursor 等客户端中向 Agent 描述实验目标即可:
“帮我看看
分布式训练空间哪个 H200 计算组现在有空闲 8 卡整节点,用当前项目的基底镜像提交一个 2 机 16 卡训练任务跑/inspire/hdd/project/.../train.sh,盯一下调度事件和前 50 步 TensorBoard loss 是否正常下降。”
Agent 会按 SKILL.md 的标准执行闭环自动完成操作:查询实时计算组余量与匹配配额 → 校验启动参数并提交任务 → 聚合控制器与 Pod 级事件排查排队或拉取异常 → 直读日志与 TensorBoard 标量数据汇报收敛趋势。
所有命令都直接使用你在平台上看到的空间名、项目名和任务名,既方便日常手敲,也可以加上 --json 编写自动化脚本:
# 1. 查看计算组保障余量、可抢占低优卡数与空闲 8 卡整节点数
inspire resources availability --workspace 分布式训练空间 --group H200
# 2. 生成 OpenSSH 配置并直接通过本地终端或 VS Code Remote 连接 Notebook
inspire notebook ssh-config dev-box >> ~/.ssh/config
# 3. 提交挂载数据广场只读数据集的 GPU 训练任务
inspire job create -n exp-sft --workspace 分布式训练空间 --project <project> \
--group H200-2号机房 -q 8,160,1600 --image <image> --nodes 2 \
--dataset pixabay-81k:v0 -c "bash /inspire/hdd/project/.../run.sh"
# 4. 巡检任务状态、聚合日志,并直接读取 TensorBoard 训练曲线
inspire job status exp-sft --workspace 分布式训练空间
inspire job logs exp-sft --workspace 分布式训练空间
inspire tensorboard scalars exp-sft-tb --workspace 分布式训练空间 --tag train/loss --points 20
以下速览表展示了 inspire CLI 覆盖的核心功能域,点击下方各分类面板可查看详细机制。完整参数说明请执行 inspire <group> <subcommand> --help。
| 功能模块 | 命令入口 | 核心能力亮点 |
|---|---|---|
| 交互开发 | inspire notebook |
OpenSSH 与受限节点 JupyterTerminal 双通道执行、scp 传输、Web 端口代理、在线固化/压平镜像 |
| GPU 训练 | inspire job |
单卡至多机 8 卡整节点分布式任务、batch 批量提交、故障节点排除/指定节点、失败保留容器排查 |
| CPU 批处理 | inspire hpc |
自动封装 #SBATCH 脚本、提交前拦截物理配额与 Slurm 任务划分冲突、Steps 确认 srun 真实执行 |
| 弹性集群 | inspire ray |
单 Head + 多弹性 Worker Group 伸缩配置、停机保留拓扑一键重启、scaling 扩缩容历史审计 |
| 在线推理 | inspire serving |
支持已注册模型与广场模型(--model-source plaza)直连部署、扩缩容与回滚、QPS/吞吐监控、API Key 注入 |
| 训练曲线 | inspire tensorboard |
独立轻量实例管理,tags 与 scalars 免浏览器直读起止值、极值与最新采样点 |
| 监控排障 | events · logs · shell |
控制器与 Pod 聚合事件、多实例标注日志、metrics 趋势图表、直连运行容器交互式 PTY 终端 |
| 资源情报 | inspire resources |
保障余量、可抢占低优 GPU、物理 8 卡整节点容量、按项目/成员用量归因、宿主机内核级节点事件 |
| 镜像与数据 | image · model · dataset |