Skip to content
Agentmart
Submit a tool

code-translator

Converts a code snippet from one programming language to another while preserving behavior and flagging library, runtime, and type-system differences.

Skill by surfmind-space

IndexedMIT★ 7
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/surfmind-space-code-translator

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Converts a code snippet from one programming language to another while preserving behavior and flagging library, runtime, and type-system differences. Use when the user asks to translate, port, rewrite, or convert code between languages — "port this to Python", "rewrite in Rust", "convert Java to Go".

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/code-translator

What's inside

Skill name
code-translator
Description
Converts a code snippet from one programming language to another while preserving behavior and flagging library, runtime, and type-system differences. Use when the user asks to translate, port, rewrite, or convert code between languages — "port this to Python", "rewrite in Rust", "convert Java to Go".
License
MIT
Metadata
icon: Repeat
Instructions
37 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Code Translator

Port a code snippet into the target language while keeping its behavior intact — write idiomatic code for the target rather than a line-by-line transliteration, and call out the differences the user must verify before relying on the result. Work only from the snippet and constraints given; don't silently change algorithmic behavior, and don't invent target-language APIs that don't exist.

1. Identify the source and target languages, target version constraints, dependencies, runtime assumptions, and the behavior that must be preserved.
2. Translate idiomatically, mapping each dependency to its target-language equivalent and flagging any standard-library function with no direct match.
3. Preserve edge-case behavior — null handling, integer overflow, encoding, error propagation, and ordering — and note where type-system differences could surface as runtime errors.
4. Suggest a test case or two the user can run to confirm the two versions behave the same.

Return concise headings and include these sections when they fit: **Translated code**, **Behavior preserved**, **Differences to verify**, **Test cases**. Preserve important names, numbers, and constraints. Be specific but don't overclaim; if the snippet is ambiguous or incomplete, say what's missing and give the best supported translation. Respond in the same language as the user's request.

## Example

Source (Python):

> ```python
> def avg(nums):
>     return sum(nums) / len(nums)
> ```

Translation:

> **Translated code** (JavaScript):
>
> ```javascript
> function avg(nums) {
>   return nums.reduce((a, b) => a + b, 0) / nums.length;
> }
> ```
>
> **Behavior preserved:** Sums the list and divides by its length, returning the mean.
>
> **Differences to verify:** Python's `/` on two ints still yields a float; JS numbers are always floats, so that matches — but Python raises `ZeroDivisionError` on an empty list, while JS returns `NaN`. Add an explicit guard if the empty-input contract matters.
>
> **Test cases:** `avg([1, 2, 3])` → `2`; `avg([])` → confirm whether you want a thrown error or `NaN`.

From surfmind-space/awesome-surfmind, MIT.

More from surfmind-space/awesome-surfmind

Signals

Stars
7
Forks
2
Open issues
1
Last commit (this folder)
Jun 29, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from surfmind-space

Cite this page

code-translator skill. Agent Mart. https://agentmart.dev/skills/surfmind-space-code-translator (last updated 2026-10-24)