Skip to content

Bundle collapse-r agent skill - #882

Open
arthurgailes wants to merge 1 commit into
fastverse:developmentfrom
arthurgailes:feature/bundle-skill
Open

arthurgailes wants to merge 1 commit into
fastverse:developmentfrom
arthurgailes:feature/bundle-skill

Conversation

@arthurgailes

Copy link
Copy Markdown
Contributor

Copies the collapse-r skill from fastverse/skills (c3748aa) into inst/skills/collapse-r/, following btw's convention for package-bundled skills. btw discovers it automatically when collapse is attached, and btw::btw_skill_install_package("collapse") installs it. SKILL.md and references/ are included; evals/ is left out.

Notes:

  • fastverse/skills has no LICENSE file, so please confirm these files can ship under collapse's license.
  • The files are a snapshot, so later changes in fastverse/skills need to be copied over.
  • The skill text has some non-ASCII characters (em dashes, ellipses). These are in inst/, so R CMD check doesn't flag them.

Tested by installing the branch and running btw skills list collapse, which lists collapse-r. R CMD check not run.

🤖 Generated with Claude Code

Copy the collapse-r skill from fastverse/skills (c3748aa) into
inst/skills/ so btw discovers it when collapse is attached and
btw_skill_install_package("collapse") can install it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SebKrantz

Copy link
Copy Markdown
Member

Hi @arthurgailes. Thanks for this. I can see that that could be useful. On the other hand it is not clear to me how popular the btw package is and what other use-cases there are apart from the skill being installable directly from the package. For example what happend after btw::btw_skill_install_package("collapse"). Is the skill then installed in claude code? Or only in btw?

Overall, my concern is that the skill increases the size of the package and I think maintaining it in a separate repo together with the fastverse skill would be easier.

@arthurgailes

Copy link
Copy Markdown
Contributor Author

Thanks. I see the following benefits:

  1. Version-matched: The skill stays linked to the R package that's actually installed.
  2. Discoverable: btw skills list collapse finds it with no knowledge of fastverse/skills.
  3. More collapse usage: agents default to dplyr/data.table; having the collapse skill handy reverse this.
  4. Small: to your concern, its ~150 KB of Markdown, no code or dependencies.

If you run btw::btw_skill_install_package("collapse"), then given a prompt that doesn't mention collapse ("demean log GDP within country and compute YoY growth in R"):

  • without the skill: group_by() / mutate() / lag() (dplyr)
  • with the skill: fmutate() / fwithin(g = country) / fgrowth(g = country, t = year)

More broadly, I think the btw model here of bundling them with the package is a good one that packages should adopt by default. R needs to be ready for agent-first coding

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants