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.
npx skills add pjt222/agent-almanac --skill add-rcpp-integrationgit clone --depth 1 https://github.com/pjt222/agent-almanacWrote 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.
[](https://agentmods.dev/skills/pjt222/agent-almanac/add-rcpp-integration)<a href="https://agentmods.dev/skills/pjt222/agent-almanac/add-rcpp-integration"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/add-rcpp-integration/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.
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/add-rcpp-integration"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/add-rcpp-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Tool Misuse · line 170 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Anti-Refusal · line 195 Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00093 | $0.01843 |
| Opus 5.5 | $0.00037 | $0.00737 |
| Sonnet 5.5 | $0.00019 | $0.00369 |
| Haiku 4.5 | $0.00009 | $0.00184 |
Grade B, and why
add-rcpp-integration scanned grade B with 1 finding 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 2mo 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.
Strips warnings and disclaimersmediumAnti-refusal
Omitting safety caveats hides risk from the user and is a common jailbreak preamble.
- [ ] `devtools::load_all()` compiles without warnings How it starts
The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add Rcpp Integration
Integrate C++ code into an R package using Rcpp for performance-critical operations.
When to Use
- R function is too slow and profiling confirms a bottleneck
- Need to interface with existing C/C++ libraries
- Implementing algorithms that benefit from compiled code (loops, recursion)
- Adding RcppArmadillo for linear algebra operations
Inputs
- Required: Existing R package
- Required: R function to replace or augment with C++
- Optional: External C++ library to interface with
- Optional: Whether to use RcppArmadillo (default: plain Rcpp)
Procedure
Step 1: Set Up Rcpp Infrastructure
usethis::use_rcpp()
This:
- Creates
src/directory - Adds
Rcppto LinkingTo and Imports in DESCRIPTION - Creates
R/packagename-package.Rwith@useDynLiband@importFrom Rcpp sourceCpp - Updates
.gitignorefor compiled files
For RcppArmadillo:
usethis::use_rcpp_armadillo()
Got: src/ directory created, DESCRIPTION updated with Rcpp in LinkingTo and Imports, and R/packagename-package.R contains @useDynLib directive.
If fail: If usethis::use_rcpp() fails, manually create src/, add LinkingTo: Rcpp and Imports: Rcpp to DESCRIPTION, and add #' @useDynLib packagename, .registration = TRUE and #' @importFrom Rcpp sourceCpp to the package-level documentation file.
Step 2: Write C++ Function
Create src/my_function.cpp:
#include <Rcpp.h>
using namespace Rcpp;
//' Compute cumulative sum efficiently
//'
//' @param x A numeric vector
//' @return A numeric vector of cumulative sums
//' @export
// [[Rcpp::export]]
NumericVector cumsum_cpp(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;
}
For RcppArmadillo:
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]
//' Matrix multiplication using Armadillo
//'
//' @param A A numeric matrix
//' @param B A numeric matrix
//' @return The matrix product A * B
//' @export
// [[Rcpp::export]]
arma::mat mat_mult(const arma::mat& A, const arma::mat& B) {
return A * B;
}
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.
- 2mo ago First seen · 217 lines · 93 tokens per session scan B 3995a65796f4
add-rcpp-integration is a skill published in the GitHub repository pjt222/agent-almanac (43 stars, last pushed yesterday), licensed MIT. It adds 93 tokens to every session and 1,843 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
add-rcpp-integration compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| add-rcpp-integrationpjt222/agent-almanac | Skill | 43 | yesterday | MIT | B | 93 | Claude Code |
| loom-cppcosmix/loom | Skill | 65 | 5d ago | MIT | A | 16 | Claude Code, Codex |
| loom-ccosmix/loom | Skill | 65 | 5d ago | MIT | A | 25 | Claude Code, Codex |
| coding-guidance-qtn-n-code/n-n-code-skills | Skill | 4 | 5d ago | MIT | A | 67 | Claude Code, Codex |
| coding-guidance-cppn-n-code/n-n-code-skills | Skill | 4 | 5d ago | MIT | A | 72 | Claude Code, Codex |
| zephyr-jsonksachdeva/zephyr-rtos-ai | Skill | 23 | 4mo ago | Apache-2.0 | A | 68 | Claude Code, Codex |
| gdbbetab0t/skills | Skill | 48 | 5mo ago | MIT | B | 50 | Claude Code, Codex |