Use Claude Code to refactor a monorepo in phases
A developer used Claude Code to swap tooling, reorganize features, and refresh a site by checking each step in a tight validation loop.
- What they did
- They had Claude Code work through a 7-app Cloudflare Workers monorepo with about 1,670 TypeScript files. In separate pull requests, it changed the linting and formatting stack from Biome to oxlint and oxfmt, then replaced tsc with tsgo. It also moved one frontend into feature-based modules from a spec the developer had written, and helped redesign the site using a maintained CLAUDE.md while the developer reviewed the output after each run of linting, type checking, tests, and builds.
- How it went
- After the tooling change, the combined lint and typecheck step went from 29.04 seconds to 1.25 seconds, roughly 23 times faster. The oxlint pull request affected more than 700 files. The site redesign finished in a couple of days instead of about two weeks.
- Tips
- Break big changes into small phases and keep each pull request atomic. Measure performance before and after, and only merge changes you can explain and verify.
Try it yourself with Claude Code
I want to update [repo path] in phases. First, propose a plan to switch [current lint/format tools] to [target tools], then refactor [architecture area] based on [spec or requirements], and finally adjust [site/design area]. After each small change, run [lint], [typecheck], [tests], and [build], show me the results, and stop for my approval before any irreversible step such as submitting, merging, deleting, or publishing. Keep each phase in a separate branch or pull request, and summarize exactly what changed before moving on.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Set up a Stripe-backed subscription app for families
Claude Code produced a working subscription app with login, billing, webhooks, portal access, and a dashboard from a staged prompt sequence.
Link Dots to your Claude Code workflow
They wired Dots into a live Claude Code setup so it could pass updates between several coding lanes, but the connection needed tuning.
Control Claude Code by voice while you work hands-free
A developer built a local spoken-command setup around Claude Code and used it to fix a WhatsApp integration without touching the keyboard.
Build Ansible with Cursor and keep lessons in CLAUDE.md
They used Cursor and Claude to write most Ansible code, while saving lessons and plans to files so the work could continue after compaction.
Set up Claude Code to manage Tangled issues
They built a Tangled MCP server so Claude Code could check branches and handle issues for repos in owner/repo form.
Set up Claude Code with project rules and logging
A developer paired with Claude Code on a Rust app, using a rules file and precise logs to guide planning, coding, testing, and debugging.