cran-audit

cran-audit is a skill for Claude Code from queelius/claude-anvil. It costs 49 tokens per session (1,538 once invoked), scanned A, original, MIT.

An R-package checker that compares package files and submission details with CRAN's requirements. CRAN is the public repository where most R users find and install packages.

In plain words
What is it for?
Use it to inspect package structure, DESCRIPTION metadata, documentation, code quality, dependencies, and test coverage.
Why use it?
It reveals critical failures, warnings, and passing checks before a CRAN submission, and may suggest fixes where possible.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

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 pub-pipeline plugin — 6 skills, 5 commands, 5 agents shipped together

Good fit Use it to inspect package structure, DESCRIPTION metadata, documentation, code quality, dependencies, and test coverage.

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 queelius/claude-anvil
Claude Code
/plugin install pub-pipeline

Made for: Claude Code.

Or install pub-pipeline, the plugin that ships this one along with the rest of its 6 skills, 5 commands, 5 agents.

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 cran-audit

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/queelius/claude-anvil/cran-audit"><img src="https://agentmods.dev/badge/skills/queelius/claude-anvil/cran-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,538 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.00049 $0.01538
Opus 5.5 $0.00020 $0.00615
Sonnet 5.5 $0.00010 $0.00308
Haiku 4.5 $0.00005 $0.00154

Measured today against content hash fde1528fbdfb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cran-audit 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 today.

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.

pub-pipeline/skills/cran-audit/SKILL.md · 146 lines

How it starts

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

CRAN Submission Audit

Audit an R package against CRAN Repository Policy requirements and produce a structured gap report. This skill evaluates package structure, DESCRIPTION metadata, documentation, code quality, and test coverage against the full CRAN checklist.

Workflow

1. Locate the Package

Identify the R package to audit. Look for DESCRIPTION file in the current working directory or a specified path. If no R package is found, ask the user which package to audit.

1b. Load User Config

Read .claude/pub-pipeline.local.md if it exists (Read tool). Extract author metadata and package context from YAML frontmatter. If the file is missing, inform the user and offer to create one from the template at ${CLAUDE_PLUGIN_ROOT}/docs/user-config-template.md.

1c. Verify Dependency Availability

Before running the full audit, check that all dependencies are available on CRAN (Bash tool):

  1. Parse Imports, Depends, and LinkingTo fields from DESCRIPTION
  2. For each dependency that is not a base or recommended package, verify it exists on CRAN:
Rscript -e 'ap <- available.packages(); cat("PKG_NAME" %in% rownames(ap))'
  1. For dependencies with version requirements (e.g., pkg (>= 2.0)), verify the requirement is satisfiable:
Rscript -e 'ap <- available.packages(); cat(ap["PKG_NAME", "Version"])'

Compare the available version against the minimum required version.

If any dependency is not on CRAN, flag it as a hard blocker in the gap report and stop here — the package cannot pass R CMD check --as-cran until all dependencies are available. Recommend the user publish the missing dependency first or switch to a CRAN-available alternative.

2. Gather Package State

Run these checks in parallel where possible:

Regenerate documentation (Bash tool): Run Rscript -e 'devtools::document()' to ensure NAMESPACE and man/ files are current before auditing them. This prevents false negatives from stale roxygen output.

Read the full file on GitHub · 146 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. today First seen · 146 lines · 49 tokens per session scan A fde1528fbdfb

Subscribe to this mod's changes

cran-audit is a skill published in the GitHub repository queelius/claude-anvil (2 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 1,538 once invoked, about $0.0002 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-10-19.

Related

Other skills, from other repositories