r-parallel-cpp

r-parallel-cpp is a skill for Claude Code, Codex from LeoLin990405/r-analytics-skill. It costs 31 tokens per session (732 once invoked), scanned A, original, MIT.

A toolkit for connecting R code to C++, including support for matrix calculations and parallel processing.

In plain words
What is it for?
Use it to write C++ functions callable from R, perform matrix operations, and build faster data-processing routines.
Why use it?
It helps speed up R programs when regular R code is too slow for heavy calculations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write C++ functions callable from R, perform matrix operations, and build faster data-processing routines.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/r-parallel-cpp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LeoLin990405/r-analytics-skill --skill r-parallel-cpp
Clone the repo
git clone --depth 1 https://github.com/LeoLin990405/r-analytics-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for r-parallel-cpp

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/r-parallel-cpp/github.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/r-parallel-cpp)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/r-parallel-cpp"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/r-parallel-cpp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for r-parallel-cpp

Your own site · 80×15
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/r-parallel-cpp"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/r-parallel-cpp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 732 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.00732
Opus 5 $0.00015 $0.00366
Sonnet 5 $0.00006 $0.00146
Haiku 4.5 $0.00003 $0.00073

Measured 8d ago against content hash 5d659a6908f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

r-parallel-cpp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sub-skills/r-parallel/r-parallel-cpp/SKILL.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

R High-Performance Computing

C++ integration.

Rcpp

library(Rcpp)

# Inline C++
cppFunction('
  double sumC(NumericVector x) {
    int n = x.size();
    double total = 0;
    for(int i = 0; i < n; ++i) {
      total += x[i];
    }
    return total;
  }
')

# Source file
sourceCpp("my_functions.cpp")

C++ File (.cpp)

#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
double sumC(NumericVector x) {
  int n = x.size();
  double total = 0;
  for(int i = 0; i < n; ++i) {
    total += x[i];
  }
  return total;
}

// [[Rcpp::export]]
NumericVector cumsumC(NumericVector x) {
  int n = x.size();
  NumericVector out(n);
  out[0] = x[0];
  for(int i = 1; i < n; ++i) {
    out[i] = out[i-1] + x[i];
  }
  return out;
}

// [[Rcpp::export]]
DataFrame createDF() {
  return DataFrame::create(
    Named("x") = NumericVector::create(1, 2, 3),
    Named("y") = CharacterVector::create("a", "b", "c")
  );
}

RcppArmadillo

// [[Rcpp::depends(RcppArmadillo)]]
#include <RcppArmadillo.h>

// [[Rcpp::export]]
arma::mat matmultC(arma::mat A, arma::mat B) {
  return A * B;
}

// [[Rcpp::export]]
arma::vec solveC(arma::mat A, arma::vec b) {
  return arma::solve(A, b);
}

// [[Rcpp::export]]
Rcpp::List eigenC(arma::mat X) {
  arma::vec eigval;
  arma::mat eigvec;
  arma::eig_sym(eigval, eigvec, X);
  return Rcpp::List::create(
    Rcpp::Named("values") = eigval,
    Rcpp::Named("vectors") = eigvec
  );
}

RcppParallel

// [[Rcpp::depends(RcppParallel)]]
#include <Rcpp.h>
#include <RcppParallel.h>
using namespace RcppParallel;

struct SumWorker : public Worker {
  const RVector<double> input;
  double value;
  
  SumWorker(const NumericVector input) : input(input), value(0) {}
  SumWorker(const SumWorker& sum, Split) : input(sum.input), value(0) {}
  
  void operator()(std::size_t begin, std::size_t end) {
    value += std::accumulate(input.begin() + begin, input.begin() + end, 0.0);
  }
  
  void join(const SumWorker& rhs) { value += rhs.value; }
};

// [[Rcpp::export]]
double parallelSum(NumericVector x) {
  SumWorker sum(x);
  parallelReduce(0, x.length(), sum);
  return sum.value;
}

Read the full file on GitHub · 124 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 124 lines · 31 tokens per session scan A 5d659a6908f7

Subscribe to this mod's changes

r-parallel-cpp is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 31 tokens to every session and 732 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

algo-hash-tables-bloom

Implement Python hash tables (chaining, open addressing, rehashing) and Bloom filters for set membership. Use when building a hash table from scratch, resolving hash collisions, sizing a Bloom filter, or checking k-mer/key set membership under memory limits.

Pavel-Kravchenko/Bioinformatics · 59 tokens

foundations-bash-scripting

Write robust Bash scripts to batch-process FASTQ/BAM/VCF/FASTA files: variables, set -euo pipefail error handling, loops over sample sheets, functions, traps, and awk/sed text processing. Use when automating a multi-sample pipeline, writing a shell wrapper around samtools/bcftools/fastqc/blast, validating CLI input…

Pavel-Kravchenko/Bioinformatics · 100 tokens

marimo-pair

Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.

marimo-team/marimo · 57 tokens

ax-cpp-ai

Use when writing C++ code with axllm for named deployment profiles, generic provider clients, model selection, OpenAI-compatible calls, Responses, Gemini, Anthropic, routers, and balancers.

ax-llm/ax · 47 tokens

ax-cpp-gen

Use when writing C++ code with axllm for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.

ax-llm/ax · 48 tokens

ax-cpp-llm

Use when writing C++ code with axllm for using the generated Ax package, factory functions, package docs, examples, and API reference.

ax-llm/ax · 38 tokens