Add a skill
Ship instructions with your plugin, so the agent knows when and how to use its tools.
A skill is a page of instructions the agent reads when a task needs it. Ship one with your plugin when its tools need a how-to: which tool to call first, what the results mean, what to avoid. If you only need the instructions, with no new code, a skill file in your project is enough. See Skills.
This guide also imports @conciv/protocol, which the tutorial installed only for the Effect style.
npm install -D @conciv/protocolpnpm add -D @conciv/protocolyarn add --dev @conciv/protocolbun add --dev @conciv/protocolShip a skill file
Keep the instructions in a Markdown file in your plugin folder:
# Tickets
Read a ticket with ticket_read before you change it.
Never close a ticket whose id starts with SEC-: the security team closes those.The engine does not find this file on its own. Your engine part reads it and adds it inside ctx.skill.transform:
import {} from 'node:fs/promises'
import {} from 'node:url'
import {Plugin, } from '@conciv/backend-plugin-api'
import {} from '@conciv/protocol/schema/schema'
const = (new
export default Plugin.({
: 'tickets',
async () {
const = await
await ..(() =>
.({
: ..
: ..
: 'Read and close tickets in the team tracker. Load it before your first ticket tool call.',
: .
, // <- what the agent reads when it loads the skill
}),
)
},
})import {
A few things to notice:
Skill.Id,Skill.NameandAbsolutePathare branded strings..maketurns a plain string into one. An id then cannot go where a name belongs.descriptionis what the agent always sees. The agent decides from this line when to load the skill.- The agent sees the files next to
SKILL.mdand can read them, such as areference/folder. - In both tabs, a missing file stops the plugin from loading.
The agent gets the skill's name and description in every turn. When it starts a ticket task, it loads the content. Then it follows it.
A skill with no file
Write the content in code, and give the skill a skill:// path. That path names the skill without pointing at a
folder, so the agent sees no files beside it:
import {Plugin, } from '@conciv/backend-plugin-api'
import {} from '@conciv/protocol/schema/schema'
export default Plugin.({
: 'tickets',
async () {
await ..(() =>
.({
Next steps
- Add a tool: the tools your skill teaches.
- Skills: skills written as files in your project.