Files
opencode/packages/web/src/content/docs/ko/skills.mdx
2026-02-09 13:55:55 -06:00

223 lines
4.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Agent Skills"
description: "Define reusable behavior via SKILL.md definitions"
---
Agent Skill let OpenCode discover reusable instruction from your repo 또는 홈 디렉토리.
Skills are loaded on-demand via native `skill` tool-agents see available skills and can loaded full content when needed.
---
## 파일 장소
기술 이름 당 하나의 폴더를 만들고 내부 `SKILL.md`를 넣어.
OpenCode 이 위치를 검색:
- 프로젝트 구성: `.opencode/skills/<name>/SKILL.md`
- 글로벌 구성: `~/.config/opencode/skills/<name>/SKILL.md`
- 프로젝트 클로드 호환 : `.claude/skills/<name>/SKILL.md`
- 글로벌 클로드 호환 : `~/.claude/skills/<name>/SKILL.md`
- 프로젝트 에이전트 호환 : `.agents/skills/<name>/SKILL.md`
- 글로벌 에이전트 호환 : `~/.agents/skills/<name>/SKILL.md`
---
## 발견의 이해
Project-local paths의 경우, OpenCode는 git worktree에 도달 할 때까지 현재 작업 디렉토리에서 걷습니다.
그것은 `.opencode/`에 있는 어떤 어울리는 `skills/*/SKILL.md` 및 어떤 어울리는 `.claude/skills/*/SKILL.md` 또는 `.agents/skills/*/SKILL.md`를 방법 적재합니다.
세계적인 정의는 또한 `~/.config/opencode/skills/*/SKILL.md`, `~/.claude/skills/*/SKILL.md` 및 `~/.agents/skills/*/SKILL.md`에서 적재됩니다.
---
## 쓰기 frontmatter
각 `SKILL.md`는 YAML frontmatter로 시작해야 합니다.
이 필드는 인식됩니다:
- `name` (필수)
- `description` (필수)
- (선택) `license`
- (선택) `compatibility`
- `metadata` (선택 사항, 문자열에 문자열 맵)
알려진 frontmatter 필드는 무시됩니다.
---
## 유효 이름
`name`는 해야 합니다:
- 164자
- 단 하나 hyphen 분리기를 가진 더 낮은 케이스 alphanumeric가 있으십시오
- `-`로 시작 또는 끝 아닙니다
- 연속 `--` 포함하지
- `SKILL.md`를 포함하는 디렉토리 이름을 일치
동등한 regex:
```text
^[a-z0-9]+(-[a-z0-9]+)*$
```
---
## 길이 규칙을 따르십시오
`description`는 1-1024 특성이어야 합니다.
제대로 선택하기 위해 에이전트에 대해 충분히 유지하십시오.
---
## 예제 사용
이처럼 `.opencode/skills/git-release/SKILL.md` 만들기:
```markdown
---
name: git-release
description: Create consistent releases and changelogs
license: MIT
compatibility: opencode
metadata:
audience: maintainers
workflow: github
---
## What I do
- Draft release notes from merged PRs
- Propose a version bump
- Provide a copy-pasteable `gh release create` command
## When to use me
Use this when you are preparing a tagged release.
Ask clarifying questions if the target versioning scheme is unclear.
```
---
## 인식 도구 설명
OpenCode는 `skill` 도구 설명에서 사용할 수있는 기술을 나열합니다.
각 항목에는 기술 이름 및 설명이 포함됩니다.
```xml
<available_skills>
<skill>
<name>git-release</name>
<description>Create consistent releases and changelogs</description>
</skill>
</available_skills>
```
에이전트는 도구를 호출하여 기술을로드 :
```
skill({ name: "git-release" })
```
---
## 권한 구성
기술 에이전트가 `opencode.json`의 패턴 기반 권한을 사용하여 액세스 할 수있는 제어 :
```json
{
"permission": {
"skill": {
"*": "allow",
"pr-review": "allow",
"internal-*": "deny",
"experimental-*": "ask"
}
}
}
```
| 권한 | 동작 |
| --------- | ----------------------------------------- |
| `allow` | 기술이 즉시 로드됨 |
| `deny` | 에이전트에서 기술 숨김, 접근 거부 |
| `ask` | 로드 전에 사용자에게 승인 요청 |
패턴 지원 와일드 카드: `internal-*` 경기 `internal-docs`, `internal-tools`, 등.
---
## 에이전트 당 override
글로벌 디폴트보다 특정 에이전트 다른 권한을 부여합니다.
**사용자 지정 에이전트 ** ( 에이전트 frontmatter):
```yaml
---
permission:
skill:
"documents-*": "allow"
---
```
** 내장 에이전트 ** (`opencode.json`에서):
```json
{
"agent": {
"plan": {
"permission": {
"skill": {
"internal-*": "allow"
}
}
}
}
}
```
---
## 기술 도구 비활성화
그들을 사용하지 않는 대리인을위한 완전히 비활성화 된 기술 :
**사용자 지정 에이전트**:
```yaml
---
tools:
skill: false
---
```
** 내장 에이전트 **:
```json
{
"agent": {
"plan": {
"tools": {
"skill": false
}
}
}
}
```
비활성화 할 때, `<available_skills>` 섹션은 완전히 부유합니다.
---
## 문제 해결 선적
기술이 나타나지 않는 경우:
1. `SKILL.md`는 모든 모자에서 spelled
2. `name`와 `description`를 포함하는 검사
3. 기술 이름은 모든 위치에서 독특합니다.
4. `deny`를 가진 허가를 검사하십시오 대리인에서 숨겨집니다