用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Morrison-Lab/ai-config --skill r-pkg-check命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | r-pkg-check |
| description | Run devtools::check() and triage. |
| user-invocable | true |
| allowed-tools | ["Read","Edit","Write","Bash"] |
Runs a full package check — the superset check that unit tests alone don't cover — and triages every NOTE, WARNING, and ERROR it reports before a release or CRAN submission.
Why this exists: devtools::test() only runs unit tests; it says
nothing about documentation completeness, example runnability, DESCRIPTION
metadata, or the CRAN-policy checks that R CMD check applies. A package
whose tests pass can still fail R CMD check on an undocumented argument, a
broken \dontrun{} example, or a non-portable file name — issues that only
surface by running the full check.
Before a release, before a CRAN submission, or whenever asked to check a
package end to end — not during ordinary iteration (use test for that).
Confirm this is an R package. Check that DESCRIPTION exists at the
repo root. If not, skip — this skill doesn't apply.
Run the same check CI runs:
Rscript -e 'devtools::check()'
Check this repo's own .github/workflows/ for an R CMD check-style
job first — if one pins specific flags (e.g. --as-cran,
--no-manual), run that exact invocation instead so local results match
CI. Absent such a workflow, devtools::check() is the default; add
args = "--as-cran" when preparing a CRAN submission specifically (see
r-pkg-cran-checklist).
devtools isn't installed:
Rscript -e 'install.packages("devtools")' then retry. If R isn't
available at all, fall back to step 5.Triage each NOTE, WARNING, and ERROR:
cran-comments.md entry (see r-pkg-cran-checklist) rather than
silently ignoring it.Re-run step 2 to confirm a clean check (0 errors, 0 warnings, and every remaining NOTE accounted for) before pushing or submitting.
If R isn't available, manually review the diff for the shapes
R CMD check usually flags: new exported functions without @param/
@return docs, examples that call network or interactive code without
\dontrun{}/\donttest{}, and new dependencies missing from
DESCRIPTION's Imports/Suggests.
test runs devtools::test() — unit tests only, for
ordinary iteration. This skill is the superset full check (docs,
examples, CRAN-policy NOTEs) to run before a release.r-pkg-spellcheck spellchecks
documentation and NEWS.md text — a narrower, faster check this skill
doesn't replace (spelling isn't part of R CMD check's own coverage).r-pkg-cran-checklist is the larger
submission checklist this skill's clean check is one step of.