Task prompt · Coding
Convert code from one language to another
by Agent Yard TeamIdiomatic translation, not a line-by-line copy.
Use cases
- Idiomatic translation, not a line-by-line copy.
- When you already have a file and want the AI to work from it instead of starting from scratch.
- Reuse it as often as you like: fill in the blanks (source language; target language) with new details and copy again.
- With Cursor, Claude Code, Codex and more, the AIs that support what this prompt needs.
Featured in: Best Claude prompts for coding.
How to use it
- Open Cursor or Claude Code in your terminal (or another AI listed here).
- Attach the file (PDF, Word, CSV or Excel), or paste its text into the prompt.
- Fill in the highlighted blanks ([SOURCE LANGUAGE], [TARGET LANGUAGE]) below, or edit them after pasting.
- Copy the prompt, paste it into the chat and send.
Fill in the blanks (optional)
Prompt
Convert the attached code from [SOURCE LANGUAGE] to [TARGET LANGUAGE]. Write idiomatic [TARGET LANGUAGE]: use its standard library, naming conventions and error handling style. Keep behavior identical. List every place where the languages differ in a way that matters (integer division, null handling, async, string encoding) and how you handled it. Add a few tests that prove both versions agree.
One email a week
The Weekly is presented byyour brandSponsored · openThe best new prompts and personas, nothing else.