Skill Development Guide
A Skill is an extension package for the Agent system, made up of a prompt + tool scripts + reference material. Skills let you inject domain-specific knowledge and custom tool capabilities into the AI.
Skill directory structure
my-skill/
├── SKILL.cat.md # Required: metadata + prompt (entry file)
├── scripts/ # Optional: SkillScript tool scripts
│ ├── search.js
│ └── export.js
└── references/ # Optional: reference material files
├── api-docs.md
└── examples.json
SKILL.cat.mdis the Skill's entry file. When installing from a URL, ScriptCat fetches this file first, then fetches the other files by their relative paths based on thescriptsandreferencesdeclared in its frontmatter.
SKILL.cat.md format
SKILL.cat.md uses YAML frontmatter to declare metadata, with the Markdown body serving as the prompt given to the AI.
---
name: "weather-assistant"
description: "Weather lookup assistant, supports weather queries and forecasts for cities worldwide"
config:
apiKey:
title: "OpenWeather API Key"
type: "text"
secret: true
required: true
unit:
title: "Temperature unit"
type: "select"
values: ["celsius", "fahrenheit"]
default: "celsius"
detailed:
title: "Detailed mode"
type: "switch"
default: false
maxDays:
title: "Forecast days"
type: "number"
default: 7
---
# Weather assistant
You can use the following tools to look up weather information:
## Tool description
- **get_weather**: look up the current weather and forecast for a specified city
- The `city` parameter is the city name (Chinese and English names both supported)
- The `days` parameter is the number of forecast days
## Usage rules
1. When the user asks about weather, confirm the city name first
2. By default, return current weather + a 3-day forecast
3. Display temperature according to the configured unit
Metadata fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique Skill identifier (kebab-case English recommended) |
description | string | Yes | Short description (shown in the list) |
version | string | No | Version (semver format, e.g. 1.0.0), used for update checks |
scripts | string[] | No | List of script filenames (e.g. ["search.js"]); fetched automatically from the scripts/ directory when installing via URL |
references | string[] | No | List of reference-material filenames (e.g. ["api-docs.md"]); fetched automatically from the references/ directory when installing via URL |
config | object | No | Configuration field definitions |
Configuration field types
| type | Description | Type-specific properties |
|---|---|---|
text | Text input | secret: whether it's masked in the UI |
number | Number input | — |
select | Dropdown | values: option list (string[]) |
switch | Toggle | — |
Common properties:
| Property | Type | Description |
|---|---|---|
title | string | Display title |
required | boolean | Whether it's required |
default | unknown | Default value |
secret | boolean | Whether it's sensitive information |
The user fills in these config values in the Skill's settings on the management page.
The prompt body
The Markdown body is injected as the AI's system prompt. Writing tips:
- Describe the tools the Skill provides and what they're for
- Explain what each tool's parameters mean and the rules for using them
- Give typical usage scenarios and things to watch out for
- If there's reference material, explain how to consult it
SkillScript tool scripts
A SkillScript is a tool script the AI can call. Each SkillScript file gets registered as one LLM tool.
Metadata format
// ==SkillScript==
// @name get_weather
// @description Look up weather information for a specified city
// @param city string [required] City name, Chinese and English names both supported
// @param days number Number of forecast days, defaults to 3
// @param format string [json,text] Output format
// @grant CAT.agent.opfs
// @require https://cdn.example.com/utils.js
// @timeout 60
// ==SkillScript==
Metadata fields
| Tag | Description | Example |
|---|---|---|
@name | Tool name (used when the AI calls it) | get_weather |
@description | Tool description (the AI uses this to decide when to call it) | Look up city weather |
@param | Parameter definition (can appear multiple times) | see below |
@grant | The GM API permission it needs | CAT.agent.opfs |
@require | External library URL (loaded and cached) | https://cdn.example.com/lib.js |
@timeout | Execution timeout in seconds | 60 (default 300) |