> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取 Skill

> 根据 ID 获取单个 Skill 的详细信息。

`GET /api/v1/cloud/skills/{skill_id}`

根据 ID 获取单个 Skill 的详细信息。

## 请求头

| 头部              | 必选 | 说明             |
| --------------- | -- | -------------- |
| `Authorization` | 是  | `Bearer <PAT>` |

## 路径参数

| 参数         | 类型     | 必选 | 说明           |
| ---------- | ------ | -- | ------------ |
| `skill_id` | string | 是  | Skill 的唯一标识符 |

## 查询参数

| 参数                | 类型      | 必选 | 说明                                             |
| ----------------- | ------- | -- | ---------------------------------------------- |
| `include_content` | boolean | 否  | 设为 `true` 时在 `content` 中返回 base64 编码的 Skill 内容 |

## 示例请求

```bash theme={null}
curl -X GET "https://api.qoder.com/api/v1/cloud/skills/skill_019e3bba474b73cfaf19eae9b5f5e66d" \
  -H "Authorization: Bearer $QODER_PAT"
```

## 示例响应

**HTTP 200 OK**

```json theme={null}
{
  "id": "skill_019e3bba474b73cfaf19eae9b5f5e66d",
  "type": "skill",
  "display_title": "test-skill-api-doc",
  "description": "A test skill for API documentation",
  "source": "custom",
  "latest_version": "1",
  "metadata": {
    "team": "docs"
  },
  "created_at": "2026-05-18T15:35:24.248164Z",
  "updated_at": "2026-05-18T15:35:24.248164Z"
}
```

## 响应字段

| 字段                 | 类型     | 说明                                                      |
| ------------------ | ------ | ------------------------------------------------------- |
| `id`               | string | Skill 唯一标识符（`skill_` 前缀）                                |
| `type`             | string | 资源类型，固定为 `"skill"`                                      |
| `display_title`    | string | 由已存储 Skill 名称派生的展示标题                                    |
| `description`      | string | Skill 描述                                                |
| `source`           | string | Skill 来源：`custom` 或 `qoder`                             |
| `latest_version`   | string | 最新版本号，字符串格式                                             |
| `metadata`         | object | 与 Skill 一起存储的自定义元数据对象；省略时为 `{}`                         |
| `content`          | string | base64 编码的 Skill 内容；仅在 `include_content=true` 且内容可读取时返回 |
| `content_encoding` | string | 与 `content` 同时返回，值为 `"base64"`                          |
| `created_at`       | string | 创建时间（ISO 8601）                                          |
| `updated_at`       | string | 最后更新时间（ISO 8601）                                        |

## 错误码

| HTTP | type                   | 触发条件                                                |
| ---- | ---------------------- | --------------------------------------------------- |
| 401  | `authentication_error` | 缺少或无效的认证令牌                                          |
| 404  | `not_found_error`      | Skill 不存在或不再可访问：`Skill '{skill_id}' was not found.` |

完整错误信封说明详见 [错误参考](/zh/cloud-agents/api/conventions/errors)。

## 相关

<CardGroup cols={2}>
  <Card title="Agent 技能" icon="sparkles" href="/zh/cloud-agents/skills">
    为 Agent 附加领域专业知识。
  </Card>
</CardGroup>
