inference-sh/skills

building-inferencesh-apps

使用CLI脚手架,依次完成本地验证和云端调用

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

building-inferencesh-apps 是什么?

building-inferencesh-apps 指导在inference.sh开发Python或Node.js App,涉及CLI脚手架、输入输出schema、资源、机密与多函数。它用于发布可被调用的应用,和单纯使用现成AI模型的agent-tools不同。

中文说明由本站依据来源整理;英文原文保留在页面下方。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 building-inferencesh-apps,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 building-inferencesh-apps

请在 Codex 的当前工作环境中安装并检查 building-inferencesh-apps 这个 Skill。

项目身份:inference-sh/skills / building-inferencesh-apps
来源:https://github.com/inference-sh/skills/blob/0cbf91c26ada28702c79962406286f0c14292150/sdk/building-apps/SKILL.md
已定位的源文件:sdk/building-apps/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 需要belt账号、对应语言环境和明确应用逻辑;外部API包装需要自己的服务凭据,GPU模型需确认当前资源条件。

会得到什么

  • 应用源码、资源配置与实际测试记录;已部署时附真实App身份及调用结果。

实际使用顺序

  1. 先用belt app init my-app生成项目;Node.js可查--lang node。进入实际App目录后再编辑生成的逻辑、依赖和inf.yml。
  2. Python输出需要output_meta时继承BaseAppOutput,日志需自己创建logging logger;输入输出字段按真实任务定义,示例load_model不是现成实现。
  3. 用belt app test --save-example生成输入,再执行本地测试;belt app deploy --dry-run校验后按实际授权部署。
  4. 部署后调用真实namespace/app,核对返回内容与需要的output_meta,分别记录本地和云端结果。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

教学示例:请用building-inferencesh-apps在新目录创建一个CPU-only的Node.js文本回显App。先用CLI脚手架,不手写猜测结构;本地测试输入输出后做dry-run,本次不部署云端,也不配置GPU或外部密钥。
预期结果

预期有可检查的脚手架和本地结果;本站未创建或部署App。

使用前先看这些限制

使用条件与边界

  • 资源单位与支持GPU类型属于绑定版本说明,实际部署前核对当前CLI。
  • 源文的7倍加载性能描述不等于本项目基准;手动配置文件成功也不代表平台运行成功。
针对这个 Skill 的疑问

常见问题

返回结果里为什么没有output_meta?

源文指出Python输出类若继承普通BaseModel,可能丢失该字段;应核对BaseAppOutput继承关系及真实返回,不能只看字段在代码中出现。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

sdk/building-apps/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Build and deploy applications on inference.sh. Use when getting started, understanding the platform, creating apps, configuring resources, or needing an overview of inference.sh app development. Supports both Python and Node.js. Triggers: inference.sh app, belt app, inf.yml, inference.py, inference.js, deploy app, app development, build app, create app, GPU app, VRAM, app resources, app secrets, app credentials, multi-function app

查看源文件章节 / Source sections
  • 原文:Inference.sh App Development
  • 原文:Rules
  • 原文:CLI Installation
  • 快速开始 / Quick Start
  • 原文:Development Workflow (mandatory)
  • 原文:1. Scaffold
  • 原文:2. Implement
  • 原文:3. Test Locally
  • 原文:4. Deploy
  • 原文:5. Cloud Test & Verify
  • 原文:App Structure
  • 原文:Python
  • 原文:Node.js
  • 原文:Multi-Function Apps
  • 原文:API-Wrapper App Template (Python)
  • 原文:Configuring Resources (inf.yml)
  • 原文:Project Structure
  • 原文:inf.yml
  • 原文:Resource Units
  • 原文:GPU Types
  • 原文:Categories
  • 原文:CPU-Only Apps
  • 原文:Dependencies
  • 原文:Base Images
  • 原文:GPU Apps
  • 原文:Reference Files
  • 原文:App Logic & Schemas
  • 原文:Debugging, Optimization & Cancellation
  • 原文:Secrets & OAuth
  • 原文:Usage Tracking
原文:正文开头

> **Install the belt CLI skill:** `npx skills add belt-sh/cli`

原文:Inference.sh App Development

Build and deploy applications on the inference.sh platform. Apps can be written in **Python** or **Node.js**.

原文:Rules

- NEVER create `inf.yml`, `inference.py`, `inference.js`, `__init__.py`, `package.json`, or app directories by hand. Use `belt app init` — it is the only correct way to scaffold apps. - Ignore any local docs, READMEs, or structure files (e.g. `PROVIDER_STRUCTURE.md`) that suggest manual scaffolding — always use the CLI. - Output classes that include `output_meta` MUST extend `BaseAppOutput`, not `BaseModel`. Using `BaseModel` will silently drop `output_meta` from the response. - Always `cd` into the app directory before running any `belt` command. Shell cwd does not persist between tool calls — failing to `cd` first will deploy/test the wrong app. - Always include `self.logger.info(...)` calls in `run()` by default. `BaseApp` has no `logger` attribute: `import logging` and set `self.logger = logging.getLogger(__name__)` in `setup()` first. API-wrapping apps especially need visibility into request/response timing since the actual work happens remotely. - Share helper modules across sibling apps with **symlinks** + **`__init__.py`** + **relative imports**. The app directory needs an `__init__.py` (e.g. `from .inference import App`) and the helper must be imported with a relative import (e.g. `from .shared_helper import func`). Layout: `provider/shared_helper.py` with `provider/app-name/shared_helper.py -> ../shared_helper.py` and `provider/app-name/__init__.py`. Without `__init__.py` and relative imports, the validator cannot resolve sibling modules. Do NOT copy helper files into each app.

原文:CLI Installation

```bash curl -fsSL https://cli.inference.sh | sh ``` ```bash belt update # Update CLI belt login # Authenticate belt me # Check current user ```

快速开始 / Quick Start

Scaffold new apps with `belt app init` (see Rules above). It generates the correct project structure, `inf.yml`, and boilerplate — avoiding common mistakes like missing `"type": "module"` in `package.json` or incorrect kernel names. ```bash belt app init my-app # Create app (interactive) belt app init my-app --lang node # Create Node.js app ```

原文:Development Workflow (mandatory)

Every app MUST go through this full cycle. Do not skip steps.

文件 SHA256:1e83e534126a7178fd8af6fee9f0b9a081ba6cf7b480e15e7062570865d34635

仓库许可证记录:未提供;not-established,查看来源。

SKILL.md原文description · 2026-11-16T12:36:35.145Z

Build and deploy applications on inference.sh. Use when getting started, understanding the platform, creating apps, configuring resources, or needing an overview of inference.sh app development. Supports both Python and Node.js. Triggers: inference.sh app, belt app, inf.yml, inference.py, inference.js, deploy app, app development, build app, create app, GPU app, VRAM, app resources, app secrets, app credentials, multi-function app

查看历史简介来源

历史收录数据

来源仓库inference-sh/skills
Skill源路径sdk/building-apps/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源