> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # `createSkill()` Agent에게 직접 전달할 수 있는 인라인 스킬을 생성합니다.`skills`파일 시스템이나 작업 공간이 없는 구성입니다. 반환된 객체는 `Skill` 인터페이스를 구현하며, 파일 시스템에서 탐색된 Skill을 사용할 수 있는 모든 곳에서 작동합니다. ## 사용예 ```typescript import { createSkill } from '@mastra/core/skills' const reviewSkill = createSkill({ name: 'code-review', description: 'Use when reviewing code changes.', instructions: ` When reviewing code: 1. Check for correctness 2. Check for style consistency 3. Look for potential bugs `, references: { 'checklist.md': '# Review Checklist\n- No unused imports\n- Error handling present', }, }) ``` ## 매개변수 **name** (`string`): 고유한 Skill 이름입니다. Agent가 Skill을 활성화할 때 식별자로 사용됩니다. 유효한 슬러그여야 합니다(소문자, 하이픈 허용). **description** (`string`): 시스템 메시지에서 Agent에게 표시되는 짧은 설명입니다. Agent가 Skill을 언제 사용할지 판단하는 데 도움이 됩니다. **instructions** (`string`): Markdown으로 작성된 전체 Skill 지침입니다. Agent가 Skill을 활성화하면 대화에 로드됩니다. **references** (`Record`): Agent가 skill\_read Tool로 읽을 수 있는 지원 문서입니다. 키는 파일 이름이고 값은 파일 내용입니다. **license** (`string`): Skill의 SPDX 라이선스 식별자입니다. **compatibility** (`unknown`): 호환성 요구 사항입니다. Agent Skills 사양에서는 이 항목을 유연하게 정의하므로 문자열 배열, 객체 또는 도구가 기대하는 임의의 구조를 사용할 수 있습니다. **user-invocable** (`boolean`): 최종 사용자가 이 Skill을 직접 호출할 수 있는지 여부입니다. 기본값은 undefined입니다(Agent가 결정). **metadata** (`Record`): Skill에 연결되는 임의의 메타데이터입니다. ## 반환 값 `Skill` 인터페이스를 구현하는 `InlineSkill` 객체를 반환합니다. ```typescript interface InlineSkill extends Skill { __inline: true __referenceContents: Record } ``` 스킬에는 다음과 같은 합성 경로가 할당됩니다.`inline/` (e.g., `inline/code-review`). ## 확인 `createSkill()`파일 시스템 기술과 동일한 규칙을 사용하여 입력의 유효성을 검사합니다. - `name`필수이며 유효한 슬러그여야 합니다. - `description`필수 - `instructions`필수이며 비어 있지 않습니다. 유효성 검사에 실패하면 잘못된 필드의 세부 정보와 함께 `Error`가 발생합니다. ```typescript // Throws: Invalid skill "": name is required createSkill({ name: '', description: 'test', instructions: 'test' }) ``` ## 관련된 - [Agent 기술](https://mastra.zisheng.pro/ko/docs/agents/skills) - [작업 공간 기술](https://mastra.zisheng.pro/ko/docs/workspace/skills) - [`.getSkill()`참조](https://mastra.zisheng.pro/ko/reference/agents/getSkill) - [`.listSkills()`참조](https://mastra.zisheng.pro/ko/reference/agents/listSkills)