Create skill

createSkill(projectReference: String!, input: CreateSkillInput!): SkillSource!

Requires project.agents.write.

Arguments

ArgumentTypeRequired
projectReferenceString!Yes
inputCreateSkillInput!Yes

Input fields

input

CreateSkillInput

FieldTypeRequiredDescription
nameString!YesBecomes the skill directory name and the skill id. For example "daily-changelog-flow", not "daily--changelog". A skill cannot be renamed. There is no display_name field; put the human-readable label in description.
descriptionString!Yes
allowedTools[String!]NoTool IDs the skill may call; default none.
instructionsStringNoFull markdown body of SKILL.md, meaning everything below the frontmatter, written verbatim with any markdown headings. Sending it replaces the whole body. The former sections object is rejected; put the whole skill here.
sourceTargetKindWriteTargetKindNoThe source to write; default project.
targetBranchIdIDNoRequired with the kind preview_branch.

Response

Returns SkillSource!. Open the type for its fields and nested types.

FieldTypeDescription
idID!
nameString!
descriptionString!
sourcePathString!
editModeSourceEditMode!
allowedTools[String!]!
instructionsString!The Markdown body of SKILL.md, excluding frontmatter.
sectionsStringMap!Read-only sections derived from the level-two headings of the body; empty when the body cannot be split.

All fields of SkillSource.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateSkill($projectReference: String!, $input: CreateSkillInput!) {
  createSkill(projectReference: $projectReference, input: $input) {
    id
    name
    allowedTools
    description
    editMode
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "input": {
    "name": "example",
    "description": "example"
  }
}