スキル一覧に戻る

submit-to-cran

pjt222
更新日 2 days ago
5 閲覧
17
2
17
GitHubで表示
メタdesign

について

このスキルは、CRANへのRパッケージの提出を、初回リリースと更新の両方に対応して完全なワークフローで提供します。提出前のチェックを自動化し、必要な`cran-comments.md`ファイルを準備し、最終的な提出プロセスを案内します。パッケージがCRANリリースの準備が整った時、またはレビュアーのフィードバック後の再提出時にご利用ください。

クイックインストール

Claude Code

推奨
メイン
npx skills add pjt222/agent-almanac -a claude-code
プラグインコマンド代替
/plugin add https://github.com/pjt222/agent-almanac
Git クローン代替
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/submit-to-cran

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Submit to CRAN

Execute full CRAN submission workflow from pre-flight checks through submission.

When Use

  • Package ready for initial CRAN release
  • Submitting updated version of existing CRAN package
  • Re-submitting after CRAN reviewer feedback

Inputs

  • Required: R package passing local R CMD check with 0 errors and 0 warnings
  • Required: Updated version number in DESCRIPTION
  • Required: Updated NEWS.md with changes for this version
  • Optional: Previous CRAN reviewer comments (for re-submissions)

Steps

Step 1: Version and NEWS Check

Verify DESCRIPTION has correct version:

desc::desc_get_version()

Verify NEWS.md has entry for this version. Entry should summarize user-facing changes.

Got: Version follows semantic versioning. NEWS.md has matching entry for this version.

If fail: Update version with usethis::use_version() (choose "major", "minor", or "patch"). Add NEWS.md entry summarizing user-facing changes.

Step 2: Local R CMD Check

devtools::check()

Got: 0 errors, 0 warnings, 0 notes (1 note acceptable for new submissions: "New submission").

If fail: Fix all errors and warnings before proceeding. Read check log at <pkg>.Rcheck/00check.log for details. Notes should be explained in cran-comments.md.

Step 3: Spell Check

devtools::spell_check()

Add legitimate words to inst/WORDLIST (one word per line, sorted alphabetical).

Got: No unexpected misspellings. All flagged words either corrected or added to inst/WORDLIST.

If fail: Fix genuine misspellings. Legitimate technical terms? Add to inst/WORDLIST (one word per line, alphabetical sorted).

Step 4: URL Check

urlchecker::url_check()

Got: All URLs return HTTP 200. No broken or redirected links.

If fail: Replace broken URLs. Use \doi{} for DOI links instead of raw URLs. Remove links to resources no longer exist.

Step 5: Win-Builder Checks

devtools::check_win_devel()
devtools::check_win_release()

Wait for email results (usual 15-30 minutes).

Got: 0 errors, 0 warnings on both Win-builder release and devel. Results arrive by email within 15-30 minutes.

If fail: Address platform-specific issues. Common causes: different compiler warnings, missing system dependencies, path separator differences. Fix local, re-submit to Win-builder.

Step 6: R-hub Check

rhub::rhub_check()

Checks on multiple platforms (Ubuntu, Windows, macOS).

Got: All platforms pass with 0 errors and 0 warnings.

If fail: Specific platform fails? Check R-hub build log for platform-specific errors. Use testthat::skip_on_os() or conditional code for platform-dependent behavior.

Step 7: Prepare cran-comments.md

Create or update cran-comments.md in package root:

## R CMD check results
0 errors | 0 warnings | 1 note

* This is a new release.

## Test environments
* local: Windows 11, R 4.5.0
* win-builder: R-release, R-devel
* R-hub: ubuntu-latest (R-release), windows-latest (R-release), macos-latest (R-release)

## Downstream dependencies
There are currently no downstream dependencies for this package.

Updates? Include:

  • What changed (brief)
  • Response to any previous reviewer feedback
  • Reverse dependency check results if applicable

Got: cran-comments.md accurately summarizes check results across all test environments and explains any notes.

If fail: Check results differ across platforms? Document all variations. CRAN reviewers will check these claims against own tests.

Step 8: Final Pre-flight

# One last check
devtools::check()

# Verify the built tarball
devtools::build()

Got: Final devtools::check() passes clean. .tar.gz tarball built in parent directory.

If fail: Last-minute issue appears? Fix, re-run all checks from Step 2. Never submit with known failures.

Step 9: Submit

devtools::release()

Runs interactive checks and submits. Answer all questions honest.

Alternatively, submit manual at https://cran.r-project.org/submit.html by uploading tarball.

Got: Confirmation email from CRAN arrives within minutes. Click confirmation link to finalize submission.

If fail: Check email for rejection reasons. Common issues: examples too slow, missing \value tags, non-portable code. Fix issues, re-submit, note in cran-comments.md what changed.

Step 10: Post-Submission

After acceptance:

# Tag the release
usethis::use_github_release()

# Bump to development version
usethis::use_dev_version()

Got: GitHub release created with accepted version tag. DESCRIPTION bumped to development version (x.y.z.9000).

If fail: GitHub release fails? Create manual with gh release create. CRAN acceptance delayed? Wait for confirmation email before tagging.

Checks

  • R CMD check returns 0 errors, 0 warnings on local machine
  • Win-builder passes (release + devel)
  • R-hub passes on all tested platforms
  • cran-comments.md accurate describes check results
  • All URLs valid
  • No spelling errors
  • Version number correct and incremented
  • NEWS.md current
  • DESCRIPTION metadata complete and accurate

Pitfalls

  • Examples too slow: Wrap expensive examples in \donttest{}. CRAN enforces time limits.
  • Non-standard file/dir names: Avoid files that trigger CRAN notes (check .Rbuildignore)
  • Missing \value in docs: All exported functions need @return tag
  • Vignette build failures: Ensure vignettes build in clean environment without your .Renviron
  • DESCRIPTION Title format: Must be Title Case, no period at end, no "A Package for..."
  • Forget reverse dependency checks: Updates? Run revdepcheck::revdep_check()

Examples

# Full pre-submission workflow
devtools::spell_check()
urlchecker::url_check()
devtools::check()
devtools::check_win_devel()
rhub::rhub_check()
# Wait for results...
devtools::release()

See Also

  • release-package-version - version bumping, git tagging
  • write-roxygen-docs - ensure documentation meets CRAN standards
  • setup-github-actions-ci - CI checks that mirror CRAN expectations
  • build-pkgdown-site - documentation site for accepted packages

GitHub リポジトリ

pjt222/agent-almanac
パス: i18n/caveman/skills/submit-to-cran
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

関連スキル

content-collections

メタ

このスキルは、Content Collections(Markdown/MDXファイルを型安全なデータコレクションに変換するTypeScriptファーストのツール)の本番環境でテストされた設定を提供します。Zodバリデーションによる型安全性を実現し、ブログ、ドキュメントサイト、コンテンツ重視のVite + Reactアプリケーション構築時にご利用ください。Viteプラグインの設定、MDXコンパイルから、デプロイ最適化、スキーマバリデーションまで、すべてを網羅しています。

スキルを見る

polymarket

メタ

このスキルは、開発者がPolymarket予測市場プラットフォームを活用したアプリケーション構築を可能にします。API統合による取引や市場データの取得に加え、WebSocketを介したリアルタイムデータストリーミングにより、ライブ取引や市場活動を監視できます。取引戦略の実装や、ライブ市場更新を処理するツールの作成にご利用ください。

スキルを見る

creating-opencode-plugins

メタ

このスキルは、開発者がコマンド、ファイル、LSP操作など25種類以上のイベントタイプにフックするOpenCodeプラグインを作成することを支援します。JavaScript/TypeScriptモジュール向けに、プラグイン構造、イベントAPI仕様、および実装パターンを提供します。カスタムイベント駆動ロジックでOpenCode AIアシスタントのライフサイクルをインターセプト、監視、または拡張する必要がある場合にご利用ください。

スキルを見る

sglang

メタ

SGLangは、高性能なLLMサービングフレームワークであり、RadixAttentionプレフィックスキャッシュを活用したJSON、正規表現、エージェントワークフロー向けの高速で構造化された生成を特長とします。特にプレフィックスが繰り返されるタスクにおいて、大幅に高速な推論を実現し、複雑な構造化出力やマルチターン対話に最適です。制約付きデコードが必要な場合や、広範なプレフィックス共有を伴うアプリケーションを構築する場合は、vLLMなどの代替案ではなくSGLangを選択してください。

スキルを見る