ExBifrost.Api.Skills (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Skills.

Summary

Functions

Bump all-skills version Manually bumps the synthetic bifrost-all-skills plugin version as an escape hatch for marketplace refreshes.

Clean up orphan skill files Deletes uploaded files that are not attached to any skill version. This is mostly a maintenance escape hatch: Bifrost also runs orphan cleanup on server startup. Non-forced cleanup preserves uploads newer than 24 hours so files are not deleted while a skill is still being edited.

Create skill Creates a new skill and immediately serves its first immutable version.

Delete skill Deletes a skill and all of its versions.

Download all skills as ZIP Public ZIP download containing every currently served skill.

Download skill as ZIP Public ZIP download containing a single currently served skill.

Download skill file Public raw file download from the currently served version of a skill.

Get all-skills version Returns the current version of the synthetic bifrost-all-skills marketplace plugin.

Get Claude Code skills marketplace Public marketplace JSON consumed by Claude Code. Available only when the Bifrost server can access the git binary.

Get Codex skills marketplace JSON Public Codex marketplace JSON for inspecting the skills and plugin sources exposed by Bifrost.

Get skill Returns a skill by ID. Pass version to inspect a historical version snapshot.

List skill versions Returns immutable version snapshots for a skill.

List skills Returns a paginated list of skills from the Skills Repository.

Shift served skill version Changes the served version for a skill without deleting newer versions.

Update skill Creates a new immutable skill version. Set serve to false to save the version without switching the served version.

Upload skill file Uploads one file for later attachment to a skill version. The response contains either an object-storage key or a database blob ID.

Functions

bump_all_skills_version(connection, bump_all_skills_version_request, opts \\ [])

Bump all-skills version Manually bumps the synthetic bifrost-all-skills plugin version as an escape hatch for marketplace refreshes.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • bump_all_skills_version_request (BumpAllSkillsVersionRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.AllSkillsVersionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

cleanup_orphan_skill_files(connection, opts \\ [])

@spec cleanup_orphan_skill_files(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.SkillOrphanCleanupResponse.t()}
  | {:error, Tesla.Env.t()}

Clean up orphan skill files Deletes uploaded files that are not attached to any skill version. This is mostly a maintenance escape hatch: Bifrost also runs orphan cleanup on server startup. Non-forced cleanup preserves uploads newer than 24 hours so files are not deleted while a skill is still being edited.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :force (boolean()): Bypass the 24-hour grace period when true.

Returns

  • {:ok, ExBifrost.Model.SkillOrphanCleanupResponse.t} on success
  • {:error, Tesla.Env.t} on failure

create_skill(connection, create_skill_request, opts \\ [])

Create skill Creates a new skill and immediately serves its first immutable version.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • create_skill_request (CreateSkillRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.SkillResponse.t} on success
  • {:error, Tesla.Env.t} on failure

delete_skill(connection, id, opts \\ [])

@spec delete_skill(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.MessageResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Delete skill Deletes a skill and all of its versions.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • id (String.t): Skill ID
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.MessageResponse.t} on success
  • {:error, Tesla.Env.t} on failure

download_all_skills(connection, opts \\ [])

@spec download_all_skills(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Download all skills as ZIP Public ZIP download containing every currently served skill.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

download_skill(connection, skill_name, opts \\ [])

@spec download_skill(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Download skill as ZIP Public ZIP download containing a single currently served skill.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • skill_name (String.t): Skill name.
  • opts (keyword): Optional parameters

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

download_skill_file(connection, skill_name, filepath, opts \\ [])

@spec download_skill_file(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Download skill file Public raw file download from the currently served version of a skill.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • skill_name (String.t): Skill name.
  • filepath (String.t): Relative file path inside the skill package.
  • opts (keyword): Optional parameters

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

get_all_skills_version(connection, opts \\ [])

@spec get_all_skills_version(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.AllSkillsVersionResponse.t()}
  | {:error, Tesla.Env.t()}

Get all-skills version Returns the current version of the synthetic bifrost-all-skills marketplace plugin.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.AllSkillsVersionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_claude_code_skills_marketplace(connection, opts \\ [])

@spec get_claude_code_skills_marketplace(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.ClaudeCodeSkillMarketplace.t()}
  | {:error, Tesla.Env.t()}

Get Claude Code skills marketplace Public marketplace JSON consumed by Claude Code. Available only when the Bifrost server can access the git binary.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.ClaudeCodeSkillMarketplace.t} on success
  • {:error, Tesla.Env.t} on failure

get_codex_skills_marketplace(connection, opts \\ [])

@spec get_codex_skills_marketplace(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.CodexSkillMarketplace.t()}
  | {:error, Tesla.Env.t()}

Get Codex skills marketplace JSON Public Codex marketplace JSON for inspecting the skills and plugin sources exposed by Bifrost.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.CodexSkillMarketplace.t} on success
  • {:error, Tesla.Env.t} on failure

get_skill(connection, id, opts \\ [])

@spec get_skill(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.SkillResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Get skill Returns a skill by ID. Pass version to inspect a historical version snapshot.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • id (String.t): Skill ID
  • opts (keyword): Optional parameters
    • :version (String.t): Optional version to load instead of the currently served version.

Returns

  • {:ok, ExBifrost.Model.SkillResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_skill_versions(connection, id, opts \\ [])

@spec list_skill_versions(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.ListSkillVersionsResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

List skill versions Returns immutable version snapshots for a skill.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • id (String.t): Skill ID
  • opts (keyword): Optional parameters
    • :search (String.t): Search versions by version string.
    • :sort_by (String.t): Field to sort by.
    • :order (String.t): Sort order.
    • :limit (integer()): Number of versions to return. Maximum 100.
    • :offset (integer()): Number of versions to skip.

Returns

  • {:ok, ExBifrost.Model.ListSkillVersionsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_skills(connection, opts \\ [])

@spec list_skills(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.ListSkillsResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

List skills Returns a paginated list of skills from the Skills Repository.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :search (String.t): Search by skill name or description.
    • :sort_by (String.t): Field to sort by.
    • :order (String.t): Sort order.
    • :limit (integer()): Number of skills to return. Maximum 100.
    • :offset (integer()): Number of skills to skip.

Returns

  • {:ok, ExBifrost.Model.ListSkillsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

shift_skill_version(connection, id, shift_skill_version_request, opts \\ [])

Shift served skill version Changes the served version for a skill without deleting newer versions.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • id (String.t): Skill ID
  • shift_skill_version_request (ShiftSkillVersionRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.SkillResponse.t} on success
  • {:error, Tesla.Env.t} on failure

update_skill(connection, id, update_skill_request, opts \\ [])

Update skill Creates a new immutable skill version. Set serve to false to save the version without switching the served version.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • id (String.t): Skill ID
  • update_skill_request (UpdateSkillRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.SkillResponse.t} on success
  • {:error, Tesla.Env.t} on failure

upload_skill_file(connection, file, opts \\ [])

@spec upload_skill_file(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.UploadSkillFileResponse.t()}
  | {:error, Tesla.Env.t()}

Upload skill file Uploads one file for later attachment to a skill version. The response contains either an object-storage key or a database blob ID.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • file (String.t): File to upload. Exactly one file part is accepted.
  • opts (keyword): Optional parameters
    • :path (String.t): Optional relative path to store with the uploaded file.

Returns

  • {:ok, ExBifrost.Model.UploadSkillFileResponse.t} on success
  • {:error, Tesla.Env.t} on failure