本指南说明如何将 Teaching AI Skills 在不同平台上使用,包括 Trae、Cursor、Qoder、CodeBuddy 等。
本指南中的适配方法为理论性指导,尚未经过实际验证。
Teaching AI Skills 遵循 Agent Skills 标准,这是一个开放的技能格式规范。虽然不同平台对 skills 的支持程度不同,但通过适当的适配,这些 skills 可以在多个平台上使用。
Claude Code 完全支持 Agent Skills 标准,可以直接使用 marketplace 方式安装。
安装方式:
/plugin marketplace add teaching-ai/skills
/plugin install teaching-skills@teaching-ai-skills
Claude.ai 的付费套餐支持直接上传和使用 skills。
使用方式:
SKILL.md 文件或整个技能目录通过 Claude API 可以上传和使用自定义 skills。
使用方式: 参考 Skills API Quickstart
Cursor 是一个基于 AI 的代码编辑器,支持通过自定义指令和上下文文件来扩展 AI 能力。
方法一:作为自定义指令使用
SKILL.md 的内容转换为 Cursor 的自定义指令格式.cursorrules 或自定义指令步骤:
# 1. 复制技能内容
cp skills/course-designer/SKILL.md ~/.cursor/rules/course-designer.md
# 2. 在 Cursor 设置中引用
# Settings > Rules > Add Rule
# 指向 ~/.cursor/rules/course-designer.md
方法二:作为项目上下文使用
.cursorignore 中排除不需要的文件SKILL.md 文件示例项目结构:
my-project/
├── .cursor/
│ └── rules/
│ └── teaching-skills.md
├── skills/
│ ├── course-designer/
│ │ └── SKILL.md
│ └── code-generator/
│ └── SKILL.md
└── .cursorignore
方法三:转换为 Cursor Composer 指令
将技能的核心功能转换为 Cursor 的 Composer 指令模板:
# Course Designer Skill for Cursor
When the user asks about course design, curriculum planning, or educational content:
1. Analyze the requirements
2. Design course structure
3. Create learning objectives
4. Plan assessment methods
[原 SKILL.md 的内容...]
注意: 以下适配方案为理论性建议,需要根据 Trae 平台的实际插件系统进行验证和调整。建议先查阅 Trae 的官方文档了解其插件机制。
Trae 如果支持插件或扩展系统,可以通过以下方式适配:
检查平台插件格式
转换技能格式
SKILL.md 转换为 Trae 支持的格式trae-plugin.json 配置文件处理依赖
示例适配:
// trae-plugin.json
{
"name": "teaching-skills",
"version": "1.0.0",
"description": "Teaching and education skills",
"skills": [
{
"name": "course-designer",
"description": "Course design skill",
"instructions": "./skills/course-designer/SKILL.md"
}
]
}
Qoder 是一个 agentic coding platform(代理式编程平台),支持端到端的编码流程,包括代码生成、调试、部署等阶段。Qoder 支持以 agent 的形式自动化编程任务。
注意: 以下适配方案基于 Qoder 作为 agentic platform 的一般特性,具体的 agent 配置格式、API 接口等需要查阅 Qoder 官方文档进行验证。示例配置格式仅供参考,实际格式可能有所不同。
由于 Qoder 是一个 agentic 平台,可以将 skills 适配为 Qoder 的 agent 模块:
转换为 Agent 模块
SKILL.md 中的指令转换为 Qoder agent 的工作流程创建 Agent 配置文件
部署到 Qoder 环境
示例 Agent 配置:
// qoder-agent-config.json
{
"name": "course-designer-agent",
"description": "Agent for designing courses and curricula",
"version": "1.0.0",
"capabilities": [
"course-design",
"curriculum-planning",
"learning-objective-creation"
],
"workflow": [
{
"step": "analyze-requirements",
"description": "Analyze course requirements and constraints"
},
{
"step": "design-structure",
"description": "Design course structure and modules"
},
{
"step": "create-objectives",
"description": "Create learning objectives"
},
{
"step": "plan-assessments",
"description": "Plan assessment methods"
}
],
"instructions": "./skills/course-designer/SKILL.md"
}
示例 Python Agent 模块:
# qoder_agent_module.py
"""
Course Designer Agent for Qoder
"""
class CourseDesignerAgent:
"""
Agent for designing courses and educational content
"""
def __init__(self):
self.name = "course-designer"
self.description = "Designs courses and curricula"
def execute(self, task, context):
"""
Execute course design task
"""
# 读取 SKILL.md 中的指令
# 执行课程设计工作流
# 返回设计结果
pass
def analyze_requirements(self, topic, duration, level):
"""Analyze course requirements"""
pass
def design_structure(self, requirements):
"""Design course structure"""
pass
适配步骤:
SKILL.md 转换为 Qoder agent 指令Windsurf 是一个 AI 驱动的代码编辑器,支持 Cascade Skills 系统。Windsurf 使用与 Agent Skills 相同的 SKILL.md 格式,转换相对简单。
由于 Windsurf 使用与 Agent Skills 相同的格式,转换主要是复制文件结构:
复制 SKILL.md
复制资源文件
部署到 Windsurf
.windsurf/skills/ 目录~/.windsurf/skills/ 目录适配步骤:
示例结构:
.windsurf/
└── skills/
└── course-designer/
├── SKILL.md
├── scripts/ # 如果原技能有脚本
└── templates/ # 如果原技能有模板
注意: 以下适配方案为理论性建议,需要根据 CodeBuddy 平台的实际功能进行验证。建议先查阅 CodeBuddy 的官方文档了解其支持的插件或 workflow 格式。
CodeBuddy 如果支持 workflows 或 tips 插件,可以这样适配:
创建插件包
转换为 Workflow 格式
示例结构:
codebuddy-plugin/
├── manifest.json
├── workflows/
│ ├── course-design.json
│ └── code-generation.json
└── skills/
└── course-designer/
└── SKILL.md
大多数 AI 平台都支持读取项目中的文档文件,可以将 skills 作为上下文文档使用。
步骤:
优点:
缺点:
将技能内容转换为平台的自定义指令格式。
步骤:
SKILL.md 的核心指令部分示例(通用格式):
# Custom Instruction: Course Designer
When the user asks about course design:
- Analyze requirements
- Design course structure
- Create learning objectives
- Plan assessments
[详细指令内容...]
为不同平台创建适配层,将 Agent Skills 标准转换为平台特定格式。
项目结构:
adapters/
├── cursor/
│ └── convert_to_cursor.py
├── trae/
│ └── convert_to_trae.py
├── qoder/
│ └── convert_to_qoder.py
├── codebuddy/
│ └── convert_to_codebuddy.py
└── windsurf/
└── convert_to_windsurf.py
转换脚本示例:
# adapters/cursor/convert_to_cursor.py
def convert_skill_to_cursor(skill_path):
"""
Convert Agent Skill to Cursor custom instruction format
"""
with open(f"{skill_path}/SKILL.md", "r") as f:
content = f.read()
# 提取 frontmatter
frontmatter = extract_frontmatter(content)
# 转换为 Cursor 格式
cursor_rule = f"""
# {frontmatter['name']}
{frontmatter['description']}
{content}
"""
return cursor_rule
每个技能包含以下结构,了解这些有助于适配:
skill-name/
├── SKILL.md # 核心技能定义(必需)
├── scripts/ # 可执行脚本(可选)
│ └── script.py
├── references/ # 参考文档(可选)
│ └── reference.md
└── assets/ # 资源文件(可选)
└── template.html
---
name: skill-name
description: Skill description
---
# Skill Title
## Overview
...
## Usage
...
## Examples
...
适配要点:
name 和 description 是关键信息推荐方式:
.cursorrules 文件示例 .cursorrules:
# Teaching AI Skills
When working with course design, use the course-designer skill.
When generating code, use the code-generator skill.
[技能内容...]
推荐方式:
推荐方式:
参考资源:
推荐方式:
.windsurf/skills/ 或 ~/.windsurf/skills/参考资源:
推荐方式:
确保每个技能都是自包含的,不依赖特定平台特性。
在技能中使用相对路径引用资源,便于跨平台使用。
为每个技能创建平台特定的使用说明。
在不同平台上测试技能的功能和兼容性。
开发自动化工具将技能转换为不同平台格式。
注意: 以下转换工具示例为概念性代码,展示了基本的转换思路。实际使用时需要根据目标平台的具体 API 和格式要求进行调整和测试。
#!/usr/bin/env python3
"""
Convert Agent Skills to different platform formats
"""
import os
import json
import yaml
from pathlib import Path
def convert_to_cursor(skill_path, output_path):
"""Convert skill to Cursor format"""
skill_file = Path(skill_path) / "SKILL.md"
with open(skill_file, "r") as f:
content = f.read()
# Extract frontmatter
frontmatter_end = content.find("---", 3)
frontmatter = yaml.safe_load(content[3:frontmatter_end])
body = content[frontmatter_end + 3:].strip()
# Create Cursor rule
cursor_rule = f"""# {frontmatter['name']}
{frontmatter['description']}
{body}
"""
with open(output_path, "w") as f:
f.write(cursor_rule)
print(f"Converted to Cursor format: {output_path}")
def convert_to_platform_manifest(skill_path, platform):
"""Convert skill to platform-specific manifest"""
skill_file = Path(skill_path) / "SKILL.md"
with open(skill_file, "r") as f:
content = f.read()
frontmatter_end = content.find("---", 3)
frontmatter = yaml.safe_load(content[3:frontmatter_end])
manifest = {
"name": frontmatter['name'],
"description": frontmatter['description'],
"version": "1.0.0",
"platform": platform,
"skill_file": "SKILL.md"
}
manifest_path = Path(skill_path) / f"{platform}-manifest.json"
with open(manifest_path, "w") as f:
json.dump(manifest, f, indent=2)
print(f"Created manifest: {manifest_path}")
if __name__ == "__main__":
# Example usage
skill_path = "skills/course-designer"
convert_to_cursor(skill_path, ".cursor/rules/course-designer.md")
convert_to_platform_manifest(skill_path, "trae")
A: 取决于平台是否支持执行脚本。如果不支持,需要:
A:
A:
A:
如果你为某个平台创建了适配方案,欢迎贡献:
adapters/ 目录下创建平台适配代码目前以下平台的适配方法已经过实际验证:
以下平台的方法需要社区验证:
如果你验证了某个平台的适配方法,请在 Pull Request 中说明:
目前以下平台的适配方法已经过实际验证:
以下平台的方法需要社区验证:
如果你验证了某个平台的适配方法,请在 Pull Request 中说明测试环境和结果。
如有问题或需要帮助,请通过 GitHub Issues 联系我们。