styler

styler is a skill for Claude Code, Codex from LeoLin990405/r-analytics-skill. It costs 22 tokens per session (964 once invoked), scanned A, original, MIT.

An R code formatter that rewrites source files into a consistent style, such as spacing, indentation, and line breaks.

In plain words
What is it for?
Use it to format individual R files, directories, packages, or text, with optional dry runs and style settings.
Why use it?
It removes manual formatting work and keeps code consistent across files and contributors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to format individual R files, directories, packages, or text, with optional dry runs and style settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/styler
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LeoLin990405/r-analytics-skill --skill styler
Clone the repo
git clone --depth 1 https://github.com/LeoLin990405/r-analytics-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for styler

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/styler/github.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/styler)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/styler"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/styler/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for styler

Your own site · 80×15
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/styler"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/styler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 964 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00964
Opus 5.5 $0.00009 $0.00386
Sonnet 5.5 $0.00004 $0.00193
Haiku 4.5 $0.00002 $0.00096

Measured 1mo ago against content hash 28b7d258280f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

styler scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sub-skills/r-dev/r-dev-package/styler/SKILL.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

styler

Non-invasive pretty printing of R code.

Basic Usage

library(styler)

# Style a file
style_file("script.R")

# Style a directory
style_dir("R/")

# Style a package
style_pkg()

# Style text
style_text("x=1+2")

Styling Options

# Default tidyverse style
style_file("script.R")

# Custom indentation
style_file("script.R", indent_by = 4)

# Strict mode (more changes)
style_file("script.R", strict = TRUE)

# Dry run (show changes without applying)
style_file("script.R", dry = "on")

Style Guides

# Tidyverse style (default)
style_file("script.R", style = tidyverse_style())

# Custom style
my_style <- tidyverse_style(
  indent_by = 4,
  strict = FALSE
)
style_file("script.R", style = my_style)

What Styler Changes

# Before
x=1+2
if(x>0){print(x)}
function(a,b,c){a+b+c}

# After
x <- 1 + 2
if (x > 0) {
  print(x)
}
function(a, b, c) {
  a + b + c
}

Scope Control

# Style specific scope
style_file("script.R", scope = "tokens")  # Only tokens
style_file("script.R", scope = "spaces")  # Only spacing
style_file("script.R", scope = "indention")  # Only indentation
style_file("script.R", scope = "line_breaks")  # Only line breaks

# Multiple scopes
style_file("script.R", scope = c("spaces", "tokens"))

Exclusions

# Exclude code blocks
# styler: off
x=1+2
y=3+4
# styler: on

# Exclude single line
x=1+2 # styler: off

IDE Integration

# RStudio
# Addins > Style selection
# Addins > Style active file

# Keyboard shortcut
# Tools > Modify Keyboard Shortcuts
# Search "style"

# VS Code
# Install R extension
# Format document: Shift+Alt+F

CI/CD Integration

# GitHub Actions
# Check if code is styled
style_file("R/", dry = "fail")

# Pre-commit hook
# .pre-commit-config.yaml
# - repo: https://github.com/lorenzwalthert/precommit
#   hooks:
#     - id: style-files

Custom Transformers

# Create custom style
my_style <- function() {
  create_style_guide(
    # Transformers
    space = list(
      spacing_around_op = function(pd) {
        # Custom spacing logic
      }
    ),
    # Other options
    indent_by = 2,
    strict = TRUE
  )
}

style_file("script.R", style = my_style)

Read the full file on GitHub · 212 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 212 lines · 22 tokens per session scan A 28b7d258280f

Subscribe to this mod's changes

styler is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 7mo ago), licensed MIT. It adds 22 tokens to every session and 964 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

algo-avl-trees

Implement a self-balancing AVL binary search tree in Python with rotation-based rebalancing (LL/RR/LR/RL) guaranteeing O(log n) insert/delete/search. Use when a user asks to build/implement an AVL tree, keep a sorted index balanced under insert/delete, explain balance factor or tree rotations, or avoid O(n)…

Pavel-Kravchenko/Bioinformatics · 97 tokens

algo-hash-tables-bloom

Implement Python hash tables (chaining, open addressing, rehashing) and Bloom filters for set membership. Use when building a hash table from scratch, resolving hash collisions, sizing a Bloom filter, or checking k-mer/key set membership under memory limits.

Pavel-Kravchenko/Bioinformatics · 59 tokens

algo-red-black-trees

Implement a red-black self-balancing BST (insert, rotations, recoloring) for O(log n) search on sorted VCF variant positions. Use when building a balanced BST, verifying invariants, or comparing red-black vs AVL trees.

Pavel-Kravchenko/Bioinformatics · 54 tokens

algo-suffix-trees

Build a suffix tree for O(m) pattern search, longest repeated substring, and longest common substring (LCS). Use when finding all motif occurrences in DNA/text, detecting tandem repeats, or comparing two sequences' shared region.

Pavel-Kravchenko/Bioinformatics · 51 tokens

bio-applied-bio-data-formats

Parse/write FASTA, FASTQ, SAM/BAM, VCF, BED, GFF/GTF with pysam and pure Python; decode SAM FLAG/CIGAR; reconcile 0-based vs 1-based coordinates. Use for custom format parsers or off-by-one coordinate bugs.

Pavel-Kravchenko/Bioinformatics · 67 tokens

python-advanced-sql

Write Python decorators/context managers/dataclasses and query gene/variant tables with sqlite3/pandas SQL (JOIN, GROUP BY, HAVING). Use for retry/caching/validation wrappers or SQL against Ensembl/UCSC-style schemas.

Pavel-Kravchenko/Bioinformatics · 52 tokens