From mattpocock-skills
สร้างแผน refactor แบบละเอียดที่ซอยเป็น commit เล็ก ๆ ผ่านการสัมภาษณ์ user แล้วเปิดเป็น GitHub issue ใช้เมื่อ user อยากวางแผน refactor สร้าง refactoring RFC หรือแตก refactor ออกเป็นขั้นเล็ก ๆ ที่ปลอดภัย
How this skill is triggered — by the user, by Claude, or both
Slash command
/mattpocock-skills:request-refactor-planThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
skill นี้จะถูกเรียกเมื่อ user อยากสร้างคำขอ refactor ให้ทำตามขั้นตอนด้านล่าง จะข้ามขั้นตอนที่เห็นว่าไม่จำเป็นก็ได้
skill นี้จะถูกเรียกเมื่อ user อยากสร้างคำขอ refactor ให้ทำตามขั้นตอนด้านล่าง จะข้ามขั้นตอนที่เห็นว่าไม่จำเป็นก็ได้
ขอให้ user อธิบายปัญหาที่อยากแก้แบบยาวและละเอียด รวมถึงไอเดียแนวทางแก้ที่อาจเป็นไปได้
สำรวจ repo เพื่อยืนยันสิ่งที่ user เล่ามา และทำความเข้าใจสถานะปัจจุบันของ codebase
ถามว่าเขาเคยพิจารณาทางเลือกอื่นหรือยัง และนำเสนอทางเลือกอื่น ๆ ให้เขาดู
สัมภาษณ์ user เรื่อง implementation ให้ละเอียดและถี่ถ้วนสุด ๆ
เคาะขอบเขตที่แน่นอนของ implementation ตกลงให้ชัดว่าตั้งใจจะเปลี่ยนอะไรและตั้งใจจะไม่เปลี่ยนอะไร
เข้าไปดูใน codebase ว่าบริเวณนี้มี test coverage แค่ไหน ถ้า coverage ไม่พอ ให้ถาม user ว่ามีแผนเรื่องการ test ยังไง
แตก implementation ออกเป็นแผนของ commit เล็กจิ๋ว ๆ จำคำแนะนำของ Martin Fowler ที่ว่า "ทำแต่ละขั้นของการ refactor ให้เล็กที่สุดเท่าที่จะเล็กได้ เพื่อให้เห็นโปรแกรมยังทำงานได้อยู่เสมอ"
สร้าง GitHub issue พร้อมแผน refactor ใช้ template ต่อไปนี้สำหรับ description ของ issue:
ปัญหาที่ developer กำลังเจอ เล่าจากมุมมองของ developer
วิธีแก้ปัญหา จากมุมมองของ developer
แผน implementation แบบยาวและละเอียด เขียนแผนเป็นร้อยแก้วธรรมดา โดยแตก implementation ออกเป็น commit ที่เล็กที่สุดเท่าที่จะทำได้ แต่ละ commit ต้องทิ้ง codebase ไว้ในสถานะที่ยังทำงานได้
รายการการตัดสินใจด้าน implementation ที่เกิดขึ้น ซึ่งอาจรวมถึง:
ห้ามใส่ file path หรือ code snippet แบบเจาะจง เพราะพวกมันอาจล้าสมัยเร็วมาก
รายการการตัดสินใจด้านการ test ที่เกิดขึ้น ให้ใส่:
คำอธิบายสิ่งที่อยู่นอกขอบเขตของการ refactor นี้
โน้ตอื่น ๆ เกี่ยวกับการ refactor นี้
Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Synthesizes the current conversation into a structured spec (PRD) and publishes it to the project issue tracker with a ready-for-agent label, without interviewing the user.
npx claudepluginhub boom-vitt/skills-thai