スキル一覧に戻る

submit-to-cran

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

について

このClaude Skillは、CRANへのRパッケージ提出に関する完全なワークフローを自動化します。事前提出チェックや必須ファイル`cran-comments.md`の準備を含みます。初回リリース、既存パッケージの更新、審査員フィードバック後の再提出に対応します。開発者は、自身のパッケージがローカルチェックでエラーや警告ゼロを達成し、バージョン番号が更新されている場合に使用すべきです。

クイックインストール

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

Full CRAN sub workflow: pre-flight checks → submission.

Use When

  • Pkg ready for initial CRAN release
  • Sub updated ver of existing CRAN pkg
  • Re-sub after CRAN reviewer feedback

In

  • Required: R pkg passing local R CMD check w/ 0 err + 0 warn
  • Required: Updated ver # in DESCRIPTION
  • Required: Updated NEWS.md w/ ver changes
  • Optional: Prev CRAN reviewer comments (re-subs)

Do

Step 1: Ver + NEWS Check

Verify DESCRIPTION ver:

desc::desc_get_version()

Verify NEWS.md has entry. Summarize user-facing changes.

Got: Ver follows semver. NEWS.md has matching entry.

If err: Update ver usethis::use_version() (major/minor/patch). Add NEWS.md entry.

Step 2: Local R CMD Check

devtools::check()

Got: 0 err, 0 warn, 0 notes (1 note OK new sub: "New submission").

If err: Fix all err+warn before. Read log <pkg>.Rcheck/00check.log. Notes → explain in cran-comments.md.

Step 3: Spell Check

devtools::spell_check()

Add legit words → inst/WORDLIST (one per line, sorted).

Got: No unexpected misspellings. All flagged corrected | added.

If err: Fix genuine misspellings. Tech terms → inst/WORDLIST sorted.

Step 4: URL Check

urlchecker::url_check()

Got: All URLs HTTP 200. No broken/redirected.

If err: Replace broken. \doi{} for DOI links not raw URLs. Remove dead links.

Step 5: Win-Builder

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

Wait email (~15-30 min).

Got: 0 err + 0 warn on both release + devel. Email in 15-30 min.

If err: Address platform-specific. Common: diff compiler warns, missing sys deps, path sep diffs. Fix local + re-sub.

Step 6: R-hub Check

rhub::rhub_check()

Multi-platform (Ubuntu, Windows, macOS).

Got: All platforms pass 0 err + 0 warn.

If err: Specific platform fails → check R-hub log. Use testthat::skip_on_os() | conditional code for platform-dep behavior.

Step 7: Prep cran-comments.md

Create | update in pkg 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 prev reviewer feedback
  • Reverse dep check results if applicable

Got: Accurate summary across all envs, explains notes.

If err: Results differ across platforms → doc all variations. CRAN reviewers check vs own tests.

Step 8: Final Pre-flight

# One last check
devtools::check()

# Verify the built tarball
devtools::build()

Got: Final check passes clean. .tar.gz built in parent dir.

If err: Last-min issue → fix + re-run all from Step 2. Don't sub w/ known fails.

Step 9: Submit

devtools::release()

Interactive checks + sub. Answer honest.

Alt: manual at https://cran.r-project.org/submit.html, upload tarball.

Got: Confirmation email from CRAN in min. Click link → finalize.

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

Step 10: Post-Submission

Post-acceptance:

# Tag the release
usethis::use_github_release()

# Bump to development version
usethis::use_dev_version()

Got: GitHub release created w/ accepted ver tag. DESCRIPTION bumped to dev (x.y.z.9000).

If err: GH release fails → manual gh release create. CRAN acceptance delayed → wait email before tag.

Check

  • R CMD check 0 err + 0 warn local
  • Win-builder passes (release + devel)
  • R-hub passes all platforms
  • cran-comments.md accurate
  • All URLs valid
  • No spelling errors
  • Ver # correct + incremented
  • NEWS.md current
  • DESCRIPTION metadata complete + accurate

Traps

  • Examples too slow: Wrap expensive in \donttest{}. CRAN enforces time limits.
  • Non-std file/dir names: Avoid files triggering CRAN notes (check .Rbuildignore)
  • Missing \value in docs: All exported fns need @return tag
  • Vignette build fails: Vignettes must build in clean env w/o your .Renviron
  • DESCRIPTION Title: Title Case, no period at end, no "A Package for..."
  • Forget rev dep 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()

  • release-package-version — ver bumping + git tagging
  • write-roxygen-docs — docs meet CRAN standards
  • setup-github-actions-ci — CI mirroring CRAN expectations
  • build-pkgdown-site — docs site for accepted pkgs

GitHub リポジトリ

pjt222/agent-almanac
パス: i18n/caveman-ultra/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を選択してください。

スキルを見る