lintr

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

An R tool for checking source code against style rules and spotting common potential problems. Linting means automatically reviewing code for issues such as inconsistent spacing or unsafe patterns.

In plain words
What is it for?
Use it to check individual files, directories, or R packages and to configure rules such as line length, assignments, spacing, and unwanted functions.
Why use it?
It finds small mistakes and inconsistent style early, before they make code harder to maintain or review.

Skill for Claude CodeCodex

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

Good fit Use it to check individual files, directories, or R packages and to configure rules such as line length, assignments, spacing, and unwanted functions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/lintr
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 lintr
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 lintr

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/lintr/github.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/lintr)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/lintr"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/lintr/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 lintr

Your own site · 80×15
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/lintr"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/lintr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,005 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.00023 $0.01005
Opus 5 $0.00012 $0.00502
Sonnet 5 $0.00005 $0.00201
Haiku 4.5 $0.00002 $0.00101

Measured 5d ago against content hash f2da51d30a54, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

lintr 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 5d 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/lintr/SKILL.md · 195 lines

How it starts

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

lintr

Static code analysis for R.

Basic Usage

library(lintr)

# Lint a file
lint("script.R")

# Lint a directory
lint_dir("R/")

# Lint a package
lint_package()

# Lint code string
lint("x=1")

Configuration

# .lintr file in project root
linters: linters_with_defaults(
    line_length_linter(120),
    commented_code_linter = NULL
  )
exclusions: list(
    "R/generated.R",
    "tests/testthat/helper.R" = list(1:10)
  )

Common Linters

# Style linters
assignment_linter()        # Use <- not =
spaces_inside_linter()     # No spaces inside brackets
commas_linter()            # Space after commas
infix_spaces_linter()      # Spaces around operators
line_length_linter(80)     # Line length limit
trailing_whitespace_linter()
trailing_blank_lines_linter()

# Best practice linters
no_tab_linter()
T_and_F_symbol_linter()    # Use TRUE/FALSE not T/F
equals_na_linter()         # Use is.na() not == NA
seq_linter()               # Use seq_len/seq_along
undesirable_function_linter()
undesirable_operator_linter()

Custom Configuration

# Use specific linters
lint("script.R", linters = list(
  assignment_linter(),
  line_length_linter(100),
  trailing_whitespace_linter()
))

# Modify defaults
lint("script.R", linters = linters_with_defaults(
  line_length_linter = line_length_linter(120),
  commented_code_linter = NULL  # Disable
))

Exclusions

# Exclude entire file in .lintr
exclusions: list("R/legacy.R")

# Exclude specific lines
exclusions: list(
    "R/file.R" = list(1, 5:10, 25)
  )

# Inline exclusion (in code)
x = 1 # nolint
x = 1 # nolint: assignment_linter

# Block exclusion
# nolint start
x = 1
y = 2
# nolint end

# Exclude next line
# nolint next
x = 1

IDE Integration

# RStudio
# Tools > Global Options > Code > Diagnostics
# Enable "Show diagnostics for R"

# VS Code
# Install R extension
# Lintr runs automatically

# Emacs/ESS
# (setq ess-use-flymake-for-R t)

CI/CD Integration

# GitHub Actions
# .github/workflows/lint.yaml
# - uses: r-lib/actions/setup-r@v2
# - run: |
#     install.packages("lintr")
#     lintr::lint_package()

# Check in CI
if (length(lintr::lint_package()) > 0) {
  stop("Linting errors found")
}

Read the full file on GitHub · 195 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. 5d ago First seen · 195 lines · 23 tokens per session scan A f2da51d30a54

Subscribe to this mod's changes

lintr is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 23 tokens to every session and 1,005 once invoked, about $0.0001 per session on Opus 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

cnsplots

Create, revise, and troubleshoot publication-ready scientific plots in Python with cnsplots, including distribution, regression, heatmap, genomics, survival, set, flow, and multi-panel figures. Use when a user asks for cnsplots code, Cell/Nature/Science-style visualization, precise physical figure dimensions…

faridrashidi/cnsplots · 79 tokens

searching-codebases

Binding-resolved Python symbol queries via pyright — every true caller (--refs), the real definition (--def), or an inferred signature (--hover) of a .py symbol, excluding the same-named false positives text search cannot tell apart. Use when a task needs ALL callers or users of a named Python symbol and grep would…

oaustegard/claude-skills · 133 tokens

python-lsp

Semantic Python code queries via a stdio LSP client driving pyright-langserver. Provides binding-resolved go-to-definition, find-references, hover types, type diagnostics, file symbol outlines, and project-wide symbol search — name resolution and type inference that tree-sitter and ripgrep cannot do. Use when you need…

oaustegard/claude-skills · 155 tokens

fused-overview

Orientation to what Fused is and when to use it. Use when deciding whether to use Fused for a task, planning a new Fused project, or understanding Fused's capabilities as a remote Python execution platform.

fusedio/skills · 49 tokens

python-bio-classes

Build Python classes for Gene/DNA/RNA/Protein records with eq/lt/hash, @property validation, ABCs, and @classmethod parsers (fromfastastring). Use when modeling genes/FASTA/GFF as objects or asked about Python OOP, inheritance, dataclasses.

Pavel-Kravchenko/Bioinformatics · 69 tokens

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