code-translator
Skill8 starsChanged 5 months agoMITView on GitHub
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".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- poorvith-mp/skills-developertheir own version, first seen Aug 19, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- poorvith-mp/skills-developer★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- answerSkill
- api-to-exampleSkill
- bilingual-readerSkill
- calendar-prepSkill
- caption-assistantSkill
- chart-explainerSkill
- competitor-snapshotSkill
- coupon-hunterSkill
- course-fit-checkSkill
- cover-letter-builderSkill
- deal-checkerSkill
- draft-from-notesSkill
- explainSkill
- fact-checkSkill
- fix-grammarSkill
- hook-generatorSkill
- improve-writingSkill
- interview-prepSkill
- job-application-assistantSkill
- job-fit-reviewSkill
- job-offer-compareSkill
- landing-page-critiqueSkill
- linkedin-outreachSkill
- localize-textSkill
- meeting-follow-upSkill
- outline-builderSkill
- paper-readerSkill
- portfolio-project-reviewSkill
- product-review-summarizerSkill
- pronunciation-and-usageSkill
- regex-decoderSkill
- reply-assistantSkill
- repo-onboarderSkill
- rewrite-longerSkill
- rewrite-shorterSkill
- social-post-generatorSkill
- source-finderSkill
- source-listSkill
- study-planSkill
- style-matchSkill
- summarizeSkill
- table-to-csvSkill
- term-explainerSkill
- terminology-keeperSkill
- tone-rewriterSkill
- translateSkill
The file
Files
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.
- Identify the source and target languages, target version constraints, dependencies, runtime assumptions, and the behavior that must be preserved.
- Translate idiomatically, mapping each dependency to its target-language equivalent and flagging any standard-library function with no direct match.
- Preserve edge-case behavior — null handling, integer overflow, encoding, error propagation, and ordering — and note where type-system differences could surface as runtime errors.
- 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):
def avg(nums): return sum(nums) / len(nums)
Translation:
Translated code (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 raisesZeroDivisionErroron an empty list, while JS returnsNaN. 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 orNaN.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

