Agent skill

Smooth Cpp Shared

by openforecast-org in openforecast-org/smooth

Work on the C++ layer that the R package and the Python port share — the headers under src/headers/, the Rcpp bindings in src/, the pybind11 bindings in src/python/, and the two build systems that…

LGPL-2.1Auto-check passedData & Analytics

Install Smooth Cpp Shared

skills CLI
$ npx skills add openforecast-org/smooth --skill smooth-cpp-shared -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openforecast-org/smooth smooth-cpp-shared --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openforecast-org/smooth.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/smooth-cpp-shared .claude/skills/smooth-cpp-shared && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
smooth-cpp-shared
GitHub stars
107
Token cost
~1.1k tokens
SKILL.md length
477 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
LGPL-2.1

At a glance

Work on the C++ layer that the R package and the Python port share — the headers under src/headers/, the Rcpp bindings in src/, the pybind11 bindings in src/python/, and the two build systems that…

  • Debugging C++ in this repo
  • SKILL.md covers Layout, Building and Rules
  • Calls python and python3
  • A numeric result differs between the R and Python builds

What it does

Smooth Cpp Shared is an agent skill from openforecast-org/smooth. Work on the C++ layer that the R package and the Python port share — the headers under src/headers/, the Rcpp bindings in src/, the pybind11 bindings in src/python/, and the two build systems that compile them. Use when editing or debugging C++ in this repo, when a numeric result differs between the R and Python builds, when adding a new binding, or when a build/compilation step fails.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Forecasting and time series. It works with C++ and Python. The repository describes itself as: The set of functions used for time series analysis and in forecasting.

When your agent uses it

  • Debugging C++ in this repo
  • A numeric result differs between the R and Python builds
  • Adding a new binding
  • A build/compilation step fails

Example prompts

  • “/smooth-cpp-shared”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit aa89029. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Smooth Cpp Shared loads about 1.1k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 477 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from openforecast-org/smooth at commit aa89029, republished under its LGPL-2.1 licence (© openforecast-org). 477 words, ~1,092 tokens.

Download SKILL.mdSave it as .claude/skills/smooth-cpp-shared/SKILL.md (or your agent's skills folder).
name
smooth-cpp-shared
description
Work on the C++ layer that the R package and the Python port share — the headers under src/headers/, the Rcpp bindings in src/, the pybind11 bindings in src/python/, and the two build systems that compile them. Use when editing or debugging C++ in this repo, when a numeric result differs between the R and Python builds, when adding a new binding, or when a build/compilation step fails.

The shared C++ layer

R and Python compile the same algorithm sources and differ only in their bindings. That is what makes bit-for-bit parity achievable: an edit to a header changes both languages at once.

Layout

DirectoryWhat it holds
src/headers/The algorithms. Header-only, binding-agnostic, shared by both builds.
src/*.cppRcpp bindings, compiled into the R package.
src/python/*.cpppybind11 bindings, compiled into the Python package.
Headers

adamCore.h (fit / forecast / simulate — the core state-space recursion), adamGeneral.h, adamGradient.h (gradientSolve for initial="gradient"), hessianCore.h (finite-difference Hessian, the single source of truth for both languages' vcov), olsCore.h (pivoted QR with a scale-invariant rank cutoff, behind msdecompose's global smoother), matrixPowerCore.h, eigenCalc.h, ssGeneral.h, ssOccurrence.h.

ssGeneral.h is the one header with a #ifdef PYTHON_BUILD branch; the rest compile identically for both.

Bindings
AlgorithmR (src/)Python (src/python/) → module
ADAM coreadamGeneral.cppadamPython.cpp → _adamCore
Eigenvalue boundseigenCalc.cppeigenCalc.cpp → _eigenCalc
FD HessianhessianCpp.cppnumDeriv.cpp → _numDeriv
OLS (pivoted QR)olsWrap.cppolsWrap.cpp → _ols
Matrix powermatrixPowerWrap.cppnot built — matrix_power_wrap in core/utils/var_covar.py is pure NumPy
State-space / occurrencessGeneral.cppnot bound

The Python modules land in smooth.adam_general (_adamCore, _eigenCalc, _numDeriv, _ols). src/python/matrixPowerWrap.cpp exists but has no pybind11_add_module entry in python/CMakeLists.txt.

Building

R — R CMD INSTALL . or devtools::load_all(). Rcpp + RcppArmadillo, flags from src/Makevars. devtools::load_all() recompiles what changed, which is what the Python r_parity tests drive through tests/_r_bridge.py.

Python — CMake + scikit-build-core + pybind11, with carma bridging NumPy and Armadillo. python/CMakeLists.txt declares one pybind11_add_module per binding, each compiled with PYTHON_BUILD defined and ../src on the include path. Rebuild with cd python && python3 -m pip install -e .; a pure-Python edit needs no rebuild.

Show full SKILL.md (223 more words)Show less

Rules

Matrices are Fortran (column-major) order. Armadillo requires it. Both binding layers convert at the boundary; get it wrong and you read transposed data with no error.

Never let the compiler contract floating-point operations. A fused multiply-add rounds once where the source asks for twice. That is one ULP, and in an iterative routine it compounds — a whole class of "works on Linux, fails on macOS" bugs, because every arm64 chip has an FMA instruction and baseline x86-64 does not. Do not add -ffast-math, -Ofast or -march=native to either build. If a numeric result differs between platforms and the algorithm is identical, test the hypothesis directly: rebuild on x86-64 with -mfma -ffp-contract=fast and see whether the difference reproduces.

Change the header, not one binding. Anything that alters numbers belongs in src/headers/ so both languages move together. A fix applied to only one side is a parity regression, even when it makes that side more correct.

Verify against R, not against intuition. After a header change, run the Python r_parity markers — they load the local R source via devtools::load_all(), so they compare the C++ you just edited:

bash
cd python && .venv/bin/python -m pytest tests/ -m "r_parity or r_comparison"

Baseline is 457 passed, 3 xfailed. Anything else is yours.

Read a difference correctly. Same kernel, same optimiser, same initialisation means a materially different optimum cannot be an optimiser artefact — see the smooth-translation skill for the diagnostic.

© openforecast-org, LGPL-2.1. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/smooth-cpp-shared of openforecast-org/smooth.

Open the folder on GitHubat commit aa89029

Compare with similar skills

Smooth Cpp Shared next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Smooth Cpp Shared compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Smooth Cpp Shared this skillopenforecast-org/smooth107—~1.1kAutomated safety check: PassLGPL-2.1
Elodin DBelodin-sys/elodin547—~2.8kAutomated safety check: PassApache-2.0
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0
StatsmodelszLanqing/codex-claude-academic-skills4.6k16 repos~4.9kAutomated safety check: PassBSD-3-Clause
Senior Data ScientistRaidriar7170/hermes-skilleval1256 repos~1.4kAutomated safety check: PassMIT
Time Series Analytics Useropen-edge-platform/edge-ai-libraries169—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Elodin DB

    elodin-sys/elodin

    Work with Elodin-DB, the time-series telemetry database. An agent skill from elodin-sys/elodin.

    547 GitHub stars~2.8k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 8 days ago
    Data & AnalyticsAuto-check passed
  • Statsmodels

    zLanqing/codex-claude-academic-skills

    Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 16 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • Senior Data Scientist

    Raidriar7170/hermes-skilleval

    World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics.

    125 GitHub starsUsed in 6 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Time Series Analytics User

    open-edge-platform/edge-ai-libraries

    Build a new time-series analytics use case on top of the deployed Time Series Analytics microservice — bring it up with Docker Compose (from a repo clone, or by fetching the compose files from…

    169 GitHub stars~3.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Add Python Binding

    czyt1988/data-workbench

    A skill your agent uses when adding new Python bindings (exposing C++ classes/functions to Python) in the DAWorkBench project, or modifying existing bindings.

    102 GitHub stars~4.6k tokensUpdated 25 days ago
    Data & AnalyticsAuto-check passed

More from openforecast-org/smooth

  • Smooth Translation

    openforecast-org/smooth

    Port a feature from the R smooth package to the Python port, or check how an R name maps to Python.

    107 GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Smooth Cpp Shared

What does Smooth Cpp Shared do?

Work on the C++ layer that the R package and the Python port share — the headers under src/headers/, the Rcpp bindings in src/, the pybind11 bindings in src/python/, and the two build systems that…. Smooth Cpp Shared is an agent skill from openforecast-org/smooth. Work on the C++ layer that the R package and the Python port share — the headers under src/headers/, the Rcpp bindings in src/, the pybind11 bindings in src/python/, and the two build systems that compile them.

When should I use Smooth Cpp Shared?

Smooth Cpp Shared fits situations like: debugging C++ in this repo; A numeric result differs between the R and Python builds; adding a new binding; A build/compilation step fails.

How do I install Smooth Cpp Shared in Claude Code?

Run `npx skills add openforecast-org/smooth --skill smooth-cpp-shared -a claude-code`. Or copy the skill folder (.claude/skills/smooth-cpp-shared in openforecast-org/smooth) into .claude/skills/smooth-cpp-shared in your project. Claude Code loads it when a task matches its description.

How do I install Smooth Cpp Shared in Codex?

Run `npx skills add openforecast-org/smooth --skill smooth-cpp-shared -a codex`. Or copy the skill folder (.claude/skills/smooth-cpp-shared in openforecast-org/smooth) into .agents/skills/smooth-cpp-shared in your project. Codex loads it when a task matches its description.

Can I use Smooth Cpp Shared in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openforecast-org/smooth --skill smooth-cpp-shared -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smooth-cpp-shared, .gemini/skills/smooth-cpp-shared, .github/skills/smooth-cpp-shared and .opencode/skills/smooth-cpp-shared in your project.

What does Smooth Cpp Shared need to run?

Going by SKILL.md and its folder, Smooth Cpp Shared needs the command-line tools its instructions call (python and python3). Our summary lists: Python 3.

Does Smooth Cpp Shared access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Smooth Cpp Shared safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Smooth Cpp Shared use?

Smooth Cpp Shared is published under the LGPL-2.1 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Smooth Cpp Shared use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Smooth Cpp Shared?

Skills that share tags, products or a category with Smooth Cpp Shared: Elodin DB (elodin-sys/elodin, 547 stars), TimesFM Forecasting (google-research/timesfm, 34k stars), Statsmodels (zLanqing/codex-claude-academic-skills, 4.6k stars) and Senior Data Scientist (Raidriar7170/hermes-skilleval, 125 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Smooth Cpp Shared?

openforecast-org (a GitHub organization) maintains it in openforecast-org/smooth, which has 107 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

Source: openforecast-org/smooth on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.