createSkill

Create a skill, a SKILL.md file an agent loads on demand, in the project source or a preview branch; returns the skill source document. Requires project.agents.write.

Arguments

  • projectReferenceString!required

  • inputCreateSkillInput!required

  • input.nameString!required

    Becomes 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.

  • input.descriptionString!required

  • input.allowedTools[String!]

    Tool IDs the skill may call; default none.

  • input.instructionsString

    Full 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.

  • input.sourceTargetKindWriteTargetKind

    The source to write; default project. One of project, preview_branch.

  • input.targetBranchIdID

    Required with the kind preview_branch.

Responses

mutation CreateSkill($projectReference: String!, $input: CreateSkillInput!) {  createSkill(projectReference: $projectReference, input: $input) {    id    name    description    sourcePath    editMode    allowedTools    instructions    sections    source    sourceOnlyReasons  }}
{  "data": {    "createSkill": {      "id": "string",      "name": "string",      "description": "string",      "sourcePath": "string",      "editMode": "structured",      "allowedTools": [        "string"      ],      "instructions": "string",      "sections": {},      "source": "string",      "sourceOnlyReasons": [        "string"      ]    }  }}

The SkillSource! in data.createSkill.