OkayStudy
ZH English 한국어 日本語 中文 हिन्दी বাংলা اردو Español Português Français Deutsch Русский العربية Bahasa Indonesia Tiếng Việt ไทย Türkçe

如何开启通知

此浏览器或网址无法使用通知。请使用支持通知的浏览器,通过安全连接访问SONUB。

如果通知被屏蔽,请在浏览器设置中允许通知。

  1. 打开地址栏旁的站点设置或浏览器的站点设置,将此网站的通知设为允许。
  2. 在设备设置中允许浏览器发送通知,并检查勿扰模式或专注模式。
  3. 返回SONUB,刷新页面,然后通过铃铛开启通知。

在iPhone或iPad上,将SONUB添加到主屏幕,从主屏幕打开后允许通知。

一分钟,教会你的 AI 智能体新技能

SONUB 的免费技能,可用于 、 等 。一行命令装好,用大白话吩咐,再到后面的标签里做出自己的技能。

一个书架上放着彩色的活页夹。其中一本打开着,露出带图标和几行字的封面、写着虚线步骤的几页、一张检查清单,里面还夹着一个小工具箱。一个机器人读着封面,抽出了和对话气泡里骰子图标相符的那本活页夹。

进阶 — 制作你自己的技能

把你反复提出的请求做成技能。建好文件夹,写一段能找到的说明,写简短的分步指示,并检查,再决定放在哪里 — 只给自己用,还是给整个团队用。

第一个技能 — 把重复的请求做成技能

适合做第一个技能的,是你已经向 解释过三次以上的事:怎样写信息、你的测试步骤、你的报告格式。把这些说明在 里写一次,智能体每次都会找到并照做。

  1. 选一件你总在解释的工作,用小写字母、数字和连字符起一个短名字(commit-message)。
  2. 在智能体的技能文件夹里,用这个名字建一个文件夹。 init <name> 会建好文件夹和 SKILL.md 。
  3. 在最上面填写 name(和文件夹名相同)和 description,在下面写步骤。
  4. 开一个新会话,用平常的话请它做这件事。如果智能体用了这个技能,就成功了。
# in your project folder
mkdir -p .agents/skills && cd .agents/skills
npx skills init commit-message      # makes commit-message/SKILL.md

# Codex · Gemini CLI · Copilot CLI read   .agents/skills/commit-message/SKILL.md
# Claude Code reads                       .claude/skills/commit-message/SKILL.md
mkdir -p .agents/skills && cd .agents/skills

npx skills init commit-message

你也可以对智能体说:“把我们刚才做的事做成一个技能。” 和 都懂这个格式(Codex 内置了 )。

description — 智能体唯一的线索

一开始,智能体只读每个技能的名字和说明(description)。它靠这几行判断哪个技能适合你的请求。说明含糊,技能就永远用不上,或者在不该用的时候被用上。

  • 写清楚它做什么、什么时候用 — 两者都要,用一两句话。
  • 用第三人称写("Writes commit messages …"),不要写 "I can help you …"。
  • 写进人们真正会输入的词:"commit message"、"commit this"、"staged changes"。
  • 规则:description 最多 1,024 个字符;name 最多 64 个小写字母、数字和连字符,并且和文件夹名相同。
SKILL.md
# ✗ too vague — the agent cannot tell when to use it
description: Helps with commits.

# ✓ what it does + when to use it + the words people really say
description: Writes a git commit message from the staged changes in the Conventional Commits style. Use when the user asks for a commit message, says "commit this", or wants to describe staged changes.

Claude Code 在技能列表里最多只显示说明的 1,536 个字符,所以把最主要的用途放在最前面。

正文指示 — 简短、按顺序、带例子

frontmatter 下面是智能体使用技能时读的指示。智能体已经很聪明,所以只写它不知道的:你的规则、你的步骤顺序、你的格式。

  • 省掉智能体已经知道的东西( 是什么、怎样写 )。
  • 顺序重要时就给步骤编号,并写明出问题时怎么办(“如果没有暂存任何内容,就说明并停下”)。
  • 用一两个例子展示你想要的结果 — 例子比描述更能说明问题。
  • 给一个默认做法,而不是列一堆选项(“用 ;扫描的 用 ”)。
  • SKILL.md 保持在 500 行以内。变长了就拆成多个文件([高级] 标签页)。
.agents/skills/commit-message/SKILL.md
---
name: commit-message
description: Writes a git commit message from the staged changes in the Conventional Commits style. Use when the user asks for a commit message or says "commit this".
---

1. Run `git diff --staged`. If nothing is staged, say so and stop.
2. Pick one type: feat, fix, docs, refactor, test or chore.
3. Write a subject of 50 characters or less, then a blank line,
   then why the change was made in one or two short lines.

Example:
fix(cart): keep the coupon after a page reload

The coupon code was stored only in memory.

调用技能并检查

技能有两种用法:请求和说明相符时,智能体自己选用;或者你按名字调用。

  • 自动:用平常的话提出请求就行(“写一条提交信息”)。智能体读了说明后会加载技能。
  • Claude Code:/skills 显示列表,/<skill-name> 调用技能。名字后面的话会放进 $ARGUMENTS。
  • Codex:/skills 显示列表,在消息里写 $<skill-name> 就能调用。
  • Claude Code 会立刻读取对 SKILL.md 的修改。如果新建了技能文件夹,运行 /reload-skills。在其他工具里,开一个新会话。
Claude Code · Codex
# Claude Code
/skills                 # list the skills it found
/commit-message         # call one yourself
/fix-issue 123          # "123" goes into $ARGUMENTS in SKILL.md

# Codex
/skills                 # list and pick
$commit-message         # mention one in your message

如果该用技能时没用上,先改 description — 大多数时候原因就在这里。

放在哪里 — 只给自己,还是给团队

同一个技能可以放在你的主文件夹里(给你所有的项目用),也可以放在项目里(给参与这个项目的所有人用)。

  • 个人技能:Claude Code 用 ~/.claude/skills/,Codex、 和 用 ~/.agents/skills/。
  • 项目技能:项目里的 或 .agents/skills/。提交之后,整个团队都用同一个技能。
  • 如果两个技能同名,Claude Code 会优先使用个人技能,而不是项目技能。
  • 永远不要在技能里放密码或 — 技能文件会被读取,也常被分享。
Where
# only me, every project
~/.claude/skills/commit-message/      # Claude Code
~/.agents/skills/commit-message/      # Codex · Gemini CLI · Copilot CLI

# this project — commit it and the whole team gets it
.claude/skills/commit-message/
.agents/skills/commit-message/

git add .agents/skills/commit-message
git commit -m "Add the commit-message skill"

安装别人做的技能 — 读懂 npx skills add 的选项

npx skills add <来源> 会读取该来源( 或网站)的技能列表并安装。不加选项时,它会逐一询问装哪些技能、装给哪些智能体、装在哪里;每个选项就是提前回答其中一个问题。

  • -s <技能> (--skill):按名称选择要安装的技能。多个技能可以重复写(-s gp -s cowork),也可以都写在一个 -s 后面(-s gp cowork)。不加时会列出列表让你选。
  • -g (--global):在安装一次,这台电脑上的所有项目都能用。不加时只装到当前项目。
  • -a <智能体> (--agent):选择要安装到的智能体,例如 -a claude-code、-a codex。Claude Code 只读取 .claude/skills,所以使用 Claude Code 时一定要选 claude-code。
  • -l (--list):不安装,只显示该来源有哪些技能。安装前先看一看。
  • -y (--yes):跳过确认问题。由或智能体代为安装时使用。
Terminal
# see what is there first — installs nothing
npx skills add https://sonub.com -l

# one skill, only for this project
npx skills add https://sonub.com -s cowork

# one skill, for every project on this computer
npx skills add https://sonub.com -g -s cowork

# several skills — repeat -s, or list them after one -s
npx skills add https://sonub.com -s gp -s cowork
npx skills add https://sonub.com -s gp cowork

# choose the agent too, and skip the questions
npx skills add https://sonub.com -g -s cowork -a claude-code -y
npx skills add https://sonub.com -l

npx skills add https://sonub.com -s cowork

npx skills add https://sonub.com -g -s cowork

npx skills add https://sonub.com -s gp -s cowork

npx skills add https://sonub.com -s gp cowork

npx skills add https://sonub.com -g -s cowork -a claude-code -y

从左往右读:npx skills add https://sonub.com -g -s cowork 的意思是“从 sonub.com,为所有项目,只安装 cowork”。

进阶练习 — 在你的项目里做一个

  1. 写下一个你向 AI 提过三次以上的请求。
  2. 用 npx skills init 建好这个技能的文件夹,写上 name 和 description。
  3. 用五行以内写出步骤,并附一个结果的例子。
  4. 在新会话里用平常的话提出请求,看技能有没有被用上。然后再按名字调用它。
  5. 提一个不相关的请求,确认技能没有被用上。

五项都做到了,就进入 [高级] 标签页。

官方文档

已于 2026-10-18 对照官方文档核实。这些工具变化很快 — 如果命令不起作用,请查看官方文档。

请选择要取消的待付款预约。每次取消都需要确认。

你所在国家的时间:

关闭