> ## 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.