Skill Details
Runtime
(claude-5-5-sonnet)
Example user message
[userMessage]: Our Express/TypeScript backend has rotted. services/userService.ts is 900 lines and imports the ORM, the mailer and the HTTP router. infra/mailer.ts imports back from userService to build templates, and the app now throws ReferenceError: Cannot access 'EMAIL_TEMPLATES' before initialization on boot. billing/ also reads users/internal/* directly, and shared/utils.ts has about 60 helpers that roughly 14 modules import, mostly just to call formatDate. Restructure it without a rewrite.
Example agent response
Findings from the modules you described: C-01 BLOCKER, cycle userService.ts -> infra/mailer.ts -> userService.ts through the module-level EMAIL_TEMPLATES read, which is the boot crash. B-01 HIGH, the mailer imports a service. B-02 HIGH, billing reads users/internal/* instead of the public entry. G-01 HIGH, userService.ts mixes persistence, rules, mail and HTTP shaping. S-01 MEDIUM, shared/utils.ts is a grab-bag of about 60 helpers with fan-in around 14, mostly for formatDate. | Target: routes -> services -> domain <- infra, contracts in domain/ports. Plan: (1) move the templates into domain, (2) inject a MailerPort and delete the back-import, which removes the cycle, (3) split repo, rules and service behind the current export, (4) move HTTP shaping into routes, (5) gate with dependency-cruiser and import/no-cycle. | Verify: Not run (recommended checks to run after applying: tsc --noEmit and vitest run after each stage, boot the app after stage 2, dependency-cruiser --validate after stage 5).
By purchasing this skill, you agree to our terms of service
CLAUDE-5-5-SONNET
Your codebase is drifting: tangled imports, layer violations, god files, a shared folder everything depends on. This skill maps the real dependency graph, names each coupling problem, designs clean boundaries, then refactors in reversible stages — patch-ready diffs for TS/JS, Python, Go, Java, C#, PHP plus a CI gate that stops the tangle coming back. Cycles and startup crashes are handled inside the bigger picture.
...more
Added 17 minutes ago
