# create_skill

## nominal.experimental.analyst.create_skill(client, content, *, files=None, enabled=True, workspace=None)

Create a skill from its SKILL.md and any reference files.

The files are saved as written to `skills/<name>` in the workspace’s skills drive, where `name` is the
name in SKILL.md’s frontmatter, and the skill is registered from that SKILL.md. An enabled skill reaches
every Analyst user and connected agent in the workspace.

If the skills service refuses the skill, the files this call saved are removed; if they can’t be removed,
the error’s notes say where they are. After a timeout or outage the registration outcome may be unknown,
so the files stay and the error’s notes say so. If enabling the skill fails, the error’s notes give its RID.
Call [`get_skill`](https://dev.nominal.io/python/ref/generated/nominal.experimental.analyst.get_skill.md#nominal.experimental.analyst.get_skill "nominal.experimental.analyst.get_skill") to check its current state before retrying.

Parameters:
:   - **client** ([*NominalClient*](https://dev.nominal.io/python/ref/generated/nominal.core.NominalClient.md#nominal.core.NominalClient "nominal.core.client.NominalClient"))

      Authenticated Nominal client.
    - **content** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)"))

      The skill’s SKILL.md, frontmatter included. Its frontmatter names and describes the skill.
    - **files** ([*Mapping*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]* *|* *None*)

      Reference files as UTF-8 text, keyed by path relative to the skill’s folder, such as
      `methods/limits.md`.
    - **enabled** ([*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)"))

      Whether the skill starts turned on. Defaults to True.
    - **workspace** ([*Workspace*](https://dev.nominal.io/python/ref/generated/nominal.core.Workspace.md#nominal.core.Workspace "nominal.core.workspace.Workspace") *|* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* *None*)

      Workspace or workspace RID for the skill. Defaults to the client’s default workspace.

Raises:
:   - [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError "(in Python v3.15)") – If SKILL.md has no frontmatter with a valid name, `enabled` is True and SKILL.md has no
      description of 1 to 1024 UTF-16 code units, a file’s path is SKILL.md or leads outside the skill’s folder,
      or there are more than 99 reference files. Enabled entries must fit in 64 KiB and
      provide valid optional frontmatter fields. Nothing is saved.
    - [**NominalPermissionDeniedError**](https://dev.nominal.io/python/ref/generated/nominal.exceptions.NominalPermissionDeniedError.md#nominal.exceptions.NominalPermissionDeniedError "nominal.exceptions.NominalPermissionDeniedError") – If the user can’t edit the workspace’s configuration, which creating a
      skill needs. Nothing is saved.
    - [**NominalAlreadyExistsError**](https://dev.nominal.io/python/ref/generated/nominal.exceptions.NominalAlreadyExistsError.md#nominal.exceptions.NominalAlreadyExistsError "nominal.exceptions.NominalAlreadyExistsError") – If the workspace already has a skill with this name. Nothing is saved.

Return type:
:   [*Skill*](https://dev.nominal.io/python/ref/generated/nominal.experimental.analyst.Skill.md#nominal.experimental.analyst.Skill "nominal.experimental.analyst._skill.Skill")
