code-translation

Installation
SKILL.md

Code Translation

Function-level translation between languages. The goal is observably equivalent behavior — same inputs → same outputs, same side effects, same error behavior. Not line-by-line transliteration; idiomatic code in the target.

For whole modules/packages, → module-level-code-translator (handles imports, file structure, cross-function concerns).

The three layers

  1. Syntax — the easy part. for x in xsfor (auto& x : xs). Mechanical.
  2. Semantics — the dangerous part. 3 / 2 is 1 in Python 2, 1.5 in Python 3, 1 in C. Integer overflow, null semantics, string encoding.
  3. Idiom — the quality part. [x*2 for x in xs if x > 0] → Java stream, not a for-loop with an ArrayList. Optional but expected.

Semantic minefields — per language pair

Installs
1
GitHub Stars
1
First Seen
Mar 29, 2026
code-translation — santosomar/general-secure-coding-agent-skills