# package-json > Best practices for package.json configuration - Author: Veerapong - Repository: newkub/skills - Version: 20260202015439 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/newkub/skills - Web: https://mule.run/skillshub/@@newkub/skills~package-json:20260202015439 --- --- name: package-json description: Best practices for package.json configuration goal: ตั้งค่า package.json ตาม best practices outcome: package.json มีโครงสร้างและความถูกต้องตามมาตรฐาน --- # Package.json Configuration ## When to Apply ใช้ Skill นี้เมื่อตั้งค่า package.json - เมื่อสร้าง project ใหม่ - เมื่ออัปเดต dependencies - เมื่อเพิ่ม scripts - เมื่อ publish packages ## Rules | Priority | Impact | Reference | Name | Description | Prefix | Condition | | :--- | :--- | :--- | :--- | :--- | :--- | :--- | ## Knowledge | Reference | Name | Description | Prefix | | :--- | :--- | :--- | :--- | ## Overview ### Rules แต่ละไฟล์ Rule ประกอบด้วย: - เหตุผล (Why) - ตัวอย่างที่ไม่ดี (Anti-patterns) - ตัวอย่างที่ดี (Best practices) - กฎที่ต้องปฏิบัติตาม (Rules) - ผลกระทบถ้าไม่ทำตาม (Impact) - เอกสารอ้างอิง (References) ### Knowledge แต่ละไฟล์ Knowledge ประกอบด้วย: - Overview: ภาพรวมของ topic - Key Concepts: concepts สำคัญที่ต้องรู้ - Examples: ตัวอย่างการใช้งาน - Best Practices: best practices ที่ควรทำตาม - References: ลิงก์ไปยังแหล่งข้อมูลต้นฉบับ ## How to Use แต่ละไฟล์ Rule อธิบายถึง: - เหตุผลที่ต้องทำตามกฎ - ตัวอย่างที่ไม่ดีและดี - กฎที่ต้องปฏิบัติตาม - ผลกระทบถ้าไม่ทำตาม - เอกสารอ้างอิง แต่ละไฟล์ Knowledge อธิบายถึง: - ภาพรวมของ topic - Concepts สำคัญที่ต้องรู้ - ตัวอย่างการใช้งาน - Best practices ที่ควรทำตาม - เอกสารอ้างอิง ## References - [npm Documentation](https://docs.npmjs.com/)