แก้ปัญหาคำแนะนำเกี่ยวกับเว็บสมัยใหม่

แม้ว่า Modern Web Guidance จะมุ่งเน้นที่การพัฒนาไปสู่แนวทาง "ถูกต้องโดยค่าเริ่มต้น" แต่คุณอาจพบปัญหาเกี่ยวกับการเปิดใช้งาน Agent, ความถูกต้องของการติดตั้งใช้งาน หรือการค้นพบฟีเจอร์เป็นครั้งคราว ส่วนนี้จะแสดงขั้นตอนการวินิจฉัยเพื่อช่วยคุณแก้ปัญหาที่พบได้ทั่วไป เช่น การตรวจสอบว่าพรอมต์ของคุณทริกเกอร์ทักษะ Modern Web อย่างถูกต้อง หรือการยืนยันว่าโค้ดสำรองสอดคล้องกับสถานะ Baseline ที่กำหนดไว้ของโปรเจ็กต์ หากพบอุปสรรคทางเทคนิคที่เกิดขึ้นอย่างต่อเนื่องหรือพบคำแนะนำที่ล้าสมัย เราขอแนะนำให้คุณแจ้งปัญหาเพื่อช่วยให้เราดูแลแหล่งข้อมูลเหล่านี้ให้ถูกต้องและมีประสิทธิภาพอยู่เสมอ

วินิจฉัยสาเหตุที่ตัวแทนไม่ใช้ Modern Web Guidance

เมื่อติดตั้ง Modern Web Guidance แล้ว ระบบจะแนะนำให้ Agent ใช้เครื่องมือนี้สำหรับงานพัฒนาเว็บทั้งหมด อย่างไรก็ตาม บางครั้ง Agent อาจละเลยวิธีการเหล่านี้

คุณสามารถสั่งให้ Agent ใช้ Modern Web Guidance อย่างชัดเจนได้โดยเพิ่มวลีอย่าง "ใช้คำแนะนำในการพัฒนาเว็บที่ทันสมัย" ต่อท้ายพรอมต์

นอกจากนี้ ตัวแทนบางรายยังรองรับการเรียกใช้ทักษะโดยตรงโดยใช้ไวยากรณ์เฉพาะ เช่น /modern-web-guidance หรือ $modern-web-guidance ทั้งนี้ขึ้นอยู่กับตัวแทน

โปรดดูเอกสารประกอบของ Agent หรือสอบถาม Agent เกี่ยวกับวิธีเรียกใช้ทักษะ modern-web-guidance โดยตรงหากไม่แน่ใจ

วิเคราะห์โค้ดที่ "หลอน" หรือการติดตั้งใช้งานที่คาดเดา

กรณีนี้เป็นเหตุการณ์ที่พบบ่อยซึ่ง LLM จะเติมช่องว่างของความรู้โดยไม่มีคำเตือน เราพบว่าการเพิ่มคำสั่งต่อไปนี้ต่อท้ายพรอมต์มีประโยชน์อย่างมากในการป้องกันไม่ให้ Agent สร้างข้อมูลขึ้นมาเอง

Bring up knowledge gaps and don't attempt to guess implementation. List them as open questions.

วิเคราะห์สาเหตุที่ทริกเกอร์คำแนะนำที่เฉพาะเจาะจงไม่สำเร็จ

หากคุณกำหนดเป้าหมาย Use Case ของฟีเจอร์ที่เฉพาะเจาะจงและไม่เห็นว่า Agent ค้นพบฟีเจอร์ดังกล่าว ให้ตรวจสอบว่าพรอมต์มีคีย์เวิร์ดที่เฉพาะเจาะจงและข้อกำหนด Anchor เพื่อให้ค้นพบได้อย่างเหมาะสม ซึ่งจะช่วยให้ Agent ระบุเส้นทางคำแนะนำที่เกี่ยวข้องได้ (เช่น "การเปลี่ยนมุมมอง", "การเพิ่มประสิทธิภาพ LCP")

ติดตามกระบวนการคิดของ Agent

  • ตรวจสอบเอาต์พุตเพื่อดูว่ามีการเรียกใช้ทักษะ modern-web-guidance หรือไม่
  • ค้นหาการเรียกใช้การค้นหา เช่น npx -y modern-web-guidance@latest search "carousel scroll snap" และระบุว่าคีย์เวิร์ดและคำแนะนำที่ได้เป็นไปตามที่คาดไว้หรือไม่
  • ตรวจสอบว่าการเรียกข้อมูลได้ขอคำแนะนำที่เกี่ยวข้อง เช่น npx -y modern-web-guidance@latest retrieve "carousel-snap-highlights,carousel-slide-effects,scroll-snap-state-sync"
Create a new folder and create a carousel web app for me that implements scroll-snap.

...

● Bash(npx -y modern-web-guidance@latest search "carousel scroll snap" --skill-version 2026_05_16-c5e7870)
  ⎿  [{"id":"carousel-snap-highlights","description":"Visually highlight the currently snapped non-interactive item in scroll-snapping carousels, galleries, or full-page swipe experiences. For example, expanding a card when snapped, or revealing hidden
      content.","category":"user-experience","featuresUsed":["Container scroll-state queries"],"tokenCount":1442,"similarity":0.7783},
      {"id":"carousel-slide-effects","description":"Create a carousel of slides with images or other visual elements, where each slide animates as they enter/center/exit their scroller. For example, the slides may fade-in/fade-out, rotate, get bigger or smaller,
      etc.","category":"user-experience","featuresUsed":["Scroll-driven animations","Scroll snap"],"tokenCount":2105,"similarity":0.6625},
      {"id":"scroll-snap-state-sync","description":"Synchronize navigation indicators, linked content panels, and analytics tracking with the actively snapped item in a scrollable container.","category":"user-experience","featuresUsed":["Scroll snap events","Scroll
      snap"],"tokenCount":1053,"similarity":0.6166},
      {"id":"scroll-snap-realtime-feedback","description":"Provide real-time visual feedback in linked UI elements while a user scrolls through snap-aligned content, before the scroll gesture completes.","category":"user-experience","featuresUsed":["Scroll snap events","Scroll
      snap"],"tokenCount":1886,"similarity":0.5664},
      {"id":"navigation-drawer","description":"Create a navigation drawer component that, when triggered from a menu button, slides in from the side overlayed on top of existing page content, and slides out when dismissed (by swiping away, tapping outside, or pressing
      escape).","category":"user-experience","featuresUsed":["inert","Intersection observer","Popover","Registered custom properties","Scroll-driven animations","scroll-initial-target","Scroll snap"],"tokenCount":4317,"similarity":0.5099}]

● Bash(npx -y modern-web-guidance@latest retrieve "carousel-snap-highlights,carousel-slide-effects,scroll-snap-state-sync")
  ⎿  <output +158 lines>
            }, undefined);
            if (topEntry) setSelectedParagraph(topEntry.id);
          },
          { root: main, threshold: 0.9 // Adjust based on your use case },
        );
        // Observe all snap targets (e.g., section headers)
        document.querySelectorAll('h2').forEach(header => observer.observe(header));
      }
  • นอกจากนี้ คุณยังเรียกใช้คำสั่งค้นหาด้วยตนเองในเทอร์มินัลเพื่อดูว่าคำแนะนำใดตรงกับคำค้นหาของคุณได้ด้วย
# Search for relevant guides
npx modern-web-guidance@latest search "carousel scroll snap"

ความคิดเห็น

หากมีคำถามหรือความคิดเห็นเพิ่มเติมเกี่ยวกับฟีเจอร์ใหม่เหล่านี้ โปรดอ่านวิธีมีส่วนร่วมกับ Modern Web Guidance ก่อนที่จะรายงานปัญหาในที่เก็บ GitHub ของเรา ขณะสร้างปัญหา ให้ระบุพรอมต์เริ่มต้นของ Agent, ภาพหน้าจอและบันทึกกระบวนการคิดของ Agent รวมถึงการเปลี่ยนแปลงโค้ดขั้นสุดท้ายที่แนะนำตามการคิดนั้น