Code Translation
ArabelaTso/Skills-4-SE
Convert code between programming languages while preserving functionality and semantics.
Port a feature from the R smooth package to the Python port, or check how an R name maps to Python.
$ npx skills add openforecast-org/smooth --skill smooth-translation -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install openforecast-org/smooth smooth-translation --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/openforecast-org/smooth.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/smooth-translation .claude/skills/smooth-translation && rm -rf skills-srcUse ~/.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/
Install the "smooth-translation" agent skill from https://github.com/openforecast-org/smooth/tree/master/.claude/skills/smooth-translation into .claude/skills/smooth-translation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smooth-translation", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/openforecast-org/smooth/tree/master/.claude/skills/smooth-translationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add openforecast-org/smooth --skill smooth-translation -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install openforecast-org/smooth smooth-translation --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/openforecast-org/smooth.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/smooth-translation .agents/skills/smooth-translation && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "smooth-translation" agent skill from https://github.com/openforecast-org/smooth/tree/master/.claude/skills/smooth-translation into .agents/skills/smooth-translation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smooth-translation", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add openforecast-org/smooth --skill smooth-translation -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install openforecast-org/smooth smooth-translation --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/openforecast-org/smooth.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/smooth-translation .cursor/skills/smooth-translation && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "smooth-translation" agent skill from https://github.com/openforecast-org/smooth/tree/master/.claude/skills/smooth-translation into .cursor/skills/smooth-translation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smooth-translation", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/openforecast-org/smooth.git --path .claude/skills/smooth-translation--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add openforecast-org/smooth --skill smooth-translation -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install openforecast-org/smooth smooth-translation --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/openforecast-org/smooth.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/smooth-translation .gemini/skills/smooth-translation && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "smooth-translation" agent skill from https://github.com/openforecast-org/smooth/tree/master/.claude/skills/smooth-translation into .gemini/skills/smooth-translation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smooth-translation", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install openforecast-org/smooth smooth-translationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add openforecast-org/smooth --skill smooth-translation -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/openforecast-org/smooth.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/smooth-translation .github/skills/smooth-translation && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "smooth-translation" agent skill from https://github.com/openforecast-org/smooth/tree/master/.claude/skills/smooth-translation into .github/skills/smooth-translation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smooth-translation", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add openforecast-org/smooth --skill smooth-translation -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install openforecast-org/smooth smooth-translation --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/openforecast-org/smooth.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/smooth-translation .opencode/skills/smooth-translation && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "smooth-translation" agent skill from https://github.com/openforecast-org/smooth/tree/master/.claude/skills/smooth-translation into .opencode/skills/smooth-translation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smooth-translation", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
smooth-translationPort a feature from the R smooth package to the Python port, or check how an R name maps to Python.
Smooth Translation is an agent skill from openforecast-org/smooth. Port a feature from the R smooth package to the Python port, or check how an R name maps to Python. Covers the R↔Python name map for user arguments, fitted attributes, state-space matrices and internal dicts; the R and Python call flows side by side; the parity rules that govern the port (same optimiser, same initialisation, distributions from greybox, no clipping); and the checklist for landing a translation with a test that proves it. Use when translating an R function or argument to Python, when a Python…
Its SKILL.md is about 2.2k 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 Writing & Content, covering Translation and Forecasting and time series. It works with Python and C++. The repository describes itself as: The set of functions used for time series analysis and in forecasting.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit aa89029. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
ruffmypyFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Smooth Translation loads about 2.2k tokens when it runs. Until then it costs about 155 tokens; SKILL.md has 920 words of instructions outside code blocks.
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.
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.
The full file from openforecast-org/smooth at commit aa89029, republished under its LGPL-2.1 licence (© openforecast-org). 920 words, ~2,212 tokens.
.claude/skills/smooth-translation/SKILL.md (or your agent's skills folder).The Python port is a numerical port of the R package. Same C++ kernel, same optimiser, same initialisation: on the same data the two are expected to return the same bits, not merely the same answer to a few decimals.
Source of truth is always the code — R/ and python/src/smooth/ — never this
file. Read the R implementation before writing the Python one.
| Layer | R | Python |
|---|---|---|
| User entry points | R/adam.R, R/adam-es.R, R/adam-ces.R, R/adam-msarima.R, R/adam-sma.R, R/om.R, R/omg.R, R/om-oes.R, R/sm.R, R/msdecompose.R | smooth.ADAM, ES, CES/AutoCES, MSARIMA/AutoMSARIMA, SMA, OM/OMG/AutoOM, sm, msdecompose |
| Validation | parametersChecker() in R/adamGeneral.R | core/checker/ (package) |
| Architecture / matrices | architector(), creator(), filler(), initialiser() — locals in R/adam.R | core/creator/ (package) |
| Estimation / selection | estimator(), selector() — locals in R/adam.R | core/estimator/ (package) |
| Forecasting | preparator(), forecaster() — locals in R/adam.R | core/forecaster/ (package) |
| Cost functions | CF(), logLikADAM() — locals in R/adam.R | core/utils/cost_functions.py |
| Information criteria | ICFunction() | core/utils/ic.py |
| Covariance | covarAnal(), adamVarAnal() | core/utils/var_covar.py |
| Shared C++ | see the smooth-cpp-shared skill | — |
checker, creator, estimator and forecaster are packages (directories)
on the Python side, not single modules.
R adam() → parametersChecker → architector → creator → initialiser
→ CF (filler + adamCpp$fit) → forecaster
Py ADAM.fit() → parameters_checker → architector → creator → estimator
→ initialiser → CF (filler + adam_fitter) → ...
ADAM.predict() → preparator → forecaster → adam_forecaster| R | Python |
|---|---|
model, lags, phi, persistence, initial, distribution, loss, ic, bounds, h, holdout, regressors | same names |
orders = list(ar=, i=, ma=) | orders={"ar": …} or the scalar trio ar_order, i_order, ma_order |
xreg / formula | X (positional, on fit) |
initialSeason, initialX | folded into initial, which takes a dict of state values as well as a method name (MSARIMA also has initial_X) |
lambda (LASSO/RIDGE weight) | lambda_param, or **{"lambda": …}. OM / OMG use reg_lambda |
silent | verbose (inverted) |
sm(object, …) + implant(model, scale) | model.sm(…) then model.scale_model = scale; = None detaches |
R exposes model$x; Python uses properties, with a trailing underscore only
where the plain name would clash with a constructor argument.
| R | Python |
|---|---|
coef(m) | m.coef |
logLik(m) | m.loglik |
nparam(m) | m.nparam (m.n_param on CES) |
nobs(m) | m.nobs |
AIC / AICc / BIC / BICc | m.aic / m.aicc / m.bic / m.bicc |
fitted(m), residuals(m), actuals(m) | m.fitted, m.residuals, m.actuals |
m$states | m.states |
m$persistence | m.persistence_vector |
m$phi | m.phi_ |
m$initial | m.initial_value |
m$scale (number or scale model) | m.scale (always a float) and m.scale_model (model or None) |
m$lossValue | m.loss_value |
m$loss, m$distribution | m.loss_, m.distribution_ |
m$model | m.model_name |
m$timeElapsed | m.time_elapsed |
sigma(m) | m.sigma |
extractScale(m), extractSigma(m) | m.extract_scale(), m.extract_sigma() |
pointLik(m) | m.point_lik() |
forecast(m, h=) | m.predict(h=) → ForecastResult with .mean / .lower / .upper |
R stores either a number or a model in the single $scale slot and
disambiguates with is.scale(). Python keeps the two apart so the return type
is stable.
| R | Python |
|---|---|
matVt | mat_vt |
matF | mat_f |
matWt | mat_wt |
vecg | vec_g |
matxt | mat_xt |
profilesRecentTable | profiles_recent_table |
indexLookupTable | index_lookup_table |
lagsModel, lagsModelAll | lags_dict |
yInSample, yHoldout | observations_dict |
otLogical | observations_dict["ot_logical"] |
Etype, Ttype, Stype | model_type_dict |
initialType, initialValue | initials_dict |
R passes state through the calling environment; Python passes explicit dicts. Matrices must stay Fortran (column-major) order for Armadillo.
Do not keep a coverage table here — it rots. The maintained answers are:
ssarima(), gum()), partial, or not planned.B0, bounds, profile tables) or the
two are not fitting the same model (state structure, lags, matrices). The
diagnostic that settles it in one step: evaluate the likelihood in both
languages at identical parameter values. Equal there means the seed
differs; different there means the models differ, and the next move is to
print lagsModelAll, the persistence vector and the component counts side by
side.greybox supplies
dnorm/dlaplace/ds/dgnorm/dalaplace/dlnorm/dllaplace/dls/
dlgnorm/dinvgauss/dgamma and their p/q counterparts — the same
functions R's smooth calls. Spell out the parameterisation, not the
density. The r* draws keep scipy, because greybox's take no
random_state.np.clip on fitted values,
no np.maximum(x, 1e-15) inside log(). A -Inf log-likelihood is the
optimiser reporting that those parameters are inconsistent with the data.
The one legitimate exception is an infeasibility guard at the top of a cost
function returning a uniformly large penalty.match.arg() on a bad argument; Python should raise, not warn and
substitute a default.sum() and mean() accumulate in a long
double register. Where a 1-ulp difference can reorder the optimiser, use the
_sum_r / _mean_r helpers in core/utils/, not np.sum.frequency parameter. Seasonal period is inferred from the data,
lags, or the model spec. The standalone sim_* generators are the
documented exception.python/tests/ with the r_parity marker if it shells out to R; those run
through tests/_r_bridge.py, which loads the local R source with
devtools::load_all() so it always compares against the working tree.ruff check src/, ruff format src/ and mypy src/smooth — all three,
every time.python/NEWS.md entry under the current unreleased version.Roadmap or R-Python-differences if the parity status moved.© 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
Just SKILL.md in .claude/skills/smooth-translation of openforecast-org/smooth.
Open the folder on GitHubat commit aa89029
Smooth Translation 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Smooth Translation this skillopenforecast-org/smooth | 107 | — | ~2.2k | Automated safety check: Pass | LGPL-2.1 | |
| Code TranslationArabelaTso/Skills-4-SE | 253 | — | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Elodin DBelodin-sys/elodin | 547 | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| Translationdoxygen/doxygen | 6.6k | — | ~5.2k | Automated safety check: Pass | GPL-2.0 | |
| China Travel Kittczyliu/china-travel-kit | 194 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Technology Searchfreestylefly/wesight | 944 | — | ~3.3k | Automated safety check: Pass | MIT |
ArabelaTso/Skills-4-SE
Convert code between programming languages while preserving functionality and semantics.
elodin-sys/elodin
Work with Elodin-DB, the time-series telemetry database. An agent skill from elodin-sys/elodin.
doxygen/doxygen
Keeps all Doxygen and Doxywizard translations up to date across three mechanisms: translator C++ classes (src/translatorxx.h), Qt .ts locale files for the Doxywizard GUI (addon/doxywizard/i18n/)…
tczyliu/china-travel-kit
Research and plan first-time independent trips in China with bilingual, source-aware city data and official live-check entry points.
freestylefly/wesight
Search tech blogs, developer forums, and IT media (TechCrunch, Hacker News, 36氪, etc.) for software and hardware industry updates with heat ranking and EN↔CN translation.
dylantmoore/stata-skill
Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK.
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…
Categories
Port a feature from the R smooth package to the Python port, or check how an R name maps to Python. Smooth Translation is an agent skill from openforecast-org/smooth. Port a feature from the R smooth package to the Python port, or check how an R name maps to Python.
Smooth Translation fits situations like: translating an R function; argument to Python; A Python result disagrees with R; looking up what an R name is called on the Python side.
Run `npx skills add openforecast-org/smooth --skill smooth-translation -a claude-code`. Or copy the skill folder (.claude/skills/smooth-translation in openforecast-org/smooth) into .claude/skills/smooth-translation in your project. Claude Code loads it when a task matches its description.
Run `npx skills add openforecast-org/smooth --skill smooth-translation -a codex`. Or copy the skill folder (.claude/skills/smooth-translation in openforecast-org/smooth) into .agents/skills/smooth-translation in your project. Codex loads it when a task matches its description.
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-translation -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-translation, .gemini/skills/smooth-translation, .github/skills/smooth-translation and .opencode/skills/smooth-translation in your project.
Going by SKILL.md and its folder, Smooth Translation needs the command-line tools its instructions call (ruff and mypy). Our summary lists: Python 3.
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.
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.
Smooth Translation 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.
About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Smooth Translation: Code Translation (ArabelaTso/Skills-4-SE, 253 stars), Elodin DB (elodin-sys/elodin, 547 stars), Translation (doxygen/doxygen, 6.6k stars) and China Travel Kit (tczyliu/china-travel-kit, 194 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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 8, 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.