Skip to contents

Download and install a skill from a GitHub repository. The repository should contain one or more skill directories, each with a SKILL.md file.

Usage

btw_skill_install_github(
  repo,
  skill = NULL,
  scope = "project",
  overwrite = NULL
)

Arguments

repo

GitHub repository in "owner/repo" format. Optionally include a Git reference (branch, tag, or SHA) as "owner/repo@ref", following the convention used by pak::pak() and remotes::install_github(). Defaults to "HEAD" when no ref is specified.

skill

Optional skill name. If NULL and the repository contains multiple skills, an interactive picker is shown (or an error in non-interactive sessions).

scope

Where to install the skill. One of:

  • "project" (default): Installs to a project-level skills directory, chosen from .btw/skills/ or .agents/skills/ in that order. If one already exists, it is used; otherwise .btw/skills/ is created.

  • "user": Installs to the first of ~/.btw/skills, ~/.config/btw/skills, or tools::R_user_dir("btw")/skills that already exists, defaulting to ~/.btw/skills if none do.

  • A directory path: Installs to a custom directory, e.g. scope = ".openhands/skills". Use I("project") or I("user") if you need a literal directory with those names.

overwrite

Whether to overwrite an existing skill with the same name. If NULL (default), prompts interactively when a conflict exists; in non-interactive sessions defaults to FALSE, which errors. Set to TRUE to always overwrite, or FALSE to always error on conflict.

Value

The path to the installed skill directory, invisibly.

See also

btw-config for the complete list of project and user configuration locations.

Other skills: btw_skill_install_package(), btw_skill_install_project(), btw_tool_skill()