import_skill#

nominal.experimental.analyst.import_skill(client, path, *, enabled=True, workspace=None)#

Create a skill from a folder with SKILL.md at its top level, or a .zip holding one such folder.

Files are read the way the app’s Import Skills reads them, skipping paths with a part that starts with “.”, such as .git. Folder imports also skip symbolic links and files reached through them. Every file is read before anything is saved.

Parameters:
  • client (NominalClient)

    Authenticated Nominal client.

  • path (Path | str)

    The skill’s folder, or a .zip of it.

  • enabled (bool)

    Whether the skill starts turned on. Defaults to True.

  • workspace (Workspace | str | None)

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

Return type:

Skill

The skill is created as create_skill() creates it.

Raises:
  • ValueError – If the folder or .zip has no SKILL.md, the .zip holds more than one skill folder, a file is not UTF-8 text, SKILL.md has no frontmatter with a valid name, or enabled is True and SKILL.md has no description of 1 to 1024 UTF-16 code units. Nothing is saved.

  • NominalPermissionDeniedError – If the user can’t edit the workspace’s configuration, which creating a skill needs. Nothing is saved.

  • NominalAlreadyExistsError – If the workspace already has a skill with this name. Nothing is saved.

Return type:

Skill