npx skills add ...
npx skills add posit-dev/skills --skill r-cran-status
Look up an R package's live status on cran.r-project.org - submission/review state (queue, human review, waiting, archived, past version's fate) or R CMD check results (OK/NOTE/WARN/ERROR per platform). Use for "what's the CRAN status of X", "did X get accepted/rejected", "is X passing CRAN checks", "when was version Y archived".
npx skills add posit-dev/skills --skill r-cran-status
Check a package's submission/review state, a specific historical version's
fate (e.g. {package} {version}, as in btw v1.4.0), or its current
R CMD check results across CRAN's test platforms.
"CRAN status" is ambiguous between two questions:
R CMD check on all
platforms, or does it have WARN/ERROR/NOTE flags risking removal? See
"Check Results".CRAN's servers are a shared, unpaid resource. Never issue requests in
parallel or in a tight loop — pause briefly (e.g. sleep 1) between
requests, stop looping as soon as a match is found, and avoid re-fetching a
page you've already checked in this session.
btw v1.4.0 or btw 1.4.0); strip any leading v.R CMD check, WARN/ERROR/NOTE, or
platforms/flavors → Check Results.PACKAGES, in which case continue to step 3.incoming/ stage folders (see below).Listed in typical pipeline order — a package usually moves top to bottom, though not every package passes through every stage:
inspect / newbies: awaiting initial manual inspection (newbies is for
first-time submitters)pending: awaiting closer reviewhuman/<initials>: assigned to a CRAN reviewerpretest: automated checks (re)runningwaiting: CRAN is waiting for a maintainer response (loops back to
pretest once the maintainer responds)recheck: reverse-dependency checkspublish: approved and awaiting publicationarchive: rejectedReplace {package} with the actual package name. Start at the last-known
stage if one exists (see Submission Status step 3), else at inspect:
Reviewer-initials folders (e.g. human/KH) change as CRAN's team changes,
so discover them from the incoming/ listing instead of a fixed set: any
folder there that isn't one of the stage names above is a reviewer folder.
A printed Version: line is the current CRAN version. Remember it — needed
later to say whether a requested older version was "superseded by" it.
Superseded versions move out of src/contrib/ into a per-package archive
folder. This Archive is unrelated to the archive incoming/ stage above
(that means "rejected"; this means "an older version, since superseded").
A matching .tar.gz filename means that exact version was published and has
since been superseded.
PACKAGES: report as published, with current version.incoming/ or reviewer folder: report the folder name
and meaning from the stage list above.PACKAGES: report as the current release.PACKAGES), e.g. "available in
the archive, superseded by v1.5.0".incoming/ or reviewer
folder: report that stage, noting the requested version wasn't a past
release.CRAN publishes per-platform R CMD check results for every published
package at https://cran.r-project.org/web/checks/check_results_{package}.html.
WARN or ERROR results persisting more than ~2-4 weeks risk archival by CRAN.
Fetch and simplify the results table:
Prints one flavor: STATUS line per row, e.g.:
Status is OK, NOTE, WARN, or ERROR. For any non-OK flavor, full
failure output is further down the same page under "Check Details" — fetch
again without stripping tags and read the <pre>-formatted section after
the failing flavor's Version: / Check: / Result: lines.
A 404 means no CRAN check history — likely not currently published. Check submission status instead.
OK: report the package passes checks on all platforms.NOTE/WARN/ERROR: list affected flavors and status,
summarize failure reason(s) from "Check Details", and note that
persistent WARN/ERROR can lead to archival.reviewer_folders=$(
curl -Ls "https://cran.r-project.org/incoming/" |
grep -Eio '<a href="[^"]+/">' |
sed -E 's/<a href="([^"]+)\/">/\1/' |
grep -Ev '^(inspect|newbies|pending|pretest|publish|recheck|archive|waiting|special)$'
)
for stage in $reviewer_folders; do
curl -Ls "https://cran.r-project.org/incoming/$stage/" |
grep -Eio '[^"]*{package}[^"]*' &&
echo "Stage: human/$stage" && break
sleep 1
donecurl -Ls https://cran.r-project.org/src/contrib/PACKAGES |
awk -v pkg="{package}" '
$0 == "Package: " pkg { found=1 }
found && /^Version:/ { print; exit }
'curl -Ls "https://cran.r-project.org/src/contrib/Archive/{package}/" |
grep -Eio '[^"]*{package}_{version}\.tar\.gz[^"]*'curl -Ls "https://cran.r-project.org/web/checks/check_results_{package}.html" |
grep '<tr> <td>' |
sed -E 's/<[^>]+>/ /g' |
awk '{print $1": "$NF}'r-devel-linux-x86_64-debian-clang: OK
r-oldrel-windows-x86_64: ERROR