Skip to main content

Skill Management API

@grant CAT.agent.skills

The Skill Management API lets a script query, install, uninstall, and invoke Skill packages.

For Skill development and packaging, see the Skill Development Guide. Official Skill example repository: scriptscat/skills.

list — List Installed Skills

const skills = await CAT.agent.skills.list();

Return value, SkillSummary[]:

FieldTypeDescription
namestringSkill name
descriptionstringSkill description
versionstringVersion number (semver)
toolNamesstring[]List of included SkillScript tool names
referenceNamesstring[]List of included reference-material file names
hasConfigbooleanWhether config fields are declared
enabledbooleanWhether it's enabled (defaults to true)
installUrlstringThe install source URL (used for update checks)
installtimenumberInstall timestamp
updatetimenumberUpdate timestamp

get — Get Skill Details

const skill = await CAT.agent.skills.get(name);

Returns the full SkillRecord, or null if it doesn't exist.

SkillRecord structure:

Inherits all fields from SkillSummary, plus:

FieldTypeDescription
promptstringThe Markdown body of SKILL.cat.md (the prompt given to the AI)
configRecord<string, SkillConfigField>The config field definitions (schema)

SkillConfigField structure:

FieldTypeDescription
titlestringDisplay title
type"text" | "number" | "select" | "switch"Field type
secretbooleanWhether it's sensitive information (masked in the UI)
requiredbooleanWhether it's required
defaultunknownDefault value
valuesstring[]The option list (only for the select type)

install — Install a Skill

const record = await CAT.agent.skills.install(skillMd, scripts?, references?);

Parameters:

ParameterTypeDescription
skillMdstringThe content of the SKILL.cat.md file (required)
scriptsArray<{ name, code }>The list of SkillScript files
referencesArray<{ name, content }>The list of reference-material files

If a Skill with the same name already exists, this performs an update instead.

const record = await CAT.agent.skills.install(
`---
name: my-search
description: Custom search tool
---

When the user needs to search, use the search tool.`,
[{ name: "search.js", code: skillScriptCode }],
[{ name: "api-docs.md", content: "# API Documentation\n..." }]
);

remove — Uninstall a Skill

const success = await CAT.agent.skills.remove(name);

Returns true if the uninstall succeeded, false if the Skill doesn't exist.

call — Directly Invoke a SkillScript

const result = await CAT.agent.skills.call(skillName, scriptName, params?);

Directly executes a SkillScript from the given Skill, bypassing the AI conversation.

Parameters:

ParameterTypeDescription
skillNamestringSkill name (required)
scriptNamestringSkillScript name (required)
paramsRecord<string, unknown>The parameters to pass in (matching the @param declarations)
// Directly call a search script from a Skill
const results = await CAT.agent.skills.call(
"my-search",
"search",
{ query: "ScriptCat", limit: 5 }
);

SkillScript execution has a timeout limit (300 seconds by default, customizable via @timeout).