I’d like to share a success story about using Claude Code to modernize an older Plone codebase.
We manage and maintain a university’s internal procurement site, originally built in the early 2010s and running on Plone 4.3 for nearly a decade. Now, it’s time to migrate to the modern Plone 6.1 stack. As with any Plone migration, the key steps are:
- Upgrading the buildout and dependencies (including resolving outdated packages that haven’t been ported to Python 3).
- Migrating the codebase from Python 2 to Python 3.
- Applying standard Plone migration patterns, such as replacing
implements(SomeIFace)
with@implementer(SomeIFace)
, among others. - Ensuring a working buildout and successfully starting the application (even if empty) before proceeding with export-import migration using
collective.exportimport
.
Porting Python 2 code to Python 3 and adapting Plone patterns is often a mechanical, repetitive process—especially for applications built on Dexterity. While well-understood, it’s tedious and time-consuming, even with tools like 2to3
.
To streamline the migration, I explored AI-assisted code transformation. Traditional code assistants like ChatGPT and Copilot weren’t ideal, as they are designed for interactive, file-by-file editing within an IDE. That’s when we discovered Claude Code (by Anthropic), a command-line tool with an interactive mode for applying transformations across an entire codebase.
Using Claude Code, along with some traditional tools like 2to3
, we successfully migrated our application (which includes around 20 content types with complex business and validation logic) to a state where it could start under Plone 6.1. This allowed us to work with content types within the Plone UI—achieved in just half a day, a fraction of the time manual migration would have taken. The benefits were clear: faster turnaround, reduced frustration, and minimized repetitive coding work.
Cost and Challenges
Claude Code isn’t cheap; executing a single prompt across the entire codebase typically took 1–2 minutes, indicating resource-intensive processing. The total cost came to about $15, which, given the time and effort saved, was a worthwhile investment.
However, it wasn’t perfect—we occasionally had to manually fix or revert some changes due to overly broad prompts. Despite this, the experience was overwhelmingly positive, demonstrating the potential of AI-driven code migration.
Disclaimer: the wording has been slightly adjusted and corrected using ChatGPT