Skip to content

How do I deploy btw-generated skills to a package user? #197

Closed

Description

@znmeb

I'm building an R package (https://github.com/AlgoCompSynth/eikosany) that includes a btw Shiny chat agent to answer questions from a user about using the package and carry out tasks requested by the user. Note that the user would see the package as installed, not as I see it as the developer or as you'd see it in the GitHub source repository.

To make the chat agent's question answering easier, I'm adding skills with btw::btw_task_create_skill. btw placed them in a directory .btw/skills in the root of the package as seen by the developer. devtools::check() does not like that for two reasons:

  1. It's a non-standard file in the root of the package directory, and
  2. It's a "hidden" file (name starts with a .).

I've moved the directory to inst/btw, which satisfies devtools::check() and means the skills will be in the package both for me as the developer and a user who's installed it. But will the chat agent be able to find them?

Activity

  1. gadenbuie commented on Jun 22, 2026

    @gadenbuie
    Collaborator

    I recommend putting your package's skills in inst/skills/{skill-name}/SKILL.md.

  2. gadenbuie commented on Jun 22, 2026

    @gadenbuie
    Collaborator

    Oops, sorry, I clicked the wrong button and sent that message too quickly. btw_client() and btw_app() automatically pick up skills from attached packages when they're stored in the inst/skills directory. Depending on the setup of your package, that means that if you're using either of those function the skill will be automatically included for users (because you're package will be attached). You can test this out by inspecting the system prompt (either just print the client from btw_client() or use the "system prompt" button in the toolbar below the chat input in btw_app()) to make sure that it mentions your skill.

  3. znmeb commented on Jun 22, 2026

    @znmeb
    Author

    Cool ... so I instinctively did the right thing!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions