pub-pipeline/skills/r-pub-pipeline/SKILL.md
Orchestrate the full R publication pipeline: CRAN submission for distribution, JOSS paper for DOI and peer review, optionally a JSS methods paper. Coordinates audits, drafting, and review cycles.
npx skillsauth add queelius/claude-anvil r-pub-pipelineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Orchestrate the full publication pipeline for R packages: CRAN submission → JOSS paper → optionally JSS methods paper. This skill coordinates the other skills (/cran-audit, /joss-audit, /joss-draft) into a coherent workflow.
The recommended publication order for R packages:
install.packages()Each stage builds on the previous. CRAN gives the package legitimacy. JOSS gives it a citable DOI. JSS gives the methodology academic weight.
Start by understanding where the package stands:
Load user config (Read tool): Read .claude/pub-pipeline.local.md if it exists. Extract author metadata, r.domain, r.audience, r.competitors, r.targets (e.g., ["CRAN", "JOSS"]), and related_work from the YAML frontmatter. If related_work contains companion papers or preprints, note them, since they affect the JOSS paper (cite companion papers, reference preprint DOIs) and the overall publication strategy.
1. Read DESCRIPTION for package metadata (Read tool)
2. Check git log for development history (Bash tool)
3. Look for existing paper.md, CITATION.cff (Glob tool)
4. Check if already on CRAN — search https://cran.r-project.org/package={name} (WebFetch tool)
5. Check if already on JOSS — search joss.theoj.org (WebSearch tool)
Dependency chain (Bash tool):
Parse Imports, Depends, and LinkingTo from DESCRIPTION. For each non-base/non-recommended package, verify it exists on CRAN:
Rscript -e 'ap <- available.packages(); cat("PKG_NAME" %in% rownames(ap))'
If any dependency is not on CRAN, this is a hard blocker — the package cannot pass R CMD check --as-cran. Present the submission order (publish dependencies first) and offer to switch to the dependency package. Also check r.dependency_chain in the user config for structured dependency status.
CI status (Bash/Glob tools):
Check for .github/workflows/ directory (Glob tool). If present, check recent CI status:
gh run list --limit 3 --json conclusion,name,headBranch
Flag if CI is failing — passing CI is important for CRAN confidence and JOSS reviewer trust.
Classify the package into one of:
| State | Next Step | |-------|-----------| | Dependencies not on CRAN | Start with dependency package | | Not on CRAN, no paper.md | Start with CRAN audit | | On CRAN, no paper.md | Start with JOSS audit | | On CRAN, has paper.md | Review paper, prepare JOSS submission | | On CRAN, published in JOSS | Consider JSS (if substantive methodology) |
Note: If the package is bioinformatics-focused (genomics, proteomics, etc.), consider Bioconductor instead of CRAN. Bioconductor has its own submission process and is the standard distribution channel for bioinformatics R packages.
Present the assessment to the user and confirm the plan before proceeding.
Invoke /cran-audit (the cran-audit skill) to evaluate CRAN readiness.
If the package is not CRAN-ready:
If the package is already on CRAN, skip to Phase 3.
Key CRAN submission steps (when ready):
usethis::use_version("minor") — bump versiondevtools::check(args = "--as-cran") — final checkdevtools::check_win_devel() — Windows (win-builder)rhub::check_for_cran() — Multiple platforms via R-hubdevtools::submit_cran() — submitusethis::use_github_release(), then usethis::use_dev_version()If CRAN rejects the submission:
devtools::check(args = "--as-cran") to verifydevtools::submit_cran() — CRAN allows resubmissioncran-comments.md, note what was fixed since the previous submissionInvoke /joss-audit (the joss-audit skill) to evaluate JOSS readiness.
Key prerequisites that are often missing:
CONTRIBUTING.md or section in READMEIf paper.md doesn't exist, proceed to Phase 4.
Invoke /joss-draft (the joss-draft skill) to draft paper.md and paper.bib.
After drafting:
pub-pipeline:joss-reviewer agent (via /joss-audit) for critical review against the JOSS checklistWalk the user through JOSS submission:
Pre-submission checklist:
paper.md and paper.bib committed to repository/joss-audit)Submit:
During review (2-6 weeks):
/joss-audit after changesPost-acceptance:
v1.0.0)Evaluate whether a JSS (Journal of Statistical Software) paper is warranted:
JSS is appropriate when:
JSS is NOT appropriate when:
If JSS is appropriate, note that:
rticles::jss_article RMarkdown formatpapermill:writer agent can help draft a full JSS paper (long-form academic writing)| Criterion | Minimum for CRAN | Minimum for JOSS | |-----------|-----------------|-----------------| | License | OSI-approved | OSI-approved | | Tests | Pass R CMD check | Automated test suite | | Docs | Man pages for exports | README + examples + API docs | | History | Any | 6+ months public | | Users | Not required | Evidence of use encouraged | | Paper | Not required | 750-1750 word paper.md |
| Stage | Duration | |-------|----------| | CRAN prep + audit | 1-3 days | | CRAN review | 1-7 days (usually 1-2) | | JOSS prep + paper | 1-2 days | | JOSS review | 2-8 weeks | | JSS prep + paper | 2-4 weeks | | JSS review | 6-18 months |
${CLAUDE_PLUGIN_ROOT}/docs/cran-reference.md — CRAN Repository Policy, submission workflow, common rejections${CLAUDE_PLUGIN_ROOT}/docs/joss-reference.md — JOSS requirements, reviewer checklist, paper format${CLAUDE_PLUGIN_ROOT}/docs/joss-exemplars.md — Real JOSS R package papers with analysistools
This skill should be used when the user asks about research directions, open problems, future work, or follow-up research from the academic literature. Trigger phrases include "open problems in X", "what's next for Y", "future work for paper Z", "research directions on T", "salient follow-up research", "what should I work on next in", "find me follow-up research unrelated to my prior work", "broad survey of W", "neglected directions in V". Routes the request to the right Vista MCP tool, reads back the structured paper sections, and synthesizes research directions in the conversation.
testing
Discover latent themes in the metafunctor corpus. Use when the user wants to find implicit through-lines across their blog posts, surface recurring ideas they have not consciously framed as a series, or get candidate themes for a synthesis post. Reads titles, descriptions, and tags; proposes 3 themes that connect 4+ posts each, each with a single-sentence through-line. Output is a proposal, not a draft. Trigger phrases include "find themes in my posts", "what threads connect my writing", "latent themes in my corpus", "scribe".
development
Use when drafting prose sections for a bookwright (technical non-fiction) project. Encodes the Bernoulli-textbook workflow: atom-outward design, deferral discipline, running threads, page budgets, Path A subagent pattern, header comment block convention.
testing
Use when drafting or executing a paired notebook for a bookwright chapter. Covers when notebooks are required vs optional, numerical-sanity-target convention, exec-from-fresh-kernel requirement, and stack-specific execution commands (Jupyter/R Markdown/Quarto).