re-create
Skill này làm gì
Công cụ này xóa hoàn toàn một file hoặc đoạn code và viết lại từ đầu. Chỉ nên dùng khi code quá rối để sửa từng phần.
Khi nào nên dùng
- ✓Khi code quá rối và sửa chỉ làm mọi thứ tệ hơn.
- ✓Khi code cũ không còn hoạt động và cần làm lại hoàn toàn.
- ✓Khi duy trì code hiện tại tốn quá nhiều thời gian và công sức.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/re-create/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Xóa và viết lại file “calculator.js” vì nó có lỗi cấu trúc nghiêm trọng và tôi không thể sửa được nữa.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Trước tiên, AI giải thích vì sao việc sửa không còn là lựa chọn và liệt kê mọi thứ cần giữ lại. Sau đó, khi có sự đồng ý của bạn, nó xóa code cũ và viết code mới, đảm bảo mọi thứ quan trọng vẫn hoạt động.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
re-create — Controlled Erasure & Rebuild Protocol
Overview
Hollow Purple is Gojo's most destructive technique — blue and red combined into total erasure of the target. But Gojo doesn't use it carelessly. He knows exactly what he's erasing and why. Same here: this skill is the nuclear option, invoked only when patching is the wrong call, executed with full control over what gets erased and what must survive.
Rewrites are dangerous not because rebuilding is hard, but because it is easy to silently erase behavior that was working and expected. This skill enforces a complete inventory of what must survive before a single line is deleted, and a full verification that everything survived after the rebuild.
When to Use This Skill
- Use when a file, module, or component needs to be completely deleted and rewritten from scratch
- Use when structural rot is so deep that individual fixes would only make it worse
- Use when accumulated technical debt makes the code unmaintainable
- Use when the target is fundamentally broken and beyond saving
- DO NOT use for partial refactors, single-function fixes, or targeted edits
How It Works
PHASE 1 — Justify the Erasure
The AI must prove that a full rewrite is necessary. It must answer all of the following:
- What specifically is broken or unsalvageable?
- Not "it's messy" — specific structural problems that make targeted fixes impossible or counterproductive
- Why would targeted edits make things worse, not better?
- Patching on top of rot, compounding complexity, architectural mismatch
- What is the concrete cost of keeping the current implementation?
- Maintenance burden, bug surface, performance, developer velocity
If the AI cannot clearly answer all three, it must fall back to targeted edits instead of a rewrite. A rewrite is not a reward for messy code — it is a last resort.
The bar is high. "This code is ugly" does not justify hollow purple. "The architecture assumes X but the system now requires Y and every patch makes the mismatch worse" does.
PHASE 2 — Read the Target Completely
Before proposing deletion, the AI must read the entire target (file, module, or component) in full.
The AI must identify and catalog:
- Public interfaces — functions, classes, types, or exports that other parts of the codebase call
- Implicit contracts — behaviors that other files depend on even if not formally typed
- Working behaviors — things the current implementation does correctly that must continue to work
- Non-obvious logic — edge cases, guards, or special handling that looks incidental but is intentional
- Blast radius — every file in the codebase that imports from or depends on the target
The AI cannot skip this phase even if it has read the file before. The purpose is not familiarity — it is building the Preservation List.
PHASE 3 — Erasure Declaration (User Must Confirm)
The AI outputs a complete erasure plan and waits for user confirmation before deleting or writing anything.
HOLLOW PURPLE — ERASURE PLAN
─────────────────────────────────────────
TARGET FOR ERASURE:
[file path or module name]
WHY TARGETED FIXES ARE WRONG:
[specific justification — architectural rot, fundamental mismatch, etc.]
PRESERVATION LIST (must survive the rewrite):
- [public interface / export 1] → [what it does, who depends on it]
- [public interface / export 2] → [what it does, who depends on it]
- [working behavior 1] → [what it does, why it must be kept]
- [non-obvious logic 1] → [what it guards against]
BLAST RADIUS (files that depend on the target):
- [file path] → depends on [what specifically]
- [file path] → depends on [what specifically]
NEW IMPLEMENTATION PLAN:
[Description of what the rebuild will look like — structure, approach, key decisions]
WHAT WILL NOT BE PRESERVED:
[Anything intentionally dropped and why — dead code, deprecated behavior, etc.]
─────────────────────────────────────────
Confirm to proceed with erasure and rebuild.
Nothing is deleted until the user explicitly confirms. A reply of "yes", "confirmed", "do it", or equivalent counts. Silence does not.
PHASE 4 — Controlled Erasure
User confirms → the target is deleted. Rules for this phase:
- Delete cleanly. Not commented out, not renamed to
_old, not archived in place — deleted.
…
Câu hỏi thường gặp
Khi nào tôi KHÔNG nên dùng công cụ này?
Đừng dùng cho các sửa lỗi nhỏ, thay đổi một hàm hoặc cải tiến đơn giản. Chỉ dùng như giải pháp cuối cùng.
AI có xóa mọi thứ mà không hỏi không?
Không. AI sẽ cho bạn xem kế hoạch chi tiết về những gì sẽ bị xóa và những gì được giữ lại, và bạn phải xác nhận trước khi thực hiện.
Điều gì xảy ra sau khi AI viết lại code?
AI kiểm tra xem mọi thứ quan trọng còn hoạt động không, và các file khác dùng code cũ có còn dùng được code mới mà không gặp lỗi không.
Chi tiết
Mô tả gốc của tác giả
Completely delete and rewrite a file or module from scratch when structural rot makes patching impossible.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5572
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.