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

# 提交技能

> 提交技能清單以供市場審核和發佈。

提交技能清單以供市場審核。系統會立即運行自動化檢查，並根據其風險等級將該技能自動批准或加入人工審核隊列。

## 身份驗證

需要 Bearer 令牌。參見[身份驗證](/api-reference/authentication)。

## 請求正文

<ParamField body="manifest" type="object" required>
  完整的技能清單對象。所有字段請參見[清單參考](/skills/manifest-reference)。
</ParamField>

<ParamField body="skill_id" type="string">
  如果這是版本更新（而非新提交），則為已存在的技能 UUID。
</ParamField>

## 請求示例

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://www.hitheo.ai/api/v1/skills/submit \
    -H "Authorization: Bearer $THEO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "manifest": {
        "name": "Inventory Check",
        "slug": "inventory-check",
        "version": "1.0.0",
        "description": "Real-time inventory lookup and reorder alerts",
        "category": "automation",
        "author": { "name": "Acme Corp" },
        "systemPromptExtension": "You are an inventory management specialist...",
        "tools": [],
        "permissions": ["execute:tools"]
      }
    }'
  ```

  ```typescript SDK theme={null}
  import { defineSkill } from "@hitheo/sdk";

  const manifest = defineSkill({
    name: "Inventory Check",
    slug: "inventory-check",
    version: "1.0.0",
    description: "Real-time inventory lookup and reorder alerts",
    category: "automation",
    author: { name: "Acme Corp" },
    systemPromptExtension: "You are an inventory management specialist...",
    permissions: ["execute:tools"],
  });

  const result = await theo.submitSkill(manifest);
  console.log(result.status);     // "approved" or "pending_review"
  console.log(result.reviewTier); // "auto", "staff", or "security"
  ```
</CodeGroup>

## 響應（HTTP 201）

<ResponseField name="submission" type="object">
  <Expandable title="Submission object">
    <ResponseField name="id" type="string">提交 ID。</ResponseField>
    <ResponseField name="status" type="string">`"approved"` 或 `"pending_review"`。</ResponseField>
    <ResponseField name="reviewTier" type="string">風險等級：`"auto"`、`"staff"` 或 `"security"`。</ResponseField>
    <ResponseField name="autoApproved" type="boolean">該技能是否已被自動批准。</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="review" type="object">
  <Expandable title="Review results">
    <ResponseField name="passed" type="boolean">自動化檢查是否通過。</ResponseField>
    <ResponseField name="tier" type="string">分配到的審核等級。</ResponseField>
    <ResponseField name="checks" type="object">詳細的檢查結果。</ResponseField>
  </Expandable>
</ResponseField>

### 風險等級

| 等級 | 說明 |
| - | - |
| `auto` | 低風險清單，通過所有自動化檢查——無需人工審核即可批准。 |
| `staff` | 引入了工具、知識文件或寫入範圍權限的清單——由 Theo 市場團隊審核。 |
| `security` | 同時結合外部網絡訪問與寫入能力或其他敏感面的清單——發佈前由安全團隊審核。 |

### 響應示例（自動批准）

```json theme={null}
{
  "submission": {
    "id": "sub_abc123",
    "status": "approved",
    "reviewTier": "auto",
    "autoApproved": true
  },
  "review": {
    "passed": true,
    "tier": "auto",
    "checks": { "schema": "pass", "injection_scan": "pass", "tool_names": "pass" }
  }
}
```

## 錯誤

| 狀態碼 | 代碼 | 說明 |
| - | - | - |
| 422 | `review_failed` | 自動化檢查未通過——`review.checks` 中包含詳細信息 |
| 429 | `rate_limit_exceeded` | 提交頻率超出限制——請稍後重試 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.