Skip to main content
idapt
HomeCodeAI ModelsPricing
Sign inStart free
  • Home
  • Pricing
  • AI Models
  • Image models
  • Voice models
  • Video models
  • Rankings
  • New models
  • Model status
  • Multi-Model Chat
  • Voice Mode
  • Voice HUD
  • Web Search
  • Image Generation
  • Video Generation
  • Audio Generation
  • Transcription
  • Drive
  • Credentials
  • Sharing
  • Workspaces
  • Tasks
  • Memory
  • Agents
  • Subagents
  • Automations
  • Skills
  • idapt Code
  • Code Execution
  • Computers
  • Computer Use
  • Computer Assist · Soon
  • Containers
  • Cloud Computers
  • Local AI
  • AI Gateway
  • API & SDK
  • CLI
  • MCP
  • Tunnels
  • All features →
  • LLM cost calculator
  • Token counter
  • Context window checker
  • Can I run it
  • Model picker quiz
  • Savings finder
  • Video cost estimator
  • Text to speech cost
  • Transcription cost
  • API endpoint tester
  • All free tools →
  • Blog
  • Use cases
  • Comparisons
  • Best of
  • Skills
  • Learn
  • Changelog
  • Help center
  • FAQ
  • Privacy
  • Compare all models
  • Support
  • idapt Code
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Downloads
  • Desktop
  • Badges and embeds
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)
All skills
Code

Port legacy code

Rewrite it in a modern language and prove the behaviour is identical.

Fill it in

Where it is and what language.

The target language and runtime.

Run both against the same inputs and diff the outputs.

Your prompt

Port [the code] to [your to].

Build the equivalence harness BEFORE writing any of the new code: run both against
the same inputs and diff the outputs. Without it this is a rewrite with a hope
attached, and legacy code is full of behaviour nobody documented and everybody
depends on.
Preserve the bugs until someone decides otherwise. Rounding that is wrong by a
cent, a date boundary that is off by a day: those are load-bearing after twenty
years, and "fixing" them silently during a port is how a migration breaks a
reconciliation nobody was watching.

List every behaviour you found and could not explain. That list is the real
output, and it is what a domain expert needs to look at.

Match the structure to the target language rather than transliterating.
Use Port legacy codeOpens with everything above already filled in.

Why this works

Rounding that is wrong by a cent and a date boundary off by a day are load-bearing after twenty years, and fixing them silently during a port breaks a reconciliation nobody was watching. This builds the equivalence harness first and preserves the bugs until someone decides otherwise.

More code skills

  • idapt Code
  • Fix a failing test

Use it now in a chat in 1 click

Use Port legacy code
Fix a GitHub issue
  • Find security bugs
  • Ship a feature
  • Speed up slow code