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!requiredidString!requiredThe id of the definition, from its list.
inputUpdateSkillInput!requiredinput.nameStringMust equal the id argument when sent: a skill cannot be renamed.
input.descriptionString!requiredinput.allowedTools[String!]Replaces the list when sent; omit it to keep the current list.
input.instructionsStringFull 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.sourceTargetKindWriteTargetKindThe source to write; default project. One of
project,preview_branch.input.targetBranchIdIDRequired 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.