Docs/Advanced

Writing a Skill

A Skill is how you extend Nephele. It doesn't require writing code — it's a natural-language workflow document that teaches the Agent how to make better use of existing tools in specific situations.

Think of it as writing a "job description" for the Agent, so it becomes more proficient at certain tasks.


What a Skill Is

A Skill doesn't define new features, and it doesn't register new tools. It does just one thing: it injects domain knowledge into the Agent's system prompt.

For example, Nephele ships with a built-in find-references skill that tells the Agent:

  • When searching Pixiv, first translate the Chinese keywords into Japanese or English (Pixiv is a Japanese-language site, and the original Chinese terms almost never return results)
  • If a search comes up empty, don't give up — try a few synonyms instead
  • Sort results by relevance, showing high-quality works first

These aren't things that code can express — they're experience and workflow. A Skill is what you use to codify that experience.

提示

The relationship between Skills and tools: a tool is "what it can do," a Skill is "how to do it better." Tools are written in Python; Skills are written in Markdown.


Skill File Format

Each Skill is a directory containing at least one SKILL.md file:

text
~/.nephele_workshop/skills/
└── my-skill/
    └── SKILL.md

SKILL.md has two parts: YAML front matter + Markdown body.

YAML Front Matter

Placed at the very beginning of the file, wrapped in three dashes:

yaml
---
name: my-skill-name
description: "这个 Skill 是做什么的"
emoji: "🚀"
tools: [tool_a, tool_b]
keywords: [关键词1, 关键词2, 关键词3]
---
FieldRequiredDescription
nameYesThe Skill's identifier; a user Skill with the same name overrides the built-in one
descriptionYesA one-line description the Agent uses to understand what this Skill is for
emojiNoAn icon shown in the prompt to make the Skill easier for the Agent to recognize
toolsNoWhich tools this Skill involves; for reference only
keywordsYesTrigger keywords; the Agent matches these against user input to decide whether to inject this Skill

Markdown Body

After the YAML ends comes free-form Markdown. This is where you teach the Agent how to do it.

You can write:

  • Decision trees (which path to take in which situation)
  • Translation rules (how to convert keywords)
  • Output templates (how results should be organized)
  • Anti-pattern reminders (what not to do)
  • Step-by-step workflows

技巧

The body can be at most 7,000 characters. The Agent injects at most 2 Skills at a time. Keep it concise — don't stuff in an encyclopedia.


A Complete Example

Below is a complete example of a custom Skill. Suppose you often need to find a specific artist's images on Weibo for reference — you can write a Skill that teaches the Agent how to search efficiently:

markdown
---
name: weibo-artist-reference
description: 在微博搜索画师作品和参考图
emoji: "📷"
tools: [browser_navigate, browser_snapshot, browser_extract]
keywords: [微博, 画师, 作品, 参考, weibo, 微博搜图, 搜微博]
---
 
## 工作流程
 
1. 打开微博搜索页面:`https://s.weibo.com/weibo?q={关键词}`
2. 切换到"图片"标签筛选只显示图片的结果
3. 滚动加载更多结果(微博是懒加载,需要模拟滚动)
4. 提取图片 URL 和原帖链接
5. 返回结果时按时间倒序排列,最新的在前
 
## 搜索技巧
 
- 搜具体画师时,用画师微博昵称而不是真名
- 如果昵称搜不到,尝试搜 "画师名 + 作品" 或 "画师名 + 插画"
- 中文关键词不需要翻译
 
## 注意事项
 
- 微博图片有防盗链,返回的 URL 要在 5 分钟内使用
- 不要尝试登录微博,只用公开搜索
- 如果搜索结果为空,提示用户换个关键词

Save this file to ~/.nephele_workshop/skills/weibo-artist-reference/SKILL.md, restart Nephele, and it will take effect.


Matching Mechanism

How does the Agent decide which Skill to use? It goes by keyword matching:

Match locationWeight
keywords hit+2
description hit+0.5
name hit+3

The Agent injects the top 2 highest-weighted Skills into the current conversation's prompt.

技巧

keywords should cover as many of the synonyms a user might say as possible. For a reference-finding Skill, for instance, the keywords should include "find image," "reference," "inspiration," "image search," and so on.


Overriding a Built-in Skill

If you want to modify one of Nephele's built-in Skills, all you need to do is:

  1. Create a Skill with the same name (matching the name field)
  2. Put it under ~/.nephele_workshop/skills/
  3. Restart Nephele

The user Skill overrides the built-in one. This way you can customize the Agent's behavior without changing the software's code.


Debugging a Skill

Once you've written a Skill, how do you know whether the Agent is actually using it?

  1. Watch the chain of thought — if the Agent mentions your Skill's name or emoji while thinking, the Skill was injected
  2. Test the keywords — start a conversation using the words from your keywords and see whether the Agent's behavior follows the workflow you wrote
  3. Simplify step by step — if the Agent isn't doing what you expect, the body may be too complex. Try trimming it down to the most essential 3-5 rules

注意

A Skill cannot define new tools. If your need requires entirely new functionality (for example, calling an API that Nephele doesn't have), you need to write a Python tool rather than a Skill. A Skill can only teach the Agent to use existing tools better.


When to Write a Skill vs. a Tool

ScenarioWrite a SkillWrite a Tool
Teach the Agent best practices for searching on a specific platformYesNo
Define output formats and report templatesYesNo
Set decision logic and judgment criteria for the AgentYesNo
Need to call an external API to fetch dataNoYes
Need to perform file-system or system-level operationsNoYes
Need an entirely new UI interaction componentNoYes

In short: write strategy as a Skill, write capability as a tool.

Last updated Jun 21, 2026·Applies to v0.5.2-beta