Agent skill

R Package Check

by pedrohcgs in pedrohcgs/claude-code-my-workflow

Run the full R package release gate — regenerate docs, run the test suite, run R CMD check --as-cran, and triage every ERROR / WARNING / NOTE against CRAN policy before a release or submission.

MITAuto-check: notesTesting & QA

Install R Package Check

skills CLI
$ npx skills add pedrohcgs/claude-code-my-workflow --skill r-package-check -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pedrohcgs/claude-code-my-workflow r-package-check --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/r-package-check .claude/skills/r-package-check && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
r-package-check
GitHub stars
1.7k
Token cost
~1.6k tokens
SKILL.md length
523 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Run the full R package release gate — regenerate docs, run the test suite, run R CMD check --as-cran, and triage every ERROR / WARNING / NOTE against CRAN policy before a release or submission.

  • Works in 7 steps: Pre-Flight Report → Document → Test → …
  • The user says check my R package
  • SKILL.md covers Constraints, Workflow Phases, Important and Long-running checks: use the…
  • Calls git

What it does

R Package Check is an agent skill from pedrohcgs/claude-code-my-workflow. Run the full R package release gate — regenerate docs, run the test suite, run R CMD check --as-cran, and triage every ERROR / WARNING / NOTE against CRAN policy before a release or submission. Use when the user says "check my R package", "R CMD check", "is this package CRAN-ready", "run devtools::check", "prepare for CRAN submission", or points at a directory containing a DESCRIPTION file. Produces a check report + CRAN-submission checklist in qualityreports/.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test generation. The repository describes itself as: A ready-to-fork Claude Code template for academics using LaTeX/Beamer + R. Multi-agent review, quality gates, adversarial QA, and replication protocols. The licence is MIT.

When your agent uses it

  • The user says check my R package
  • Is this package CRAN-ready
  • Run devtools::check
  • Prepare for CRAN submission

Example prompts

  • “check my R package”
  • “R CMD check”
  • “is this package CRAN-ready”
  • “/r-package-check”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob, Bash, Agent, Task, Monitor

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Pre-Flight Report
  2. Document
  3. Test
  4. Check (--as-cran)
  5. Coverage (optional)
  6. Source Review
  7. Release Gate + Report

What it can do on your machine

Read from SKILL.md and the folder at commit ae72617. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob
    • Bash
    • Agent
    • Task
    • Monitor

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

R Package Check loads about 1.6k tokens when it runs. Until then it costs about 121 tokens; SKILL.md has 523 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~121
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Grep, Glob, Bash, Agent, Task, Monitor

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pedrohcgs/claude-code-my-workflow at commit ae72617, republished under its MIT licence (© pedrohcgs). 523 words, ~1,611 tokens.

Download SKILL.mdSave it as .claude/skills/r-package-check/SKILL.md (or your agent's skills folder).
name
r-package-check
description
Run the full R package release gate — regenerate docs, run the test suite, run R CMD check --as-cran, and triage every ERROR / WARNING / NOTE against CRAN policy before a release or submission. Use when the user says "check my R package", "R CMD check", "is this package CRAN-ready", "run devtools::check", "prepare for CRAN submission", or points at a directory containing a DESCRIPTION file. Produces a check report + CRAN-submission checklist in `quality_reports/`.
allowed-tools
Read, Grep, Glob, Bash, Agent, Task, Monitor
argument-hint
[path to package root, or blank to autodetect from DESCRIPTION]
disable-model-invocation
true
effort
high
metadata.author
Claude Code Academic Workflow
metadata.version
1.0.0

/r-package-check — R Package Release Gate

Run the document → test → check → triage pipeline that decides whether an R package is releasable, then review the source for the issues R CMD check cannot see.

Input: $ARGUMENTS — the package root (a directory containing DESCRIPTION). If blank, autodetect by searching upward/within the working directory for DESCRIPTION.


Constraints

  • Follow .claude/rules/r-package-conventions.md — the CRAN-readiness bar (0 errors, 0 warnings, explained notes) is the gate.
  • Treat man/ and NAMESPACE as generated — regenerate with devtools::document(); never hand-edit them.
  • Run the r-package-reviewer agent on the source before declaring the package releasable.
  • Do not bump the version or write to CRAN. This skill checks; the human decides when to submit.

Workflow Phases

Phase 0: Pre-Flight Report
markdown
## Pre-Flight Report — R Package Check

**Package:** [name + version from DESCRIPTION]
**Root:** [path]
**Exported functions:** [from NAMESPACE / `@export` count]
**Dependencies:** Imports [list] · Suggests [list] · Depends [list]
**Toolchain available:** devtools [✓/✗], roxygen2 [✓/✗], testthat [✓/✗], R CMD [✓/✗], covr [✓/✗]
**Plan:** document → test → check --as-cran → triage → review

Detect the toolchain with a quick probe; if devtools/R CMD is missing, stop and tell the user what to install.

bash
Rscript -e 'cat("devtools:", requireNamespace("devtools", quietly=TRUE),
               "roxygen2:", requireNamespace("roxygen2", quietly=TRUE),
               "testthat:", requireNamespace("testthat", quietly=TRUE),
               "covr:", requireNamespace("covr", quietly=TRUE), "\n")'
Phase 1: Document

Regenerate man/ + NAMESPACE and detect drift (generated docs that were not committed):

bash
Rscript -e 'devtools::document("[pkg]")'
git -C "[pkg]" status --short man/ NAMESPACE   # any diff = generated docs were stale

If git status shows changes, flag: the committed man//NAMESPACE were out of sync with the roxygen blocks.

Phase 2: Test
bash
Rscript -e 'devtools::test("[pkg]")'

Report failures and (if covr is available, Phase 4) coverage of exported functions.

Phase 3: Check (--as-cran)

Run the full check. This is slow (minutes) — background-launch and stream with the Monitor tool rather than blocking:

bash
Rscript -e 'devtools::check("[pkg]", args = "--as-cran")'
# or: R CMD build [pkg] && R CMD check --as-cran [pkg]_*.tar.gz

Then triage every result into a table:

ResultTierCRAN-policy meaningAction
…ERROR / WARNING / NOTE…fix / justify
  • ERROR / WARNING → must fix before submission.
  • NOTE → fix if cheap; otherwise write the justification you'd put in cran-comments.md (e.g., "New submission", "Found the following (possibly) invalid URLs … the URL is correct and reachable").
Phase 4: Coverage (optional)
bash
Rscript -e 'covr::package_coverage("[pkg]")'

Report per-function coverage; flag exported functions with 0% coverage.

Phase 5: Source Review
Delegate to the r-package-reviewer agent:
"Review the package source at [pkg]"

The agent is read-only and returns its report; save it to quality_reports/[pkg]_package_review.md. Address Critical (CRAN-policy violations) and High (check WARNINGs) findings.

Phase 6: Release Gate + Report

Save a report to quality_reports/[package]_package_check.md and present a verdict:

markdown
## Release Gate — [package] [version]
- R CMD check --as-cran: E errors, W warnings, N notes
- Tests: P passed, F failed
- Coverage: X% of exported functions
- r-package-reviewer: C critical, H high
- **Verdict:** RELEASABLE / FIX-FIRST / POLICY-VIOLATION

### CRAN-submission checklist
[ ] 0 errors, 0 warnings; each note justified in cran-comments.md
[ ] Version bumped + NEWS.md updated
[ ] devtools::check_win_devel() / R-hub on other platforms (note: run separately)
[ ] Reverse-dependency check if this is an update (revdepcheck)

Show full SKILL.md (216 more words)Show less

Important

  • --as-cran or it doesn't count. A plain R CMD check misses the policy checks that actually gate submission.
  • Generated files are generated. If docs drift, the fix is devtools::document(), not editing .Rd.
  • The gate is 0/0/explained. 0 errors, 0 warnings, every remaining note justified — nothing less is "CRAN-ready."
  • This skill does not submit. Cross-platform checks (win-devel, R-hub) and the actual devtools::release() are the maintainer's call.

Long-running checks: use the Monitor tool

R CMD check --as-cran and covr can run for several minutes. Don't block on them, and don't poll with sleep: start the Monitor tool with a command that runs the check itself, tees the full output to a log, and prints only the lines you would act on, e.g. Rscript -e 'devtools::check("[pkg]", args = "--as-cran")' 2>&1 | tee quality_reports/r-package-check.log | grep --line-buffered -E 'ERROR|WARNING|NOTE|Status:|[Ee]rror'. The watch ends when the check exits; set timeout_ms above the default 5 minutes (max 3600000). The filter must match failure as well as success, because silence looks the same as "still running". If you only need one notice when the check finishes, run it with Bash run_in_background: true instead and read the log when the job reports its exit. Monitor has no job-id parameter, so it cannot attach to a job already running in the background; see data-analysis/SKILL.md for the log-and-tail variant.

© pedrohcgs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/r-package-check of pedrohcgs/claude-code-my-workflow.

Open the folder on GitHubat commit ae72617

Compare with similar skills

R Package Check next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

R Package Check compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
R Package Check this skillpedrohcgs/claude-code-my-workflow1.7k—~1.6kAutomated safety check: NotesMIT
Emcaklofas/kicad-happy1.4k1 repos~2.8kAutomated safety check: PassMIT
Swig Testswig/swig6.3k—~2.3kAutomated safety check: PassCustom licence
Generate Test Cases342164796/generate-test-cases1201 repos~2.9kAutomated safety check: PassNone
Wioworkersio/skills204—~5.8kAutomated safety check: PassMIT
Verify Cc Safety Netkenryu42/cc-safety-net1.6k—~2kAutomated safety check: PassMIT

Similar skills

  • Emc

    aklofas/kicad-happy

    EMC pre-compliance risk analysis for KiCad PCB designs — 18 check categories, 44 rule IDs covering ground planes, decoupling, I/O filtering, switching harmonics, clock routing, differential pair…

    1.4k GitHub starsUsed in 1 repo~2.8k tokens
    Testing & QAAuto-check passed
  • Swig Test

    swig/swig

    Run SWIG test suite for specific languages. An agent skill from swig/swig.

    6.3k GitHub stars~2.3k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Generate Test Cases

    342164796/generate-test-cases

    自主学习型测试文档生成器。从需求文档(Markdown)生成测试用例 XMind 文件,支持持久化记忆和持续学习。当用户提到"生成测试用例"、"根据需求生成测试"时触发。

    120 GitHub starsUsed in 1 repo~2.9k tokens
    Testing & QAAuto-check passed
  • Wio

    workersio/skills

    Testing workflow skill for finding high-value test candidates, writing focused tests, generating realistic workloads, reviewing test value, and diagnosing test-suite health.

    204 GitHub stars~5.8k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • Verify Cc Safety Net

    kenryu42/cc-safety-net

    Launch and drive the real cc-safety-net CLI — the hook decision path, explain, status/doctor, logs, and the local policy GUI — against an isolated home, capturing evidence.

    1.6k GitHub stars~2k tokensUpdated today
    Testing & QAAuto-check passed
  • File Server

    microsoft/WindowsProtocolTestSuites

    Official

    ALWAYS LOAD THIS SKILL when working with FileServer, SMB, SMB2, SMB3, CIFS, file sharing, MS-SMB2, MS-FSCC, MS-FSA, MS-DFSC, MS-FSRVP, MS-RSVD, MS-SQOS, or any file server protocol test…

    567 GitHub stars~4.1k tokensUpdated 25 days ago
    Testing & QAAuto-check passed

More from pedrohcgs/claude-code-my-workflow

All 59 skills in this repo
  • Devils Advocate

    pedrohcgs/claude-code-my-workflow

    Adversarial 5-7 question challenge to a deck's pedagogical choices — ordering, prerequisites, cognitive load, motivation.

    1.7k GitHub starsUsed in 2 repos~641 tokens
    Auto-check passed
  • Vaccinate

    pedrohcgs/claude-code-my-workflow

    Qualify a check before it is allowed to clear anything — prove it can detect the failure it is meant to catch.

    1.7k GitHub stars~2.1k tokensUpdated 13 days ago
    Auto-check: notes
  • Compile Latex

    pedrohcgs/claude-code-my-workflow

    Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex).

    1.7k GitHub starsUsed in 1 repo~492 tokens
    Auto-check: notes
  • Context Status

    pedrohcgs/claude-code-my-workflow

    Show current context status and session health. An agent skill from pedrohcgs/claude-code-my-workflow.

    1.7k GitHub starsUsed in 1 repo~613 tokens
    Auto-check: notes
  • Capture Environment

    pedrohcgs/claude-code-my-workflow

    Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt /…

    1.7k GitHub stars~2.8k tokensUpdated 13 days ago
    Auto-check: notes
  • Checkpoint

    pedrohcgs/claude-code-my-workflow

    Save a structured state snapshot before stopping or handing off.

    1.7k GitHub stars~2.8k tokensUpdated 13 days ago
    Auto-check: notes

Categories

Questions about R Package Check

What does R Package Check do?

Run the full R package release gate — regenerate docs, run the test suite, run R CMD check --as-cran, and triage every ERROR / WARNING / NOTE against CRAN policy before a release or submission. R Package Check is an agent skill from pedrohcgs/claude-code-my-workflow. Run the full R package release gate — regenerate docs, run the test suite, run R CMD check --as-cran, and triage every ERROR / WARNING / NOTE against CRAN policy before a release or submission.

When should I use R Package Check?

R Package Check fits situations like: the user says check my R package; is this package CRAN-ready; run devtools::check; prepare for CRAN submission.

How do I install R Package Check in Claude Code?

Run `npx skills add pedrohcgs/claude-code-my-workflow --skill r-package-check -a claude-code`. Or copy the skill folder (.claude/skills/r-package-check in pedrohcgs/claude-code-my-workflow) into .claude/skills/r-package-check in your project. Claude Code loads it when a task matches its description.

How do I install R Package Check in Codex?

Run `npx skills add pedrohcgs/claude-code-my-workflow --skill r-package-check -a codex`. Or copy the skill folder (.claude/skills/r-package-check in pedrohcgs/claude-code-my-workflow) into .agents/skills/r-package-check in your project. Codex loads it when a task matches its description.

Can I use R Package Check in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pedrohcgs/claude-code-my-workflow --skill r-package-check -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/r-package-check, .gemini/skills/r-package-check, .github/skills/r-package-check and .opencode/skills/r-package-check in your project.

What does R Package Check need to run?

Going by SKILL.md and its folder, R Package Check needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Read, Grep, Glob, Bash, Agent, Task, Monitor.

Does R Package Check access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is R Package Check safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does R Package Check use?

R Package Check is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does R Package Check use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to R Package Check?

Skills that share tags, products or a category with R Package Check: Emc (aklofas/kicad-happy, 1.4k stars), Swig Test (swig/swig, 6.3k stars), Generate Test Cases (342164796/generate-test-cases, 120 stars) and Wio (workersio/skills, 204 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains R Package Check?

pedrohcgs (a GitHub user) maintains it in pedrohcgs/claude-code-my-workflow, which has 1,655 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on September 27, 2026.

Source: pedrohcgs/claude-code-my-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.