The Agent Skills Directory
npx skills add https://smithery.ai/skills/IgorWarzocha/skill-creator创建扩展智能体能力的 opencode 技能,提供专业知识和工作流程。
| 作用域 | 路径 |
|---|---|
| 项目 | .opencode/skill/<name>/SKILL.md |
| 全局 | ~/.config/opencode/skill/<name>/SKILL.md |
our-api-patterns、project-deploy)pdf-editor、commit-helper)对于项目路径,OpenCode 会从当前工作目录向上遍历到 git 工作树根目录。
skill-name/
├── SKILL.md # 必需 - 前置元数据 + 说明
├── scripts/ # 可选 - 可执行代码 (Python/Bash)
├── references/ # 可选 - 按需加载的文档
└── assets/ # 可选 - 模板、图片、字体
---
name: skill-name
description: [自包含的工作流程摘要 — 请参阅以下指南]
---
# 此处为说明 (markdown 正文)
名称:简短、连字符格式的标识符。应具有描述性但简洁(最多 64 个字符)。
描述:智能体在加载前会看到此内容和名称。必须是自包含的,包含:
关键:description 字段是主要的触发机制。
技能是 标准操作程序/工作流程,而非智能体。请勿使用诸如 "你是一个..." 或 "[角色] 专家" 之类的角色描述。
在加载之前,智能体仅在 <available_skills> 中看到 名称 和 描述:
<available_skills>
<skill>
<name>skill-name</name>
<description>...</description>
</skill>
</available_skills>
描述必须是自包含的——智能体不会为了"看看它能做什么"而加载一个技能。
名称和描述应协同工作:
typescript-advanced)描述模式(针对 LLM 优化):
---
name: skill-name
description: |-
[动作动词/能力]。用于 [特定情况]。主动在 [上下文] 时使用。
示例:
- 用户:"查询" → 动作
- 用户:"查询" → 动作
---
密集、机器可解析、具体。避免冗长的叙述。
关键的 YAML 语法: 包含示例的多行描述必须使用字面块标量 (|-)。连字符会去除尾随换行符。请勿使用带有未加引号的冒号或列表的普通 YAML:
# ❌ 错误 - 破坏 YAML 解析
description: 处理插件。示例:
- 用户:"..." → 动作
# ✅ 正确 - 对多行使用 |-
description: |-
处理插件。
示例:
- 用户:"..." → 动作
示例:
---
name: typescript-advanced
description: |-
处理 TypeScript 5.9 高级类型、泛型、严格配置、类型错误、迁移、
可擦除语法合规性以及测试编写。主动在需要复杂泛型、
条件类型、实用工具类型、TS 编译器配置或测试编写时使用。
示例:
- 用户:"创建类型安全的事件发射器" → 使用泛型和映射类型实现
- 用户:"迁移到严格的 TypeScript" → 添加可辨识联合类型、穷举检查
- 用户:"根据 OpenAPI 构建类型化 API 客户端" → 生成带有推断功能的请求/响应类型
- 用户:"编写单元测试" → 使用真实的夹具创建严格、类型化的测试
---
要求:
用户:"..." → ... 示例|- 字面块标量(带有列表/冒号的普通 YAML 会破坏解析)减少冗余: 不要在 SKILL.md 正文中重复描述内容。
| 目录 | 用途 | 何时使用 |
|---|---|---|
scripts/ | 可复用的 Python/Bash 代码 | 相同代码被反复重写时 |
references/ | 文档、模式、API 规范 | 智能体工作时需要的信息 |
assets/ | 模板、图片、字体 | 输出中使用的文件(不加载) |
不得包含:README.md、CHANGELOG.md、INSTALLATION_GUIDE.md 或其他辅助文档。技能只包含智能体执行工作所需的内容。
上下文窗口是共享的。只添加智能体尚未拥有的信息。
| 自由度级别 | 格式 | 使用时机 |
|---|---|---|
| 高 | 文本说明 | 存在多种有效方法时 |
| 中 | 伪代码/参数化脚本 | 存在首选模式时 |
| 低 | 特定脚本 | 操作脆弱、一致性至关重要时 |
description 是主要的发现机制references/将核心工作流程保留在 SKILL.md 中。将特定变体的细节移至 references/。
示例结构:
cloud-deploy/
├── SKILL.md (工作流程 + 提供商选择)
└── references/
├── aws.md
├── gcp.md
└── azure.md
智能体仅加载相关的提供商文件。
收集技能将如何使用的具体示例。提问:
仅在使用模式已经明确时可以跳过此步。
针对每个用例,识别可复用资源:
| 如果你发现自己... | 添加到... |
|---|---|
| 重写相同的代码 | scripts/ |
| 重新发现模式/文档 | references/ |
| 复制相同的模板 | assets/ |
示例:
pdf-editor:"旋转此 PDF" → scripts/rotate_pdf.pybigquery:"今天有多少用户?" → references/schema.mdfrontend-builder:"给我构建一个待办事项应用" → assets/react-template/手动创建技能目录和 SKILL.md:
# 全局技能 (个人工具)
mkdir -p ~/.config/opencode/skill/my-skill
# 项目技能 (团队特定)
mkdir -p .opencode/skill/my-skill
创建带有前置元数据的 SKILL.md:
---
name: my-skill
description: |-
[工作流程/能力]。用于 [特定情况]。主动在 [上下文] 时使用。
示例:
- 用户:"查询" → 动作
- 用户:"查询" → 动作
---
# [技能名称]
[说明从这里开始]
描述模板示例:
---
name: typescript-advanced
description: |-
处理 TypeScript 5.9 高级类型、泛型、严格配置、类型错误、迁移、
以及测试编写。主动在需要复杂泛型、条件类型、实用工具类型、TS 编译器
配置或测试编写时使用。
示例:
- 用户:"创建类型安全的事件发射器" → 使用泛型和映射类型实现
- 用户:"迁移到严格的 TypeScript" → 添加可辨识联合类型、穷举检查
- 用户:"根据 OpenAPI 构建类型化 API 客户端" → 生成带有推断功能的请求/响应类型
- 用户:"编写单元测试" → 使用真实的夹具创建严格、类型化的测试
---
根据需要添加可选目录:
cd my-skill
mkdir scripts references assets # 只创建你实际会用到的目录
写作指南:
前置元数据要求:
name:小写连字符格式,必须与目录名完全匹配description:关键 — 遵循上面指定的格式。这是智能体发现你的技能的方式。验证技能是否可被发现:
SKILL.md 存在于技能目录中name: 完全匹配<available_skills> 部分注意: 技能直接从其目录使用。不需要打包或安装步骤。
在实际使用后:
description 以包含缺失的触发上下文在智能体配置中控制每个智能体的技能访问权限:
{
"permission": {
"skill": { "*": "deny", "my-skill": "allow" }
}
}
值:"allow"、"deny"、"ask"。使用 "*" 作为通配符默认值。
<question_tool>
批处理: 对于 2 个以上相关的问题,使用 question 工具。单个问题 → 纯文本。
语法: header ≤12 字符,label 1-5 个词,默认选项添加 "(Recommended)"。
何时提问:请求不明确、适用多种技能模式或范围不清晰时。
</question_tool>
每周安装次数
671
来源
首次出现
2026年3月6日
安全审计
安装于
claude-code336
opencode307
cursor261
codex257
github-copilot250
gemini-cli246
Create opencode skills that extend agent capabilities with specialized knowledge and workflows.
| Scope | Path |
|---|---|
| Project | .opencode/skill/<name>/SKILL.md |
| Global | ~/.config/opencode/skill/<name>/SKILL.md |
our-api-patterns, )广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
project-deploypdf-editor, commit-helper)For project paths, OpenCode walks up from cwd to git worktree root.
skill-name/
├── SKILL.md # Required - frontmatter + instructions
├── scripts/ # Optional - executable code (Python/Bash)
├── references/ # Optional - docs loaded on-demand
└── assets/ # Optional - templates, images, fonts
---
name: skill-name
description: [Self-contained workflow summary — see guidelines below]
---
# Instructions here (markdown body)
Name : Short, hyphen-case identifier. Should be descriptive but concise (max 64 chars).
Description : Agent sees this + the name before loading. Must be self-contained with:
CRITICAL: Thedescription field is the primary trigger mechanism.
Skills are SOPs/workflows , NOT agents. DO NOT use role descriptions like "You are a..." or "[Role] expert."
Before loading, the agent sees only the name and description in <available_skills>:
<available_skills>
<skill>
<name>skill-name</name>
<description>...</description>
</skill>
</available_skills>
The description must be self-contained — agents won't load a skill just to "see what it does."
Name + description should work together:
typescript-advanced)Description pattern (LLM-optimized):
---
name: skill-name
description: |-
[Action verb/capabilities]. Use for [specific cases]. Use proactively when [contexts].
Examples:
- user: "query" → action
- user: "query" → action
---
Dense, machine-parseable, specific. Avoid prose.
CRITICAL YAML SYNTAX: Multi-line descriptions with examples MUST use literal block scalar (|-). The hyphen strips the trailing newline. Do NOT use plain YAML with unquoted colons or lists:
# ❌ WRONG - breaks YAML parsing
description: Handle plugins. Examples:
- user: "..." → action
# ✅ CORRECT - use |- for multi-line
description: |-
Handle plugins.
Examples:
- user: "..." → action
Example:
---
name: typescript-advanced
description: |-
Handle TypeScript 5.9 advanced typing, generics, strict configs, type errors, migrations,
erasable syntax compliance, and test writing. Use proactively for complex generics,
conditional types, utility types, TS compiler config, or test authoring.
Examples:
- user: "Create a type-safe event emitter" → implement with generics and mapped types
- user: "Migrate to strict TypeScript" → add discriminated unions, exhaustive checks
- user: "Build typed API client from OpenAPI" → generate request/response types with inference
- user: "Write unit tests" → create strict, typed tests with realistic fixtures
---
Requirements:
user: "..." → ... examples|- literal block scalar for multi-line descriptions (plain YAML with lists/colons breaks parsing)Reduce redundancy: Don't repeat description content in SKILL.md body.
| Directory | Purpose | When to use |
|---|---|---|
scripts/ | Reusable Python/Bash code | Same code rewritten repeatedly |
references/ | Docs, schemas, API specs | Info agent needs while working |
assets/ | Templates, images, fonts | Files used in output (not loaded) |
MUST NOT include : README.md, CHANGELOG.md, INSTALLATION_GUIDE.md, or other auxiliary docs. Skills contain only what the agent needs to do the job.
The context window is shared. Only add info the agent doesn't already have.
| Freedom Level | Format | Use When |
|---|---|---|
| High | Text instructions | Multiple valid approaches |
| Medium | Pseudocode/parameterized scripts | Preferred pattern exists |
| Low | Specific scripts | Fragile ops, consistency critical |
Metadata (name + description) - Always loaded (~100 words)
description is the PRIMARY discovery mechanismSKILL.md body - Loaded when skill triggers
Bundled resources - Loaded on-demand by agent
references/Keep core workflow in SKILL.md. Move variant-specific details to references/.
Example structure:
cloud-deploy/
├── SKILL.md (workflow + provider selection)
└── references/
├── aws.md
├── gcp.md
└── azure.md
Agent loads only the relevant provider file.
Gather concrete examples of how the skill will be used. Ask:
Skip only if usage patterns are already clear.
For each use case, identify reusable resources:
| If you find yourself... | Add to... |
|---|---|
| Rewriting same code | scripts/ |
| Re-discovering schemas/docs | references/ |
| Copying same templates | assets/ |
Examples:
pdf-editor: "Rotate this PDF" → scripts/rotate_pdf.pybigquery: "How many users today?" → references/schema.mdfrontend-builder: "Build me a todo app" → assets/react-template/Create the skill directory and SKILL.md manually:
# Global skill (personal tools)
mkdir -p ~/.config/opencode/skill/my-skill
# Project skill (team-specific)
mkdir -p .opencode/skill/my-skill
Create SKILL.md with frontmatter:
---
name: my-skill
description: |-
[Workflow/capabilities]. Use for [specific cases]. Use proactively when [contexts].
Examples:
- user: "query" → action
- user: "query" → action
---
# [Skill Name]
[Instructions start here]
Description template example:
---
name: typescript-advanced
description: |-
Handle TypeScript 5.9 advanced typing, generics, strict configs, type errors, migrations,
and test writing. Use proactively for complex generics, conditional types, utility types, TS compiler
config, or test authoring.
Examples:
- user: "Create a type-safe event emitter" → implement with generics and mapped types
- user: "Migrate to strict TypeScript" → add discriminated unions, exhaustive checks
- user: "Build typed API client from OpenAPI" → generate request/response types with inference
- user: "Write unit tests" → create strict, typed tests with realistic fixtures
---
Add optional directories as needed:
cd my-skill
mkdir scripts references assets # only create what you'll actually use
Writing guidelines:
Frontmatter requirements:
name: lowercase-hyphen format, must match directory name exactlydescription: CRITICAL — follow the format specified in above. This is how agents discover your skill.Verify the skill is discoverable:
Check structure:
SKILL.md exists in skill directoryname: in frontmatter exactlyTest discovery:
<available_skills> sectionVerify triggers:
Note: Skills are used directly from their directories. No packaging or installation step required.
After real usage:
description to include missing trigger contextsControl skill access per-agent in agent config:
{
"permission": {
"skill": { "*": "deny", "my-skill": "allow" }
}
}
Values: "allow", "deny", "ask". Use "*" as wildcard default.
<question_tool>
Batching: Use the question tool for 2+ related questions. Single questions → plain text.
Syntax: header ≤12 chars, label 1-5 words, add "(Recommended)" to default.
When to ask: Ambiguous request, multiple skill patterns apply, or scope unclear.
</question_tool>
Weekly Installs
671
Source
First Seen
Mar 6, 2026
Security Audits
Installed on
claude-code336
opencode307
cursor261
codex257
github-copilot250
gemini-cli246
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
136,300 周安装