Repository navigation
feat(r-lib): add r-tidyverse-style skill - #89
Merged
Merged
Conversation
Add a skill for reviewing and cleaning up R package code against the tidyverse style guide, separating mechanical formatting from behavior-sensitive refactors and deferring to the package's existing conventions.
gadenbuie
marked this pull request as ready for review
October 6, 2026 20:16
Frontmatter (name, description, author/version/license metadata) is administrative and the description is reported separately, so it should not count toward the skill budget. Strip only the frontmatter block with a regex; python-frontmatter's .content also drops the leading blank line and trailing newline, which skewed line counts by 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Adds a new
r-tidyverse-styleskill underr-lib/for reviewing and cleaning up R package code against the tidyverse style guide, with a focus on code largely written by LLMs. It separates mechanical formatting from behavior-sensitive refactors: formatting scoped files comes first, while pipe conversions, evaluation-order tweaks, public renames, or error-text changes are proposed separately and only applied when the user has authorized that scope. It also defers to the package's established conventions over the tidyverse guide unless a migration is requested.Use cases
Testing
./count-skill-tokens.py r-lib/r-tidyverse-stylepasses with no warnings (full output below)marketplace.jsonand both READMEscount-skill-tokens.pywas updated in this PR to exclude SKILL.md frontmatter (author/version/license metadata) from the line and token counts, since the description is already reported separatelyDependencies
No required dependencies. The skill documents optional tooling: Air for scoped formatting, and
jarlandryas optional lint and type checks.Documentation
SKILL.mdis written for Claude with a task workflow and selectively paraphrased style rules from the tidyverse style guide (chapter links act as citations, not required reading). The skill is registered in.claude-plugin/marketplace.json, the rootREADME.md, andr-lib/README.md.Token count
r-tidyverse-style (71 lines, ~1,855 tokens)
Skill description: ~77 tokens