Get skill

skill(projectReference: String!, id: String!, sourceTargetKind: SourceTargetKind, runtimeTargetKind: RuntimeTargetKind, targetEnvironmentId: ID, targetBranchId: ID): Skill!

Requires project.agents.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceString!Yes
idString!YesThe id of the definition, from its list.
sourceTargetKindSourceTargetKindNoThe source to read; default runtimeTargetKind, else project.
runtimeTargetKindRuntimeTargetKindNoUsed as the source to read when sourceTargetKind is omitted.
targetEnvironmentIdIDNoRequired with the kind environment.
targetBranchIdIDNoRequired with the kind preview_branch.

Response

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

FieldTypeDescription
idID!
nameString!
descriptionString!
sourcePathString!
editModeSourceEditMode!
allowedTools[String!]!Tool IDs the skill may call; empty when it declares none.
ownerAgentIdStringThe agent that owns the skill, for a skill defined under an agent.
shortNameStringThe skill name without its owning agent prefix, for a skill defined under an agent.

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

Example

graphql
query Skill($projectReference: String!, $id: String!, $sourceTargetKind: SourceTargetKind, $runtimeTargetKind: RuntimeTargetKind, $targetEnvironmentId: ID, $targetBranchId: ID) {
  skill(projectReference: $projectReference, id: $id, sourceTargetKind: $sourceTargetKind, runtimeTargetKind: $runtimeTargetKind, targetEnvironmentId: $targetEnvironmentId, targetBranchId: $targetBranchId) {
    id
    name
    allowedTools
    description
    editMode
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "id": "example"
}