Individual skill
refactor
Refactor code có hệ thống dựa trên phương pháp luận của Martin Fowler. Sử dụng khi người dùng yêu cầu refactor code, cải thiện cấu trúc code, giảm nợ kỹ thuật, dọn code legacy, loại bỏ code smells, hoặc cải thiện khả năng duy trì code. Skill này hướng dẫn qua cách tiếp cận theo từng giai đoạn với nghiên cứu, lập kế hoạch, và triển khai tăng dần an toàn.
vi/03-skills/refactor/SKILL.md
Source commit 2b530b767495815c7f53534bbb78f76b65c2e4a5
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 46,895
- Repository last updated
- Nov 3, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- claude-code Repository topic
- guide Repository topic
- tutorial Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
Read excerpt
# Code Refactoring Skill
Một cách tiếp cận có hệ thống để refactor code dựa trên *Refactoring: Improving the Design of Existing Code* (ấn bản 2) của Martin Fowler. Skill này nhấn mạnh các thay đổi tăng dần, an toàn được hỗ trợ bởi tests.
> "Refactoring là quá trình thay đổi một hệ thống phần mềm theo cách mà nó không làm thay đổi hành vi bên ngoài của code nhưng cải thiện cấu trúc nội bộ của nó." — Martin Fowler
## Nguyên Tắc Cốt Lõi
1. **Bảo Tồn Hành Vi**: Hành vi bên ngoài phải không thay đổi
2. **Các Bước Nhỏ**: Thực hiện các thay đổi nhỏ, có thể test
3. **Được Dẫn Bởi Test**: Tests là lưới an toàn
4. **Liên Tục**: Refactoring là liên tục, không phải sự kiện một lần
5. **Hợp Tác**: Cần sự chấp thuận của người dùng tại mỗi giai đoạn