如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

聊聊如何在 Qoder、CursorTraeWindsurf 等 AI 编程工具里玩转 Claude 的技能

最近,Claude 的技能真是火得不得了,许多团队都在深入研究这些技能的原理和应用。

如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

今天我们不聊那些基本概念和使用方法,而是直接来看怎么把 Claude 的技能应用到各种 AI 编程助手上,比如 Qoder、Cursor、Trae 和 Windsurf。

如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

我们可以通过 OpenSkill 来实现,传送门在这里:https://github.com/numman-ali/openskills

值得一提的是,Claude 也是这个项目的贡献者之一哦!

安装与使用

首先,你需要满足以下要求:

  • Node.js 版本:20.6 及以上
  • 需要用到 Git 来克隆仓库

接下来是工具的安装:

npm i -g openskills

安装技能其实非常简单:

# 从 Anthropic 市场安装 (项目级别,放到 ./.claude/skills)
openskills install anthropics/skills

# 从 Anthropic 市场安装 (全局 放到 ~/.claude/skills)
openskills install anthropics/skills --global


# 从其他 GitHub 仓库安装
openskills install your-org/custom-skills

# 从本地安装
openskills install /path/to/my-skill

将技能同步到其他 AI 编程工具中:

# 同步到默认的 AGENTS.md
openskills sync

# 同步到特定目录 (如果不存在自动创建)
openskills sync --output .ruler/AGENTS.md
openskills sync -o custom-rules.md

那么,如何让 Qoder 支持 Claude 的技能呢?

如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

第一步就是安装技能,你可以手动把它放到 ~/.agent/skills/ 这个路径,或者通过 openskills 自动安装到对应路径。

如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

如果发现已经有相同的技能,它会询问你是否覆盖,确认后就能轻松完成安装了。

如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

接着,我们在“规则”中加一个 AGENTS.md 的规则,此时内容是空的。

执行

openskills sync --output .qoder/rules/AGENTS.md
如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

在这里,你可以选择要安装的技能。

如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

这样一来,这些技能就安装成功了,而且是一直有效的哦!

如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

比如你可以让 Qoder 说:“把当前项目的 README.md 用 pdf 技能转换成 PDF 并放到项目里。”这样,它就能按照 AGENTS.md 的规则,利用 openskills 指令把 README.md 正确转为 PDF 格式!

Cursor、Trae、Windsurf 这些支持规则的 AI 编程工具也能用类似的方式来应用 Claude 的技能。

技能的原理

Claude Code 中的实现

那么,Claude Code 为什么能够使用技能呢?系统的提示词如下:


When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively.

How to use skills:
- Invoke skills using this tool with the skill name only (no arguments)
- When you invoke a skill, you will see The "{name}" skill is loading
- The skill's prompt will expand and provide detailed instructions

Important:
- Only use skills listed in  below
- Do not invoke a skill that is already running




pdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms...
plugin



xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis...
plugin


如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

使用 Claude 的方法是:

  1. 当用户提问“从 PDF 中提取数据”时,
  2. Claude 会扫描 available_skills,发现有 pdf 这个技能,
  3. 然后调用 Skilll(‘pdf’),
  4. 接着加载 SKILL.md 的内容,
  5. 最后根据技能的描述完成任务。

OpenSkill 的实现

OpenSkill 同样遵循这样的结构,写在 AGENT.md 文件里:



## Available Skills



When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively.

How to use skills:
- Invoke: Bash("openskills read ")
- The skill content will load with detailed instructions
- Base directory provided in output for resolving bundled resources

Usage notes:
- Only use skills listed in  below
- Do not invoke a skill that is already loaded in your context





pdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms...
project



xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis...
project






如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?

其他 Agent 的使用方法也是:

  1. 用户问“从 PDF 中提取数据”,
  2. Claude 扫描 available_skills,发现有 pdf 这个技能,
  3. 调用 Bash(‘openskills read pdf’),
  4. 加载 SKILL.md 内容到 Agent 的上下文中,
  5. Claude 根据技能的描述完成任务。

对比二者

方面 Claude Code OpenSkills
系统提示词 内置于 Claude Code 在 AGENTS.md 中
调用方式 Skill(“pdf”) 工具 openskills read pdf 命令
提示词格式 XML XML(一致)
文件夹结构 .claude/skills/ .claude/skills/(一致)
SKILL.md 格式 YAML + markdown YAML + markdown(一致)
渐进式加载
绑定资源 references/, scripts/, assets/ references/, scripts/, assets/(一致)
市场 Anthropic 市场 GitHub (anthropics/skills)

OpenSkill 的特别之处

加载优先级

OpenSkill 的加载优先级是:

  1. ./.agent/skills/(项目级别-通用)
  2. ~/.agent/skills/(全局-通用)
  3. ./.claude/skills/(项目级)
  4. ~/.claude/skills/(全局)

指令

openskills install  [options]  # 从 GitHub 安装 Skill, 本地和私有仓库都支持

openskills sync [-y] [-o ]       # 更新 AGENTS.md (or custom output)

openskills list                        # 显示已安装 skills

openskills read                  #加载 skill (for agents)

openskills manage                      # 移除 skills (交互式)

openskills remove                # 移除特定 skill

参数

--global — 安装到 ~/.claude/skills(默认:项目级别)

--universal — 安装到 .agent/skills/ 而不是 .claude/skills/(优先级更高)

-y, --yes — 覆盖(适用于 scripts/CI)

-o, --output — 定制 sync 的输出(默认:AGENTS.md

最后的总结

本文介绍了如何通过 openskills 快速安装 Claude 的技能,并在其他 AI 编程工具中使用。如果你在其他 Agent 中有类似的使用场景,记得试试看哦!

创作不易,如果这篇文章对你有帮助,别忘了点赞、分享给需要的朋友们。


欢迎关注我的公众号:悟鸣AI,后续会分享一些实用的 AI 工具和经验,还有客观理性的 AI 观点等,敬请期待!

如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?
来源:知乎
原文标题:如何在 Qoder、Cursor、Trae、Windsurf 等 AI Coding 工具中使用 Claude Skills
声明:
文章来自网络收集后经过ai改写发布,如不小心侵犯了您的权益,请联系本站删除,给您带来困扰,深表歉意!

《如何在 Qoder、Cursor、Trae、Windsurf 等 AI 编程工具中巧妙运用 Claude Skills?》有6条评论

  1. 我觉得 Claude 的技能在处理文档转化时特别有效,之前在写 README 时也遇到过类似问题,推荐大家试试。

    回复

发表评论