Code Translation
advanceddevelopmentMin 64K context
Translates code between programming languages while preserving logic, idioms, and best practices of the target language. Handles differences in type systems, error handling, concurrency models, and standard library APIs. Produces idiomatic target code, not line-by-line transliteration.
Use Cases
- Migrating Python scripts to TypeScript
- Porting Java libraries to Kotlin or Go
- Converting JavaScript to TypeScript with proper types
- Translating shell scripts to Python for cross-platform support
- Rewriting legacy code in modern language equivalents
Example Prompt
Translate the following code from [source language] to [target language]. Requirements: - Use idiomatic patterns of the target language (not line-by-line translation) - Preserve all business logic and edge case handling - Use appropriate target language equivalents for: - Error handling (exceptions vs Result types vs error codes) - Concurrency (async/await, goroutines, threads) - Collections and data structures - Add type annotations where the target language supports them - Note any behavioral differences between source and target Source code ([source language]): ``` [paste code here] ```
Recommended Models
Compatible Tools
claude-codecursorgithub-copilotkiroany
Modalities
Input: code, text
→Output: code, text
Related Skills
Author
OpenModels Community