updateSkill

Change the description, allowed tools or instructions of a structured skill, where omitted tools and instructions keep their values; returns the updated skill source document. Requires project.agents.write.

Arguments

  • projectReferenceString!required

  • idString!required

    The id of the definition, from its list.

  • inputUpdateSkillInput!required

  • input.nameString

    Must equal the id argument when sent: a skill cannot be renamed.

  • input.descriptionString!required

  • input.allowedTools[String!]

    Replaces the list when sent; omit it to keep the current list.

  • 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 UpdateSkill($projectReference: String!, $id: String!, $input: UpdateSkillInput!) {  updateSkill(projectReference: $projectReference, id: $id, input: $input) {    id    name    description    sourcePath    editMode    allowedTools    instructions    sections    source    sourceOnlyReasons  }}
{  "data": {    "updateSkill": {      "id": "string",      "name": "string",      "description": "string",      "sourcePath": "string",      "editMode": "structured",      "allowedTools": [        "string"      ],      "instructions": "string",      "sections": {},      "source": "string",      "sourceOnlyReasons": [        "string"      ]    }  }}

The SkillSource! in data.updateSkill.