Class: Anthropic::Models::Skill

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/skill.rb,
sig/anthropic/models/skill.rbs

Overview

See Also:

  • Anthropic::Resources::Skills#create

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, display_name:, latest_version_id:, source:, updated_at:, type: :skill) ⇒ Object

Some parameter documentations has been truncated, see Anthropic::Models::Skill for more details.

Parameters:

  • id (String)

    Unique identifier for the skill.

  • created_at (Time)

    ISO 8601 timestamp of when the skill was created.

  • display_name (String)

    Human-readable, single-line label for the Skill. Maximum 255 characters.

  • latest_version_id (String)

    ID of the newest Skill Version — what latest references resolve to. Always set

  • source (Anthropic::Models::SkillSource)

    Where the Skill comes from.

  • updated_at (Time)

    ISO 8601 timestamp of when the skill was last updated.

  • type (Symbol, :skill) (defaults to: :skill)

    Object type.



# File 'lib/anthropic/models/skill.rb', line 63

Instance Attribute Details

#created_atTime

ISO 8601 timestamp of when the skill was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


19
# File 'lib/anthropic/models/skill.rb', line 19

required :created_at, Time

#display_nameString

Human-readable, single-line label for the Skill. Maximum 255 characters. Always set: derived from the SKILL.md frontmatter name when omitted at creation. Not unique.

Parameters:

  • value (String)

Returns:

  • (String)


27
# File 'lib/anthropic/models/skill.rb', line 27

required :display_name, String

#idString

Unique identifier for the skill.

The format and length of IDs may change over time.

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/anthropic/models/skill.rb', line 13

required :id, String

#latest_version_idString

ID of the newest Skill Version — what latest references resolve to. Always set: a Skill holds at least one version.

Parameters:

  • value (String)

Returns:

  • (String)


34
# File 'lib/anthropic/models/skill.rb', line 34

required :latest_version_id, String

#sourceAnthropic::Models::SkillSource

Where the Skill comes from.

Possible values:

  • "custom": authored by the platform user; private to their workspace
  • "anthropic": published by Anthropic; shared and read-only
  • "anthropic_example": Anthropic-published sample Skill
  • "plugin": resolved from an installed plugin


47
# File 'lib/anthropic/models/skill.rb', line 47

required :source, -> { Anthropic::SkillSource }

#typeSymbol, :skill

Object type.

For Skills, this is always "skill".

Parameters:

  • value (:skill)

Returns:

  • (Symbol, :skill)


55
# File 'lib/anthropic/models/skill.rb', line 55

required :type, const: :skill

#updated_atTime

ISO 8601 timestamp of when the skill was last updated.

Parameters:

  • value (Time)

Returns:

  • (Time)


61
# File 'lib/anthropic/models/skill.rb', line 61

required :updated_at, Time

Instance Method Details

#to_hash{

Returns:

  • ({)


39
# File 'sig/anthropic/models/skill.rbs', line 39

def to_hash: -> {