技能版本 1.0.0
ModelScope 平台交互技能
ModelScope平台技能,涵盖 ModelScope 模型/数据集的搜索、下载和上传;仓库管理;Studio 部署; MCP 服务的搜索、部署与配置;以及技能中心(Skills Center)的搜索、安装和发布。当用户提及 ModelScope 或任何平台操作时,请使用此技能。 对于复杂的 Studio 部署工作流,请使用 ms-studio-deploy;有关 MCP 和技能中心的详细信息,请参阅本技能的参考文档。
价格
免费
- 安装:免费
在组织开通时一次性收取;再次读取清单或下载不重复收费。
以上为公开标价。你的组织可能有协议价,以控制台显示的价格为准。
如何使用
为组织安装
开通即安装:组织固定使用开通时的版本(当前为 1.0.0)。升级到新版本需要取消后重新开通。
创建凭证
客户端使用组织凭证读取;绑定到数字人后,数字人使用绑定凭证按需加载。请求中携带:
Authorization: Bearer $ZGI_MARKET_KEY读取清单与安装包
清单列出版本、文件和校验值;安装包是一个 zip 文件。
读取清单 curl "https://market-api.zgi.im/v1/market/skills/modelscope-ms-hub-d526c4ab/manifest" \ -H "Authorization: Bearer $ZGI_MARKET_KEY"下载安装包 curl "https://market-api.zgi.im/v1/market/skills/modelscope-ms-hub-d526c4ab/package" \ -H "Authorization: Bearer $ZGI_MARKET_KEY" \ -o modelscope-ms-hub-d526c4ab.zip读取清单和下载安装包不计入用量。下载后请用响应头中的 SHA-256 校验文件。
技能说明
- 名称
- ms-hub
- 说明
- ModelScope unified operations entrypoint. Covers model/dataset search, download, and upload; repository management; Studio deployment; MCP service search, deployment, and configuration; and Skills Center search, install, and publish. Use this skill whenever the user mentions ModelScope or any platform operation. Use ms-studio-deploy for complex Studio deployment workflows; see this skill's references for the expanded MCP and Skills Center details.
会运行代码Python
技能包内含脚本文件,加载技能的运行时可能会执行它们,安装前请先阅读。
SKILL.md 节选
# ModelScope Unified Operations Entrypoint
> Verified with modelscope 1.37.1, Python 3.12 (2026-06-23)
Operate the full range of ModelScope platform capabilities through OpenAPI, CLI, and SDK, covering Hub (models/datasets), Studio, MCP services, and the Skills Center (Skills). This Skill serves as a quick-reference entrypoint; complex operational workflows require the dedicated Skill.
## Requirements
```bash
pip install modelscope
```
`pip install modelscope` installs both the SDK (`modelscope.hub.api.HubApi`) and two sets of command-line entrypoints:
- **`ms` (driven by modelscope_hub v0.1.2)**: Hub / Studio / MCP operations (`download`/`upload`/`create`/`deploy`/`mcp`/`secret`/…). This document uses `ms` uniformly for Hub/Studio/MCP commands.
- **`modelscope` (legacy CLI)**: additionally provides commands such as `skills` (`modelscope skills add`) — `ms` (modelscope_hub) **does not have** a `skills` subcommand.
> ⚠️ Both packages register the `ms` and `modelscope` entrypoints; which one actually takes effect depends on install order. If an entrypoint lacks a required subcommand (typically: `ms` has no `skills`), switch to the other entrypoint, or use the SDK / `curl install.sh` (see §9 and `references/skills-center.md`).
## Authentication
All operations rely on unified authentication:
```bash
# Environment variable
export MODELSCOPE_API_KEY="your_token"
# Token retrieval URL
# $MODELSCOPE_ENDPOINT/my/myaccesstoken
```
| Operation method | Authentication method |
|----------|----------|
| OpenAPI | `Authorization: Bearer $MODELSCOPE_API_KEY` |
| CLI | `ms login --token $MODELSCOPE_API_KEY` |
| SDK | `api.login(access_token=os.environ['MODELSCOPE_API_KEY'])` |
## Site selection & endpoint routing
ModelScope runs two independent sites — the **domestic** site `https://modelscope.cn` (default) and the **international** site `https://www.modelscope.ai`. They have separate accounts, access tokens, and content catalogs. Every operation here targets whichever site `$MODELSCOPE_ENDPOINT` points to.
### Pick the target site (intent analysis)
1. **Respect an existing setting** — if `MODELSCOPE_ENDPOINT` is already exported, use it as-is.
2. **Explicit intent** — "international" / "modelscope.ai" / "overseas" ⇒ international; "domestic" / "modelscope.cn" ⇒ domestic.
3. **Match the token or URL the user provides** — a `modelscope.ai` token or link ⇒ international (and vice versa).
4. **Default to the domestic site** (`https://modelscope.cn`) when there is no signal; ask the user if the task clearly targets one audience but the site is ambiguous.
### Configure
```bash
# Export the endpoint first — the examples below reference $MODELSCOPE_ENDPOINT:
export MODELSCOPE_ENDPOINT="https://modelscope.cn" # domestic (default)
# export MODELSCOPE_ENDPOINT="https://www.modelscope.ai" # international
export MODELSCOPE_API_KEY="<token issued by THAT site>" # tokens are site-scoped — must match the site
```
One `MODELSCOPE_ENDPOINT` reroutes everything derived from it: the OpenAPI base (`$MODELSCOPE_ENDPOINT/openapi/v1`), the `ms` CLI, the `modelscope_hub` SDK, and git push URLs (`$MODELSCOPE_ENDPOINT/{models,datasets,studios}/…`). Resolution precedence (modelscope_hub): explicit arg > `MODELSCOPE_ENDPOINT` > `MODELSCOPE_DOMAIN` (deprecated) > default `https://modelscope.cn`. For public reads you may also set `MODELSCOPE_PREFER_AI_SITE=true` to try `.ai` before `.cn`.
> **Tokens are site-scoped** (stored per endpoint host): a `modelscope.cn` token will not authorize write/private operations on `modelscope.ai`. Get each site's token from `$MODELSCOPE_ENDPOINT/my/myaccesstoken`.
>
> All examples below use `$MODELSCOPE_ENDPOINT/openapi/v1` as the base — **export `MODELSCOPE_ENDPOINT` first** (raw `curl` needs it set; the `ms` CLI and SDK additionally fall back to `https://modelscope.cn` when it is unset). A few marketplace/doc links (skills `install.sh`, `/docs/…`) show the domestic host — swap to your site's host when targeting international.
## Conventions
| Item | Value |SKILL.md 不止这些内容,安装后可阅读全文。
技能包内容
共 5 个文件,合计 55.3 KiB
- SKILL.md33.5 KiB
- references/mcp-services.md4.8 KiB
- references/skills-center.md5.8 KiB
- scripts/ms_inspect_dataset.py7.1 KiB
- scripts/ms_read_file.py4.0 KiB
来源与审核
- 审核状态
- 尚未审核,内容来自上游来源
- 许可证
- Apache License 2.0
审核状态是平台对上架信息的记录,不构成对上游服务质量或可用性的担保。