C3 AI Documentation Home

Create and Add Skills

This page is the complete guide for creating a skill and attaching it to an agent.

Before you begin

  1. Confirm you can run Python method calls in your C3 environment (for example, IPython notebook or service shell).
  2. Confirm the target agent type supports skills through GenaiCore.Agent.WithSkills.
  3. Ensure you have the py-llm_312 kernel 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:

Text
my-skill/
  SKILL.md

Your SKILL.md must include YAML frontmatter with name and description.

Markdown
---
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:

  • name is required, must be kebab case (eg.this-is-kebab-case), and must be unique.
  • description is required and must be non-empty.
  • SKILL.md must 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:

Command Line
zip -r my-skill.zip my-skill

The resulting archive must contain the SKILL.md root file for that skill folder.

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.

Python

skill = c3.GenaiCore.Skill.createFromZip(zip_file_name)

What this method call does:

  1. Validates the ZIP format and SKILL.md frontmatter.
  2. Unpacks and stores skill files in the platform file system.
  3. Creates a GenaiCore.Skill entity 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:

  1. 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.
  2. In the agent configuration, scroll down to the Skills section and click the + icon.
  3. 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: Ensure SKILL.md is present in the skill folder's root directory before zipping.
  • Name validation errors: Update frontmatter name to 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.

See also

Was this page helpful?