audit-r-code

audit-r-code is a skill for Claude Code from InstituteforDiseaseModeling/idm_standards. It costs 116 tokens per session (1,938 once invoked), scanned A, original, MIT.

A code-quality review for projects written mainly in R, a programming language often used for statistics and data analysis. It scores the project against IDM engineering standards and writes a code_audit.md report.

In plain words
What is it for?
Use it to review R packages or scripts, including projects identified by a DESCRIPTION file, renv.lock file, or mostly R and R Markdown files.
Why use it?
It identifies issues affecting code quality, ease of use, and safe operation using checks suited to R projects.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the idm-standards plugin — 10 skills shipped together

Good fit Use it to review R packages or scripts, including projects identified by a DESCRIPTION file, renv.lock file, or mostly R and R Markdown files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add InstituteforDiseaseModeling/idm_standards
Claude Code
/plugin install idm-standards

Made for: Claude Code.

Or install idm-standards, the plugin that ships this one along with the rest of its 10 skills.

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 audit-r-code

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/institutefordiseasemodeling/idm_standards/audit-r-code"><img src="https://agentmods.dev/badge/skills/institutefordiseasemodeling/idm_standards/audit-r-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00116 $0.01938
Opus 5 $0.00058 $0.00969
Sonnet 5 $0.00023 $0.00388
Haiku 4.5 $0.00012 $0.00194

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

Security

Grade A, and why

audit-r-code scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

7. For Tier 1: check CRAN (`curl -I https://cran.r-project.org/web/packages/<package>/DESCRIPTION`) or r-universe publication.
idm_standards_plugin/skills/audit-r-code/SKILL.md · 78 lines

How it starts

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

Score an R project against the IDM engineering quality guidelines (including the R-specific guidance in eng_guidance/2b_r.md, which defers to the Tidyverse style guide for style) and write a code_audit.md report.

Skill version: 2.0_2026.06.10

Workflow

This skill follows exactly the same workflow as audit-code — read $CLAUDE_PLUGIN_ROOT/skills/audit-code/SKILL.md now and follow its Steps 0–10 (start time; argument parsing; tier/strictness confirmation; prior-report reading; parallel sub-agent dispatch; score computation; score reconciliation; recommendations and proposed solutions; writing code_audit.md; offering to fix), with the R-specific differences below.

Difference 1: Language routing (replaces audit-code Step 1 detection)

This skill is for R projects: a DESCRIPTION file, an renv.lock, or a majority of source files being *.R/*.Rmd. If the project turns out to be mainly Python, stop and invoke audit-code instead. For substantial Python+R mixes (each ≥25% of source files), ask the user which audit to run (or both) — but in non-interactive contexts, or when invoked by audit-project, default to auditing whichever language has more source files (ties → R, since this skill was selected) and note the choice in the report.

Difference 2: Scoring schema (replaces audit-code Step 3)

Read the R schema from: $CLAUDE_PLUGIN_ROOT/skills/audit-r-code/r-scoring-schema.yaml

Category weights, metric weights, N/A rules, and failure conditions are identical to the Python schema; the rubric anchors are R-specific.

Difference 3: Tier inference signals (audit-code Step 2)

When inferring a suggested tier:

  • DESCRIPTION + NAMESPACE + man/ + CRAN/r-universe publication + CI → suggest Tier 1 (package)
  • renv.lock (or DESCRIPTION without package skeleton), R/ functions, some tests, README → suggest Tier 2 (shared research code)
  • Loose .R/.Rmd scripts, single author → suggest Tier 3 (one-off)

Read the full file on GitHub · 78 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 78 lines · 116 tokens per session scan A 3eedf230a7fc

Subscribe to this mod's changes

audit-r-code is a skill published in the GitHub repository InstituteforDiseaseModeling/idm_standards (2 stars, last pushed yesterday), licensed MIT. It adds 116 tokens to every session and 1,938 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.