翻篇收录说明
翻篇网页快照

Skills | AI SDK

https://ai-sdk.dev/docs/ai-sdk-harnesses/skills

最近抓取:2026-12-04 02:59:31(北京时间)

最近内容变化:2026-11-30 23:36:01(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Use skills with AI SDK harnesses.

正文摘录

AI SDK HarnessesMenuSkillsCopy for LLMView MarkdownAsk AI about this pageSkills are reusable instruction bundles that can be useful for project conventions, workflow guidance, domain-specific procedures, or any other instructions that should be discoverable by the underlying harness runtime. You can configure skills for a HarnessAgent or replace them between completed turns. Define Skills Pass skills to HarnessAgent with the skills setting: const agent = new HarnessAgent({ harness: claudeCode, skills: [ { name: 'careful-refactors', description: 'Make small, low-risk code changes.', content: 'Prefer minimal diffs. Preserve public APIs. Before editing, read references/checklist.md and follow it.', files: [ { path: 'references/checklist.md', content: '# Refactor checklist\n\n- Identify the smallest useful change.\n- Preserve public APIs.\n- Run the narrowest relevant test.', }, ], }, ], }); Each skill has: name: stable identifier for the skill. description: short model-facing summary. content: full instruction content. files: optional additional text files bundled with the skill. Additional files use skill-relative POSIX paths, for example reference.md, references/codes.md, or templates/config.json. Reference those paths from content when the agent should read them. When to Use Skills Use skills for reusable instructions that should be available on demand, instead of always being loaded into the agent's context like regular instructions. Use instructions for broad agent behavior and current-session priorities. Skills can be changed between completed turns using callOptionsSchema and prepareCall. See Change Settings Between Turns for details. Related HarnessAgent Harness tools Harness adapters PreviousToolsNextHarness Adapters