Home / Class/ Skills Class — anthropic-sdk-python Architecture

Skills Class — anthropic-sdk-python Architecture

Architecture documentation for the Skills class in skills.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  a066815a_19f8_2563_67f3_466b1e29bc2d["Skills"]
  32bd9d9e_8b62_b229_7718_45771b424c40["SyncAPIResource"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|extends| 32bd9d9e_8b62_b229_7718_45771b424c40
  838ab8e2_8763_65c1_65fc_cb3d8a4f7d3c["skills.py"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|defined in| 838ab8e2_8763_65c1_65fc_cb3d8a4f7d3c
  ebe3a7a2_9240_1421_ec45_975b0654497e["versions()"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|method| ebe3a7a2_9240_1421_ec45_975b0654497e
  4bd15083_6195_c01e_5227_1ceaa414c951["with_raw_response()"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|method| 4bd15083_6195_c01e_5227_1ceaa414c951
  c0846a19_46ee_4263_8537_e4ffdbadec99["with_streaming_response()"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|method| c0846a19_46ee_4263_8537_e4ffdbadec99
  8beed2c7_f3a2_3f5c_690e_f4bf9d03caad["create()"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|method| 8beed2c7_f3a2_3f5c_690e_f4bf9d03caad
  2afc1c02_fc53_a5c8_d9cd_6638b777fde3["retrieve()"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|method| 2afc1c02_fc53_a5c8_d9cd_6638b777fde3
  cb7ea198_1cf9_7468_c1b6_265fcf0ac99f["list()"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|method| cb7ea198_1cf9_7468_c1b6_265fcf0ac99f
  c6e8ed5c_930f_1691_0a52_55e138c5af1d["delete()"]
  a066815a_19f8_2563_67f3_466b1e29bc2d -->|method| c6e8ed5c_930f_1691_0a52_55e138c5af1d

Relationship Graph

Source Code

src/anthropic/resources/beta/skills/skills.py lines 53–321

class Skills(SyncAPIResource):
    @cached_property
    def versions(self) -> Versions:
        return Versions(self._client)

    @cached_property
    def with_raw_response(self) -> SkillsWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
        """
        return SkillsWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> SkillsWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response
        """
        return SkillsWithStreamingResponse(self)

    def create(
        self,
        *,
        display_title: Optional[str] | Omit = omit,
        files: Optional[SequenceNotStr[FileTypes]] | Omit = omit,
        betas: List[AnthropicBetaParam] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> SkillCreateResponse:
        """
        Create Skill

        Args:
          display_title: Display title for the skill.

              This is a human-readable label that is not included in the prompt sent to the
              model.

          files: Files to upload for the skill.

              All files must be in the same top-level directory and must include a SKILL.md
              file at the root of that directory.

          betas: Optional header to specify the beta version(s) you want to use.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        extra_headers = {
            **strip_not_given(
                {
                    "anthropic-beta": ",".join(chain((str(e) for e in betas), ["skills-2025-10-02"]))
                    if is_given(betas)
                    else not_given
                }
            ),
            **(extra_headers or {}),
        }
        extra_headers = {"anthropic-beta": "skills-2025-10-02", **(extra_headers or {})}
        body = deepcopy_minimal(
            {
                "display_title": display_title,
                "files": files,
            }
        )
        extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", "<array>"]])
        # It should be noted that the actual Content-Type header that will be
        # sent to the server will contain a `boundary` parameter, e.g.

Extends

Frequently Asked Questions

What is the Skills class?
Skills is a class in the anthropic-sdk-python codebase, defined in src/anthropic/resources/beta/skills/skills.py.
Where is Skills defined?
Skills is defined in src/anthropic/resources/beta/skills/skills.py at line 53.
What does Skills extend?
Skills extends SyncAPIResource.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free