ClaudeCode.Session.SlashCommand (ClaudeCode v0.36.3)

View Source

Information about an available skill (invoked via /command syntax).

Returned as part of the initialization response from the CLI.

Fields

  • :name - Skill name (without the leading slash)
  • :description - Description of what the skill does
  • :argument_hint - Hint for skill arguments (e.g., "<file>")

Summary

Functions

Creates a SlashCommand from a JSON map.

Types

t()

@type t() :: %ClaudeCode.Session.SlashCommand{
  argument_hint: String.t() | nil,
  description: String.t(),
  name: String.t()
}

Functions

new(data)

@spec new(map() | String.t()) :: t()

Creates a SlashCommand from a JSON map.

Examples

iex> ClaudeCode.Session.SlashCommand.new(%{"name" => "commit", "description" => "Create a commit", "argumentHint" => "<message>"})
%ClaudeCode.Session.SlashCommand{name: "commit", description: "Create a commit", argument_hint: "<message>"}