dot_claude/skills/rewrite/SKILL.md
Use when evaluating whether a project, feature, module, or component should be replaced by a ground-up design before implementation; trigger when incremental fixes seem structurally inadequate.
npx skillsauth add nijaru/dotfiles rewriteInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Rewrite is an investigation, not an implementation. It asks whether the current design should be replaced and what the replacement would look like. If behavior should stay the same, use refactor. If a completed first pass should be redone with better hindsight, use second-pass.
| Signal | Implication | | :--- | :--- | | Core data model does not match the problem | Strong rewrite case | | Correctness requires breaking the public API | Strong rewrite case | | Performance requires a different algorithm or ownership model | Strong rewrite case | | Complexity is mostly duplicated or poorly named code | Refactor instead | | First pass works but is discovery-shaped | Second-pass instead |
Report the current-state verdict, constraint check, ideal design sketch, gap analysis, and rewrite case. Save to ai/design/<feature>.md only when the project uses ai/ context and the result will guide future work.
| Excuse | Reality | | :--- | :--- | | "I already know it needs a rewrite." | Prove the current design is structurally wrong before replacing it. | | "We can decide while implementing." | Rewrite decisions are design decisions; investigate first. | | "This is just a big refactor." | If the data model, API, or architecture changes, call it a rewrite investigation. |
development
Use after completing a bug fix, feature, refactor, or tk task when the first implementation taught enough context to replace it with a simpler, cleaner, or more coherent version before finalizing.
development
Use when writing, migrating, or reviewing Zig code across recent stable versions (0.14-0.16), especially to correct stale syntax or stdlib, build.zig, allocator, formatting, or runtime API knowledge.
documentation
Use when reviewing or revising text (prose, docs, commits) to remove AI patterns and improve voice/clarity.
content-media
Use when fetching X/Twitter post content by URL, or searching for recent X posts.