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
Automate a self-hosted stack on your own hardware
Jordan Fulghum let Claude Code configure and run several home services on a Beelink mini PC.
Draft PR reviews, then send them yourself
They used Claude Code to prepare GitHub review drafts for queued pull requests, while keeping final edits and submission under their control.
Build a plain-English Canvas course manager
A non-developer educator used Claude Code to make a Canvas tool that handles course lookup, submissions, forums, announcements, and gradebook export.
Monitor account caps and move chats across tools
teivz built a local app that watches Codex and Claude Code account usage and shifts a chat to another account when one reaches its cap.
Use Claude Code to maintain NixOS server configs
A developer uses Claude Code to edit one NixOS config repo for several self-hosted machines, then reviews the diff and applies changes by hand.
Use Claude Code from a phone with a remote VM
They accessed Claude Code on an iPhone by pairing a Tailscale-only Vultr VM with Termius, mosh, and tmux.