r-pub-pipeline
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.
What this skill does
# R Package Publication Pipeline
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.
## Strategy
The recommended publication order for R packages:
1. **CRAN** — Distribution, discoverability, installation via `install.packages()`
2. **JOSS** — Quick DOI, peer-reviewed citation, Crossref/Google Scholar indexing
3. **JSS** (optional) — High-prestige methods paper, Web of Science indexed (IF ~5)
Each stage builds on the previous. CRAN gives the package legitimacy. JOSS gives it a citable DOI. JSS gives the methodology academic weight.
## Workflow
### Phase 1: Assess Current State
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:
```bash
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:
```bash
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.
### Phase 2: CRAN Readiness
Invoke `/cran-audit` (the `cran-audit` skill) to evaluate CRAN readiness.
If the package is not CRAN-ready:
1. Present the gap report
2. Offer to fix automatable issues
3. Guide manual fixes
4. Re-audit after fixes
5. Walk through submission workflow when ready
If the package is already on CRAN, skip to Phase 3.
**Key CRAN submission steps** (when ready):
1. `usethis::use_version("minor")` — bump version
2. `devtools::check(args = "--as-cran")` — final check
3. Test on other platforms:
- `devtools::check_win_devel()` — Windows (win-builder)
- `rhub::check_for_cran()` — Multiple platforms via R-hub
4. `devtools::submit_cran()` — submit
5. Confirm via email link
6. After acceptance: `usethis::use_github_release()`, then `usethis::use_dev_version()`
**If CRAN rejects the submission**:
1. Read the reviewer's email carefully — they identify specific issues
2. Fix all identified issues (do not partially fix)
3. Re-run `devtools::check(args = "--as-cran")` to verify
4. Resubmit via `devtools::submit_cran()` — CRAN allows resubmission
5. In `cran-comments.md`, note what was fixed since the previous submission
6. Do not resubmit more than once per week unless requested by CRAN
### Phase 3: JOSS Readiness
Invoke `/joss-audit` (the `joss-audit` skill) to evaluate JOSS readiness.
Key prerequisites that are often missing:
- **Development history**: Need 6+ months of public git history
- **Contributing guidelines**: `CONTRIBUTING.md` or section in README
- **paper.md**: The JOSS paper itself
If `paper.md` doesn't exist, proceed to Phase 4.
### Phase 4: Draft JOSS Paper
Invoke `/joss-draft` (the `joss-draft` skill) to draft `paper.md` and `paper.bib`.
After drafting:
1. Present the draft to the user for review
2. Iterate on feedback
3. Optionally run the `pub-pipeline:joss-reviewer` agent (via `/joss-audit`) for critical review against the JOSS checklist
4. Commit the paper to the repository
### Phase 5: JOSS Submission
Walk the user through JOSS submission:
1. **Pre-submission checklist**:
- Package on CRAN (or at minimum, installable from GitHub)
- `paper.md` and `paper.bib` committed to repository
- All JOSS reviewer checklist items pass (`/joss-audit`)
- ORCID for all authors
2. **Submit**:
- Go to https://joss.theoj.org/papers/new
- Fill in repository URL and other fields
- Wait for pre-review issue
3. **During review** (2-6 weeks):
- Respond to reviewer feedback promptly (target 2 weeks)
- Make requested changes to code and paper
- Re-run `/joss-audit` after changes
4. **Post-acceptance**:
- Create tagged release (e.g., `v1.0.0`)
- Deposit on Zenodo:
1. Go to https://zenodo.org and log in with GitHub
2. Enable the Zenodo-GitHub integration for this repository (Settings → GitHub)
3. Create a GitHub release (this triggers automatic Zenodo archiving)
4. Copy the Zenodo DOI from the automatically created deposit
- Update review issue with version number and Zenodo DOI
- JOSS assigns paper DOI via Crossref
### Phase 6: JSS Consideration (Optional)
Evaluate whether a JSS (Journal of Statistical Software) paper is warranted:
**JSS is appropriate when**:
- The package implements novel statistical methodology
- There's substantive mathematical content to present (proofs, derivations)
- The paper would be 20-50 pages of methods + software description
- The target audience is academic statisticians
**JSS is NOT appropriate when**:
- The package is primarily a software tool (JOSS covers this)
- The mathematics is textbook material
- The paper would essentially repeat the JOSS paper at greater length
If JSS is appropriate, note that:
- JSS uses `rticles::jss_article` RMarkdown format
- JSS papers are 20-50 pages and include mathematical exposition
- JSS is indexed in Web of Science (Impact Factor ~5)
- Review takes 6-18 months
- The `papermill:writer` agent can help draft a full JSS paper (long-form academic writing)
## Decision Helpers
### Is My Package Publishable?
| 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 |
### Timeline Expectations
| 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 |
## Reference Files
- **`${CLAUDE_PLUGIN_ROOT}/docs/cran-reference.md`** — CRAN Repository Policy, submission workflow, common rejections
- **`${CLAUDE_PLUGIN_ROOT}/docs/Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.