fix: standardize zh-CN docs character set and terminology (#13500)

This commit is contained in:
Niu Shuai
2026-02-14 02:58:12 +08:00
committed by GitHub
parent bc1fd0633d
commit 72c09e1dcc
18 changed files with 305 additions and 306 deletions

View File

@@ -1,10 +1,10 @@
---
title: 代理技巧》
description: “贯穿 SKILL.md 定义可重用行为”
title: 代理技
description: “通过 SKILL.md 定义可复用的行为”
---
代理让 opencode 能从您的存储库或主目录中找到可重用的指令。
技能贯穿本机 `skill` 工具输入导入 - 代理可以查看可用技能并可以在需要时加载完整内容。
代理技能使 OpenCode 能从您的库或主目录中发现可重用的指令。
技能通过原生 `skill` 工具输入导入 - 代理可以查看可用技能并可以在需要时加载完整内容。
---
@@ -34,7 +34,7 @@ Global definitions are also loaded from `~/.config/opencode/skills/*/SKILL.md`,
## 编写 Frontmatter
每个 `SKILL.md` 必须以 YAML frontmatter 。
識別这些位:
识别这些位:
- `name`(必填)
- `description`(必填)
@@ -50,13 +50,13 @@ Global definitions are also loaded from `~/.config/opencode/skills/*/SKILL.md`,
`name` 必须:
- 度为 164 个字元
- 为小字母字并带有單个連字元分隔符
- 不以 `-` 始或
- 不包含連續的 `--`
- 度为 164 个字元
- 为小字母字并带有单个连字元分隔符
- 不以 `-` 始或
- 不包含连续的 `--`
- 匹配包含 `SKILL.md` 的目录名
等效的正表示式:
等效的正表示式:
```text
^[a-z0-9]+(-[a-z0-9]+)*$
@@ -67,7 +67,7 @@ Global definitions are also loaded from `~/.config/opencode/skills/*/SKILL.md`,
## 遵循长度规则
`description` 必须是 1-1024 个字元。
保持足夠具體,以便代理能正确选择。
保持足够具体,以便代理能正确选择。
---
@@ -114,7 +114,7 @@ opencode 列出了 `skill` 工具描述中的可用技能。
</available_skills>
```
代理通过呼叫工具來載入技能:
代理通过呼叫工具来载入技能:
```
skill({ name: "git-release" })
@@ -139,7 +139,7 @@ Control which skills agents can access using pattern-based permissions in `openc
}
```
| 可 | 行为 |
| 可 | 行为 |
| ------- | -------------------------- |
| `allow` | 技能立即加载 |
| `deny` | 对特工隐藏技能,访问被拒绝 |
@@ -153,7 +153,7 @@ Control which skills agents can access using pattern-based permissions in `openc
为特定代理授予与全域性默认权限不同的权限。
**对于自定代理**(在代理前言中):
**对于自定代理**(在代理前言中):
```yaml
---
@@ -185,7 +185,7 @@ permission:
完全禁用不应该使用技能的特工:
**对于定代理**
**对于定代理**
```yaml
---
@@ -194,7 +194,7 @@ tools:
---
```
**对于建代理**
**对于建代理**
```json
{
@@ -208,15 +208,15 @@ tools:
}
```
禁用`<available_skills>` 部分将被完全省略。
禁用`<available_skills>` 部分将被完全省略。
---
## 解决加载问题
如果某技能有显示:
如果某技能有显示:
1. 验证 `SKILL.md` 拼写为全部大写
2. 检查 frontmatter 是否包括 `name` 和 `description`
3. 保技能名称在所有位置都是唯一的
3. 保技能名称在所有位置都是唯一的
4. 查询权限——具有`deny`的代理隐藏技能