RcppParallel

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

An R package for running C++ calculations across multiple CPU threads using Intel TBB, a library for parallel work.

In plain words
What is it for?
Use it to create parallel loops and reductions in C++ functions called from R.
Why use it?
It reduces the time needed for independent calculations over large vectors or datasets.

Skill for Claude CodeCodex

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

Good fit Use it to create parallel loops and reductions in C++ functions called from R.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/rcppparallel
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 rcppparallel
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 RcppParallel

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/rcppparallel/github.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/rcppparallel)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/rcppparallel"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/rcppparallel/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 RcppParallel

Your own site · 80×15
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/rcppparallel"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/rcppparallel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 634 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.00026 $0.00634
Opus 5 $0.00013 $0.00317
Sonnet 5 $0.00005 $0.00127
Haiku 4.5 $0.00003 $0.00063

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

Security

Grade A, and why

RcppParallel 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 7d 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/RcppParallel/SKILL.md · 109 lines

How it starts

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

RcppParallel Package

Parallel programming with Rcpp using Intel TBB.

Setup

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

Parallel For

struct SquareWorker : public Worker {
  const RVector<double> input;
  RVector<double> output;

  SquareWorker(const NumericVector input, NumericVector output)
    : input(input), output(output) {}

  void operator()(std::size_t begin, std::size_t end) {
    for (std::size_t i = begin; i < end; i++) {
      output[i] = input[i] * input[i];
    }
  }
};

// [[Rcpp::export]]
NumericVector parallelSquare(NumericVector x) {
  NumericVector output(x.size());
  SquareWorker worker(x, output);
  parallelFor(0, x.size(), worker);
  return output;
}

Parallel Reduce

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) {
    for (std::size_t i = begin; i < end; i++) {
      value += input[i];
    }
  }

  void join(const SumWorker& rhs) {
    value += rhs.value;
  }
};

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

Thread Count

# Set threads
RcppParallel::setThreadOptions(numThreads = 4)

# Get default
RcppParallel::defaultNumThreads()

Matrix Operations

struct MatrixMultWorker : public Worker {
  const RMatrix<double> A;
  const RMatrix<double> B;
  RMatrix<double> C;

  MatrixMultWorker(const NumericMatrix A, const NumericMatrix B, NumericMatrix C)
    : A(A), B(B), C(C) {}

  void operator()(std::size_t begin, std::size_t end) {
    for (std::size_t i = begin; i < end; i++) {
      for (std::size_t j = 0; j < B.ncol(); j++) {
        double sum = 0;
        for (std::size_t k = 0; k < A.ncol(); k++) {
          sum += A(i, k) * B(k, j);
        }
        C(i, j) = sum;
      }
    }
  }
};

Read the full file on GitHub · 109 lines

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. 7d ago First seen · 109 lines · 26 tokens per session scan A 0a38586d2f86

Subscribe to this mod's changes

RcppParallel is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 26 tokens to every session and 634 once invoked, about $0.0001 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

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

bun-ffi

This skill should be used when the user asks about "bun:ffi", "foreign function interface", "calling C from Bun", "native libraries", "dlopen", "shared libraries", "calling native code", or integrating C/C++ libraries with Bun.

secondsky/claude-skills · 56 tokens

agentic-delegation

Delegate exploration sweeps to Haiku subagents and bulk writing to Sonnet subagents while the orchestrator keeps architecture, security-sensitive edits, and commits; use at the start of any multi-step task in this repo to minimize token spend by delegating to cheaper models.

VincentChuWaiChow/vanguard-frontier-agentic · 60 tokens

aws-non-destructive-task-automation-advisor

Design AWS non-destructive task automation using EventBridge, Step Functions, Lambda, Systems Manager Automation, SNS, SQS, approvals, notifications, reporting, and evidence gathering. Use only for read-only or coordination-safe automation; do not use for destructive remediation or mutation-heavy runbooks.

VincentChuWaiChow/vanguard-frontier-agentic · 68 tokens

data-analysis

Structured data analysis workflow from raw data to shareable insights.

furkangonel/cowrangler · 15 tokens

cpp-mentor

A general, self-adapting C++ mentor for any project. On first run with an empty profile it onboards: settles the goal and domain, derives a namespace from the goal, agrees conventions including the project's own error policy, and audits the developer's level in both C++ and the project's topic — with questions…

sectapunterx/cpp-mentor · 249 tokens