Agent skill

Module Level Code Translator

by ArabelaTso in ArabelaTso/Skills-4-SE

Translate source code between programming languages at function, class, and module levels while preserving behavior and generating verification tests.

Apache-2.0Auto-check passedWriting & Content

Install Module Level Code Translator

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill module-level-code-translator -a claude-code

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

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE module-level-code-translator --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/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/module-level-code-translator .claude/skills/module-level-code-translator && 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
module-level-code-translator
GitHub stars
253
Token cost
~1.9k tokens
SKILL.md length
738 words
Files
8 (incl. references, assets)
Skills in repo
150
Repo updated
First seen
Licence
Apache-2.0

At a glance

Translate source code between programming languages at function, class, and module levels while preserving behavior and generating verification tests.

  • Works in 5 steps: Analyze Source Code → Plan Translation Strategy → Translate Code → …
  • Translating code from one language to another (e.g.
  • SKILL.md covers Translation Workflow, Output Format, Language-Specific Considerations and Resources, plus 1 more section
  • Runs Go, Java, JavaScript and Python scripts from its folder

What it does

Module Level Code Translator is an agent skill from ArabelaTso/Skills-4-SE. Translate source code between programming languages at function, class, and module levels while preserving behavior and generating verification tests. Use when translating code from one language to another (e.g., "translate this Python module to JavaScript", "convert this Java class to C", "port this code to Go and generate tests"), migrating codebases between languages, or creating equivalent implementations across different technology stacks. Handles idiom adaptation, standard library mappings, and test…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files and assets (for example `assets/test_template_javascript.js`, `assets/test_template_python.py` and `references/language_mappings.md`).

It sits in Writing & Content, covering Translation and Test generation. It works with Python, Java, JavaScript and C#. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Translating code from one language to another (e.g.
  • Translate this Python module to JavaScript
  • Convert this Java class to C
  • Port this code to Go and generate tests)

Example prompts

  • “translate this Python module to JavaScript”
  • “convert this Java class to C”
  • “port this code to Go and generate tests”
  • “/module-level-code-translator”

Requirements

  • Python 3
  • Node.js

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Analyze Source Code
  2. Plan Translation Strategy
  3. Translate Code
  4. Generate Tests
  5. Create Translation Summary

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. 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

    Ships script files (Go, Java, JavaScript and Python), which the agent can run.

    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

Module Level Code Translator loads about 1.9k tokens when it runs, and up to ~4k if it reads all its reference files. Until then it costs about 138 tokens; SKILL.md has 738 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~138
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4k

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 ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 738 words, ~1,879 tokens.

Download SKILL.mdSave it as .claude/skills/module-level-code-translator/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
module-level-code-translator
description
Translate source code between programming languages at function, class, and module levels while preserving behavior and generating verification tests. Use when translating code from one language to another (e.g., "translate this Python module to JavaScript", "convert this Java class to C#", "port this code to Go and generate tests"), migrating codebases between languages, or creating equivalent implementations across different technology stacks. Handles idiom adaptation, standard library mappings, and test generation.

Module-Level Code Translator

Translate source code between programming languages while preserving behavior, adapting idioms, and generating verification tests.

Translation Workflow

Follow this sequential process for code translation:

1. Analyze Source Code

Before translating, thoroughly understand the source code:

  • Identify scope: Determine if translating functions, classes, or entire modules
  • Map dependencies: List all imports, external libraries, and dependencies
  • Understand behavior: Identify core logic, algorithms, and expected behavior
  • Note language-specific features: Identify features that require special handling (decorators, generators, async/await, etc.)
  • Extract test cases: If existing tests are available, analyze them to understand expected behavior
2. Plan Translation Strategy

Create a translation plan before writing code:

  • Map standard libraries: Identify equivalent libraries in target language (see references/stdlib_mappings.md)
  • Adapt idioms: Plan how to translate language-specific patterns (see references/language_mappings.md)
  • Handle type systems: Plan type annotations/declarations if moving between typed/untyped languages
  • Identify testing framework: Choose appropriate testing framework for target language (see references/testing_frameworks.md)
  • List transformations: Document major transformations needed (e.g., class → struct, decorator → annotation)
3. Translate Code

Implement the translation following target language conventions:

Core principles:

  • Preserve original behavior exactly
  • Follow target language idioms and conventions
  • Maintain code structure when possible (functions → functions, classes → classes)
  • Adapt patterns that don't translate directly (e.g., Python decorators → Java annotations)
  • Add appropriate error handling for target language
  • Include necessary imports and dependencies

Common transformations:

Python → JavaScript:

  • Classes: Keep class structure, adapt __init__ to constructor
  • List comprehensions: Convert to .map(), .filter(), .reduce()
  • Decorators: Convert to higher-order functions or use libraries
  • Type hints: Convert to TypeScript or JSDoc comments

Python → Java:

  • Functions: Convert to static methods or instance methods in classes
  • Dynamic typing: Add explicit type declarations
  • Duck typing: Use interfaces or abstract classes
  • List/dict operations: Use Collections framework

Python → Go:

  • Classes: Convert to structs with methods
  • Exceptions: Convert to error return values
  • Dynamic features: Use interfaces for polymorphism
  • List comprehensions: Use explicit loops

Java → C#:

  • Naming: Convert PascalCase for methods
  • Properties: Use C# property syntax instead of getters/setters
  • Collections: Map to .NET collections
  • Annotations: Convert to C# attributes
4. Generate Tests

Create comprehensive tests to verify translation correctness:

Test generation approach:

  1. Use appropriate test template from assets/ directory
  2. Port existing tests if available in source code
  3. Create new tests covering:
    • Basic functionality for each function/method
    • Edge cases (empty inputs, null values, boundary conditions)
    • Error handling and exceptions
    • Integration between components

Test equivalence:

  • Ensure tests verify the same behavior as original code
  • Use equivalent assertions (see references/testing_frameworks.md)
  • Maintain test structure and organization
  • Add setup/teardown as needed for target framework
5. Create Translation Summary

Document the translation with a summary including:

Mappings:

  • List of source → target function/class/module mappings
  • Standard library equivalences used
  • External dependencies and their target equivalents

Transformations:

  • Major structural changes (e.g., decorator → annotation)
  • Idiom adaptations (e.g., list comprehension → map/filter)
  • Type system changes (dynamic → static typing)

Verification notes:

  • Test coverage summary
  • Known limitations or differences
  • Manual verification steps if needed
Show full SKILL.md (266 more words)Show less

Output Format

Provide the translation in this structure:

## Translated Code

[Target language code with appropriate file structure]

## Tests

[Test code using target language testing framework]

## Translation Summary

### Mappings
- SourceClass → TargetClass
- source_function() → targetFunction()
- source_module → target.package

### Standard Library Equivalences
- source.lib.function → target.lib.function

### Transformations
- [Description of major transformations]

### Verification
- [Test coverage and verification notes]

Language-Specific Considerations

Python → JavaScript/TypeScript
  • Convert snake_case to camelCase
  • Handle async/await (similar syntax)
  • Map list/dict operations to array/object methods
  • Consider using TypeScript for type safety
Python → Java
  • Add explicit type declarations throughout
  • Convert modules to packages with proper structure
  • Use appropriate Java collections (ArrayList, HashMap, etc.)
  • Handle checked exceptions
Python → Go
  • Convert classes to structs with receiver methods
  • Replace exceptions with error return values
  • Use goroutines for concurrency (if applicable)
  • Follow Go naming conventions (exported vs unexported)
Java → C#
  • Convert naming conventions (PascalCase methods)
  • Use C# properties instead of getters/setters
  • Map Java collections to .NET equivalents
  • Convert annotations to attributes
JavaScript → Python
  • Convert camelCase to snake_case
  • Handle promises/async with Python async/await
  • Map array methods to list comprehensions or loops
  • Add type hints if using modern Python

Resources

references/
  • language_mappings.md: Common idiom mappings between languages
  • stdlib_mappings.md: Standard library equivalences across languages
  • testing_frameworks.md: Testing framework mappings and patterns
assets/

Test templates for common target languages:

  • test_template_python.py: pytest template
  • test_template_javascript.js: Jest template
  • test_template_java.java: JUnit 5 template
  • test_template_go.go: Go testing template

Use these templates as starting points for generated tests.

Best Practices

  1. Preserve behavior first: Correctness is more important than idiomatic code
  2. Follow target conventions: Use target language's naming, structure, and patterns
  3. Test thoroughly: Generate comprehensive tests to verify equivalence
  4. Document differences: Note any behavioral differences or limitations
  5. Handle edge cases: Ensure edge cases are properly translated
  6. Consider performance: Be aware of performance implications of translations
  7. Use appropriate types: Leverage target language's type system effectively
  8. Maintain readability: Keep code readable and maintainable in target language

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references, assets) in skills/module-level-code-translator of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • assets/test_template_go.go
  • assets/test_template_java.java
  • assets/test_template_javascript.js
  • assets/test_template_python.py
  • references/language_mappings.md
  • references/stdlib_mappings.md
  • references/testing_frameworks.md

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Module Level Code Translator 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.

Module Level Code Translator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Module Level Code Translator this skillArabelaTso/Skills-4-SE253—~1.9kAutomated safety check: PassApache-2.0
Crap Analyzerswingerman/engineer154—~1.2kAutomated safety check: PassMIT
Polyglot Test Agentboshi-xixixi/TraeSkill275—~1.7kAutomated safety check: PassMIT
Error Translatorlaolaoshiren/claude-code-skills-zh878—~609Automated safety check: PassMIT
Find Untested Sourcesdotnet/skills5.6k1 repos~3.3kAutomated safety check: PassMIT
Approval Testing Toolkitlexler/skill-factory239—~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Crap Analyzer

    swingerman/engineer

    A skill your agent uses to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods.

    154 GitHub stars~1.2k tokensUpdated 14 days ago
    Testing & QAAuto-check passed
  • Polyglot Test Agent

    boshi-xixixi/TraeSkill

    Generates comprehensive, workable unit tests for any programming language using a multi-agent pipeline.

    275 GitHub stars~1.7k tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Error Translator

    laolaoshiren/claude-code-skills-zh

    编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案

    878 GitHub stars~609 tokensUpdated 2 days ago
    Writing & ContentAuto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Approval Testing Toolkit

    lexler/skill-factory

    Writes snapshot-style approval tests in Python, JavaScript, TypeScript or Java, comparing output against an approved file instead of writing individual assertions.

    239 GitHub stars~1.2k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Selenium Skill

    sickn33/agentic-awesome-skills

    Generates production-grade Selenium WebDriver automation scripts and tests in Java, Python, JavaScript, C, Ruby, or PHP.

    47k GitHub starsUsed in 1 repo~2.4k tokens
    Testing & QAAuto-check passed

More from ArabelaTso/Skills-4-SE

All 150 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Module Level Code Translator

What does Module Level Code Translator do?

Translate source code between programming languages at function, class, and module levels while preserving behavior and generating verification tests. Module Level Code Translator is an agent skill from ArabelaTso/Skills-4-SE. Translate source code between programming languages at function, class, and module levels while preserving behavior and generating verification tests.

When should I use Module Level Code Translator?

Module Level Code Translator fits situations like: translating code from one language to another (e.g; translate this Python module to JavaScript; convert this Java class to C; port this code to Go and generate tests).

How do I install Module Level Code Translator in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill module-level-code-translator -a claude-code`. Or copy the skill folder (skills/module-level-code-translator in ArabelaTso/Skills-4-SE) into .claude/skills/module-level-code-translator in your project. Claude Code loads it when a task matches its description.

How do I install Module Level Code Translator in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill module-level-code-translator -a codex`. Or copy the skill folder (skills/module-level-code-translator in ArabelaTso/Skills-4-SE) into .agents/skills/module-level-code-translator in your project. Codex loads it when a task matches its description.

Can I use Module Level Code Translator 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 ArabelaTso/Skills-4-SE --skill module-level-code-translator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/module-level-code-translator, .gemini/skills/module-level-code-translator, .github/skills/module-level-code-translator and .opencode/skills/module-level-code-translator in your project.

What does Module Level Code Translator need to run?

Going by SKILL.md and its folder, Module Level Code Translator needs Go, Java, JavaScript and Python for the scripts in its folder. Our summary lists: Python 3; Node.js.

Does Module Level Code Translator 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 Module Level Code Translator 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 Module Level Code Translator use?

Module Level Code Translator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Module Level Code Translator use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Module Level Code Translator?

Skills that share tags, products or a category with Module Level Code Translator: Crap Analyzer (swingerman/engineer, 154 stars), Polyglot Test Agent (boshi-xixixi/TraeSkill, 275 stars), Error Translator (laolaoshiren/claude-code-skills-zh, 878 stars) and Find Untested Sources (dotnet/skills, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Module Level Code Translator?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.