Install
openclaw skills install multi-lang-coderPolyglot code converter and language architect. Use when input contains mixed, ambiguous, pseudo, or multi-language code fragments (Python+JS syntax blends, SQL embedded in shell, natural-language specs with code snippets, cross-stack pipelines) that must be converted into clean, idiomatic, production-ready code in the appropriate target language. Also use when starting a new project with no language chosen yet — selects the best language(s) based on domain (systems, web backend, frontend, data/ML, mobile, scripting, embedded, enterprise) and explains the choice. Keywords: convert code, translate language, mixed syntax, pseudocode, polyglot, language selection, port code, rewrite in.
openclaw skills install multi-lang-coderConvert mixed, pseudo, or multi-language input into idiomatic production code, and select the right language(s) when none is dictated by the project.
def and function in the same block, this. next to self., semicolons mixed with indentation-based blocks)Work through these phases in order. Skip a phase only when its premise does not apply (e.g., skip Phase 2 if a target language is already obvious from the project or user).
Before choosing a language, scan for signals in this priority order:
package.json, pyproject.toml / requirements.txt, Cargo.toml, go.mod, *.csproj, pom.xml / build.gradle, Gemfile, composer.json, tsconfig.json. The first one found generally dictates the target..ts, .py, .rs, .go, .java, .cs, .rb, .cpp, .kt, .swift).Run this only when Phase 1 yields no target. Map the goal to a domain, then pick the best fit:
| Domain | Strong default | Alternatives |
|---|---|---|
| Systems / performance-critical | Rust | C++, Go, Zig |
| Web backend / API | TypeScript (Node) | Go, Python, Java, C#, Ruby |
| Web frontend / UI | TypeScript | JavaScript |
| Data / ML / AI | Python | R, Julia |
| Mobile (native) | Swift (iOS) / Kotlin (Android) | Dart/Flutter, React Native |
| Scripting / automation | Python | Bash (Unix), PowerShell (Windows) |
| Embedded / IoT | C / Rust | C++, MicroPython |
| Enterprise / type-heavy | Java / C# | TypeScript, Kotlin |
Decide single vs. polyglot:
State the choice briefly (2–3 sentences per language) before writing code. Include one tradeoff the user should know.
For each fragment in the input:
Result, error returns, promises). Do not port one language's pattern into another.pip install …, npm install …, cargo add …).def and function together, this and self together, or print and console.log together, the conversion has failed. Re-check before responding.try/except as Go try/catch produces non-compiling code. Translate to the target's native pattern (if err != nil, Result<T,E>, etc.).requests, the TS equivalent is fetch/axios — pick one and justify it; do not fabricate package names.import and if response.status_code == 200: inside a JS function () { … } wrapper with console.log — convert wholesale to one language.SELECT * FROM users and loop through rows prose — split into a real shell driver plus a real SQL file, or fold into one language with a DB client.def __init__(self), this.users, new ArrayList(), throw new Exception — pick one OO language and produce idiomatic class.if ENV == "production" and Math.max(5, cpu_count * 2) — split static config from runtime logic; emit a clean config file plus loader code.