Create and Add Skills
This page is the complete guide for creating a skill and attaching it to an agent.
Before you begin
- Confirm you can run Python method calls in your C3 environment (for example, IPython notebook or service shell).
- Confirm the target agent type supports skills through
GenaiCore.Agent.WithSkills. - Ensure you have the
py-llm_312kernel installed in your Jupyter environment and set that as the runtime.
Author a skill
Create a folder that includes SKILL.md at the root.
Minimum structure:
my-skill/
SKILL.mdYour SKILL.md must include YAML frontmatter with name and description.
---
name: my-skill
description: Summarize support tickets and produce a weekly digest.
---
# Skill Instructions
When asked to summarize support tickets, read reference files first, then run scripts if needed.Validation rules enforced by the platform during skill registration:
nameis required, must be kebab case (eg.this-is-kebab-case), and must be unique.descriptionis required and must be non-empty.SKILL.mdmust be at the root of the skill folder inside the ZIP, and the folder name must match the ZIP filename.
Package the skill as a ZIP archive
From the parent directory of the skill folder:
zip -r my-skill.zip my-skillThe resulting archive must contain the SKILL.md root file for that skill folder.
The commands above to create the zip file don't have to be done within your notebook environment. You can create the zip file separately and then import it into your notebook environment to register the skill.
Register the skill in the application
Register the ZIP by calling GenaiCore.Skill.createFromZip().
From within your python notebook environment, make sure you are using the py-llm_312 runtime and then run the following code.
The variable zip_file_name is the name you give your zip file.
skill = c3.GenaiCore.Skill.createFromZip(zip_file_name)What this method call does:
- Validates the ZIP format and
SKILL.mdfrontmatter. - Unpacks and stores skill files in the platform file system.
- Creates a
GenaiCore.Skillentity you can attach to agents.
Add the skill to an agent
Now that you've created the skill and have a GenaiCore.Skill entity, you can add it to an agent. To add a skill to an agent via UI:
- Go to the Agent Workbench and select the agent you want to add the skill to. You may only add skills to a draft agent.
- In the agent configuration, scroll down to the Skills section and click the + icon.
- The skill you just added will now be available in the list of skills to select. Select your skill and add it to the agent configuration.
For information on how to create and edit and agent, see Create Agents from Scratch.
Troubleshoot
Expected a .zip file: Ensure the path ends in.zip.SKILL.md file not found: EnsureSKILL.mdis present in the skill folder's root directory before zipping.- Name validation errors: Update frontmatter
nameto kebab case (eg.this-is-kebab-case). already exists: Use a unique skill name or remove the previous skill.- Skill not used by agent: Confirm the agent prompt and query are relevant to the skill's instructions, then run again.