ts-shove – AST Refactoring Skill for AI Coding Agents
Last updated:
Automatically generated image description
This conceptual diagram illustrates a TypeScript file restructuring process named 'ts-shove' by Alexander Fürst. It shows a 'Before' state on the left with a dark background, listing a file structure under 'src/' with 'components/ProjectCard.tsx' and 'pages/index.tsx', and an import statement referencing '../components/ProjectCard'. On the right, the 'After' state on a white background shows the file moved to 'features/projects/ProjectCard.tsx' with the import path updated accordingly. An arrow labeled 'AST-backed batch move' points from before to after, with notes on updating paths, rewriting imports, and checking conflicts. The overall color scheme is muted green and dark blue on a light background.
My role: Solo delivery
Inside the work
Why an agent skill
ts-shove was built first as a tool for AI coding agents. An agent can decide how to restructure a codebase, then express the operation through an explicit batch manifest instead of repairing every import with ad hoc text edits. The owner uses it actively and reports that it makes TypeScript file moves much easier.
AST-backed batch moves
The engine uses ts-morph and the selected tsconfig to analyse module relationships. It supports file and directory moves, re-exports, dynamic imports and require calls. Alias behavior is configurable: preserve existing aliases, prefer aliases when possible, or use relative paths. Dry-run conflict checks and Git integration make the intended changes inspectable. The same engine is available through a CLI and a programmatic API.
Project facts & technologies
Scale & delivery
- Team size
- 1 personRecorded project context
- Complexity
- 3 / 5Assessment
- Effort
- 3–10 person-daysEstimated rebuild, not historical time spent
- Codebase size
- 1,139 source linesInspected source; may include team and inherited code
Working pattern: Evenings & weekends
Code measured 2026-11-17. Excludes comments, blanks and dependencies; test code counted separately.