Chuyển đến nội dung
Skillpedia
Lập trình chung48k · #4200

codebase-cleanup-refactor-clean

Skill này làm gì

Công cụ này giúp cải thiện chất lượng code lập trình. Nó phân tích code và đề xuất thay đổi để code dễ hiểu, dễ bảo trì và nhanh hơn.

Khi nào nên dùng

  • ✓Khi code của bạn ngày càng lớn và rối.
  • ✓Để loại bỏ các phần lặp lại và đơn giản hóa các đoạn code.
  • ✓Trước khi thêm tính năng mới vào dự án.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/codebase-cleanup-refactor-clean/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/codebase-cleanup-refactor-clean/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Giúp tôi dọn dẹp và tái cấu trúc đoạn code Python này để dễ đọc hơn.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI xem xét code của bạn để tìm các vấn đề thường gặp và đề xuất cải thiện. Nó tập trung làm code rõ ràng và ổn định hơn, theo các thực hành lập trình tốt.

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.

Refactor and Clean Code

You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.

Use this skill when

  • Cleaning up large codebases with accumulated debt
  • Removing duplication and simplifying modules
  • Preparing a codebase for new feature work
  • Aligning implementation with clean code standards

Do not use this skill when

  • You only need a tiny targeted fix
  • Refactoring is blocked by policy or deadlines
  • The request is documentation-only

Context

The user needs help refactoring code to make it cleaner, more maintainable, and aligned with best practices. Focus on practical improvements that enhance code quality without over-engineering.

Requirements

$ARGUMENTS

Instructions

  • Identify high-impact refactor candidates and risks.
  • Break work into small, testable steps.
  • Apply changes with a focus on readability and stability.
  • Validate with tests and targeted regression checks.
  • If detailed patterns are required, open resources/implementation-playbook.md.

Safety

  • Avoid large rewrites without agreement on scope.
  • Keep changes reviewable and reversible.

Output Format

  • Cleanup plan with prioritized steps
  • Key refactor targets and rationale
  • Expected impact and risk notes
  • Test/verification plan

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Câu hỏi thường gặp

“Refactor” nghĩa là gì?

Refactor là viết lại một phần code để cải thiện nó mà không thay đổi chức năng. Giống như sắp xếp lại một ngăn kéo lộn xộn để mọi thứ dễ tìm hơn.

“Nguyên tắc code sạch” là gì?

Đây là các quy tắc và hướng dẫn giúp viết code dễ đọc và dễ hiểu, giống như một câu chuyện được kể rõ ràng.

AI có viết lại toàn bộ code của tôi không?

Không, AI chỉ đề xuất các thay đổi có trọng tâm để cải thiện chất lượng. Việc viết lại lớn chỉ xảy ra khi bạn đồng ý và đã lên kế hoạch.

Chi tiết

Mô tả gốc của tác giả

You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4200
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự