cpp11

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

An interface that lets R programs use C++11 code, a modern version of the C++ language. It supports passing common data types such as vectors and lists between the two languages.

In plain words
What is it for?
Use it to write C++ functions, compile them from R, and return numeric, text, logical, or list data.
Why use it?
It reduces the work needed to connect R code with compiled C++ functions.

Skill for Claude CodeCodex

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

Good fit Use it to write C++ functions, compile them from R, and return numeric, text, logical, or list data.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/cpp11"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/cpp11.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 775 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.00022 $0.00775
Opus 5 $0.00011 $0.00387
Sonnet 5 $0.00004 $0.00155
Haiku 4.5 $0.00002 $0.00077

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

Security

Grade A, and why

cpp11 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-language-api/cpp11/SKILL.md · 152 lines

How it starts

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

cpp11

A header-only C++11 interface for R.

Basic Function

// myfile.cpp
#include "cpp11.hpp"
using namespace cpp11;

[[cpp11::register]]
double sum_cpp(doubles x) {
  double total = 0;
  for (double val : x) {
    total += val;
  }
  return total;
}
cpp11::cpp_source("myfile.cpp")
sum_cpp(1:10)

Vector Types

// Read-only vectors
doubles x;      // NumericVector
integers i;     // IntegerVector
strings s;      // CharacterVector
logicals l;     // LogicalVector
raws r;         // RawVector
list lst;       // List

// Writable vectors
writable::doubles x;
writable::integers i;
writable::strings s;
writable::logicals l;

Creating Vectors

[[cpp11::register]]
doubles create_vec() {
  writable::doubles x(10);
  for (int i = 0; i < 10; i++) {
    x[i] = i * 2.0;
  }
  return x;
}

Named Vectors

[[cpp11::register]]
doubles named_vec() {
  using namespace cpp11::literals;
  writable::doubles x({"a"_nm = 1.0, "b"_nm = 2.0});
  return x;
}

Lists

[[cpp11::register]]
list return_list(doubles x) {
  using namespace cpp11::literals;
  writable::list result;
  result.push_back({"mean"_nm = mean(x)});
  result.push_back({"data"_nm = x});
  return result;
}

Data Frames

[[cpp11::register]]
data_frame create_df() {
  using namespace cpp11::literals;
  writable::doubles x = {1.0, 2.0, 3.0};
  writable::strings y = {"a", "b", "c"};
  return writable::data_frame({
    "x"_nm = x,
    "y"_nm = y
  });
}

Matrices

[[cpp11::register]]
doubles_matrix<> mat_ops(doubles_matrix<> m) {
  int nrow = m.nrow();
  int ncol = m.ncol();

  writable::doubles_matrix<> result(nrow, ncol);
  for (int i = 0; i < nrow; i++) {
    for (int j = 0; j < ncol; j++) {
      result(i, j) = m(i, j) * 2;
    }
  }
  return result;
}

Attributes

[[cpp11::register]]
doubles with_attrs(doubles x) {
  writable::doubles y(x);
  y.attr("class") = "myclass";
  return y;
}

Package Integration

Read the full file on GitHub · 152 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. 8d ago First seen · 152 lines · 22 tokens per session scan A 038346e70520

Subscribe to this mod's changes

cpp11 is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 22 tokens to every session and 775 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

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

fused-overview

Orientation to what Fused is and when to use it. Use when deciding whether to use Fused for a task, planning a new Fused project, or understanding Fused's capabilities as a remote Python execution platform.

fusedio/skills · 49 tokens

wp-php-architecture

WordPress PHP architecture patterns — repository, service layer, DDD, SOLID, plugin/theme structure, CPT design, and anti-patterns. The definitive reference for professional WordPress PHP development.

xonack/wp-php-architecture-claude-skill · 45 tokens

python-bio-classes

Build Python classes for Gene/DNA/RNA/Protein records with eq/lt/hash, @property validation, ABCs, and @classmethod parsers (fromfastastring). Use when modeling genes/FASTA/GFF as objects or asked about Python OOP, inheritance, dataclasses.

Pavel-Kravchenko/Bioinformatics · 69 tokens