diff --git a/skills/website-creator/SKILL.md b/skills/website-creator/SKILL.md index 044e8bd..44279d9 100644 --- a/skills/website-creator/SKILL.md +++ b/skills/website-creator/SKILL.md @@ -167,56 +167,247 @@ export const schema = defineSchema({ ## Workflow A: สร้างเว็บใหม่ -### Step 1: Pre-Project Questions +> ⚠️ **สำคัญ: ต้องวางแผนก่อน + รอ approve ก่อนทำงานเสมอ** +> +> ขั้นตอน: Context → Design → Plan → Approve → Execute -ใช้ `references/questions.md` เป็นแนวทาง: +--- +### Phase 1: Context Gathering (ถามให้ครบ) + +**ใช้ `references/questions.md` เป็นแนวทาง แต่ต้องถามให้ลึกกว่า surface level:** + +#### 1.1 ข้อมูลพื้นฐาน ``` 1. ชื่อเว็บไซต์/บริษัท? 2. ทำอะไร? (ขายอะไร/ให้บริการอะไร) 3. กลุ่มเป้าหมายคือใคร? 4. มีเว็บอยู่แล้วหรือยัง? -5. ชอบสี/ดีไซน์แบบไหน? -6. มี logo file ไหม? -7. ต้องการหน้าอะไรบ้าง? -8. มี SMTP/email สำหรับส่งเมลไหม? -9. มี GA4/Marketing tools ไหม? -10. มี DPO หรือยัง? +``` + +#### 1.2 Brand Context (ทำให้ต่างจากคนอื่น) +``` +5. ทำไมลูกค้าควรเลือกคุณ ไม่ใช่คู่แข่ง? +6. มี brand story หรือ positioning อะไรที่ต้องสื่อสาร? +7. มี tone of voice หรือ personality อย่างไร? (เช่น: friendly, professional, bold, playful) +``` + +#### 1.3 Design Context +``` +8. มี brand guidelines/logo file ไหม? +9. มี reference sites ที่ชอบ/ไม่ชอบบ้างไหม? (ส่งลิงก์มาได้) +10. มีสีที่ต้องใช้/ห้ามใช้บ้างไหม? +``` + +#### 1.4 Technical Context +``` +11. ต้องการหน้าอะไรบ้าง? (sitemap) +12. มี SMTP/email สำหรับส่งเมลไหม? +13. มี tracking tools ต้องติดตั้งไหม? (GA4, Facebook Pixel, etc.) +14. มี DPO หรือยัง? (สำหรับ PDPA) ``` --- -### Step 2: Plan Sitemap + Content Structure +### Phase 2: Creative Design (บังคับต้องทำ) -**เรียก skill: `spec-driven-development`** — เขียน SPEC.md ก่อนลงมือทุกครั้ง +**เรียก skills: `ckm:design` + `ui-ux-pro-max` + `frontend-ui-engineering`** -แสดง sitemap ให้ user ดูก่อนเสมอ รอ approve ก่อนลงมือ: +#### 2.1 สร้าง Creative Brief + +ก่อนสร้าง design ต้องมี creative brief ที่ชัดเจน: ``` -/ # Home -/about # About Us -/services # Services overview -/contact # Contact + Form -/blog # Blog listing (ถ้ามี) -/blog/[slug] # Individual blog post -/privacy-policy # PDPA Privacy Policy -/terms-of-service # PDPA Terms of Service +# Creative Brief + +## Brand Essence +- ชื่อ/บริษัท: [ชื่อ] +- สิ่งที่ทำ: [บริการ/สินค้า] +- ทำไมต่าง: [unique selling point] + +## Target Emotion +- ต้องการให้คนเข้าเว็บแล้วรู้สึก: [เช่น มั่นใจ, สบายใจ, ตื่นเต้น, ไว้วางใจ] + +## Design Direction +- ห้ามใช้: [สี/รูปแบบที่ไม่ชอบ] +- อาจใช้: [สี/รูปแบบที่ชอบ] +- References: [ลิงก์ที่ชอบ/ไม่ชอบ] +``` + +#### 2.2 สร้าง 2-3 Creative Directions ที่ต่างกันจริงๆ + +**ใช้ `ckm:design` + `ui-ux-pro-max` สร้าง options ที่แตกต่างกัน:** + +``` +Direction A: "[Name]" +- Concept: [แนวคิดหลัก] +- Visual Style: [ลักษณะ visuals] +- Color Palette: [โทนสี] +- Typography: [แบบอักษร] +- Layout Character: [โครงสร้าง layout ที่เป็นเอกลักษณ์] + +Direction B: "[Name]" +- Concept: [แนวคิดหลัก - ต่างจาก A] +- Visual Style: [ลักษณะ visuals - ต่างจาก A] +- Color Palette: [โทนสี - ต่างจาก A] +- Typography: [แบบอักษร - ต่างจาก A] +- Layout Character: [โครงสร้าง layout - ต่างจาก A] +``` + +#### 2.3 Present + Wait for Selection + +**นำเสนอ directions ทั้งหมด แล้วรอ user เลือก** + +--- + +### Phase 3: Master Plan (วางแผนทั้งหมด) + +**เรียก skill: `spec-driven-development`** + +สร้าง master plan ที่รวมทุกอย่าง: + +``` +# Master Plan: [ชื่อเว็บ] + +## Selected Design Direction +[Direction ที่ user เลือกพร้อม rationale] + +## Sitemap +/ +├── home +├── about +├── services +├── contact +└── ... + +## Design System +- Colors: [hex codes] +- Typography: [fonts + weights] +- Components: [list] +- Layout Patterns: [descriptions] + +## Content Structure (Tina CMS) +- Collections: [posts, pages, etc.] +- Fields: [schema] + +## Technical Stack +- Framework: Astro 6 +- CMS: Tina CMS +- Styling: Tailwind CSS v4 +- Consent: ConsentOS + +## Tracking Scripts +- Analytics: [tools] +- Marketing: [tools] + +## PDPA Compliance +- Privacy Policy +- Terms of Service +- ConsentOS Integration + +## Development Phases +1. [Phase 1: Setup + Design Foundation] +2. [Phase 2: Build Pages] +3. [Phase 3: Content + QA] +4. [Phase 4: Deploy] + +## Timeline +- Phase 1: X days +- Phase 2: X days +- Phase 3: X days ``` --- -### Step 3: Design Framework +### ⏸️ APPROVAL GATE -**เรียก skills: `ckm:design` + `frontend-ui-engineering` + `ckm:ui-styling` + `ui-ux-pro-max`** +**หยุดที่นี่ - รอ APPROVE ก่อนทำงาน** -ขั้นตอน: -1. ถามว่ามี brand guidelines หรือ reference ไหม -2. ถ้าไม่มี → ถาม 2 คำถาม: - - ชอบ dark mode ไหม หรือ light mode อย่างเดียว? - - ชอบ style แบบไหน: minimal, bold, creative? -3. ใช้ `ckm:design` เพื่อสร้าง design system -4. ใช้ `ui-ux-pro-max` เพื่อออกแบบ wireframes -5. ใช้ `ckm:ui-styling` เพื่อสร้าง components +แสดง: +1. Design direction ที่เลือก (screenshot/mockup) +2. Sitemap ที่จะสร้าง +3. Tech stack summary +4. Timeline estimate + +**รอ user พิมพ์ "approve" หรือ "เริ่มได้" ก่อนไปต่อ** + +--- + +### Phase 4: Execution (เริ่มทำหลัง APPROVE) + +**หลังได้รับ approve แล้ว ทำตามแผนที่ approve โดยไม่ต้องถามต่อ** + +#### Phase 4.1: Setup + Design Foundation + +```bash +bash skills/website-creator/scripts/new-project.sh my-website +``` + +จากนั้น implement design system ที่ approve: +- Colors ใน Tailwind theme +- Typography +- Base components +- Layout patterns + +#### Phase 4.2: Build Pages + +Implement ทุก pages ตาม sitemap ที่ approve แล้ว + +#### Phase 4.3: Content + Integration + +- Tina CMS setup + content schema +- Legal pages (Privacy Policy, ToS) +- ConsentOS integration +- Tracking scripts + +#### Phase 4.4: QA + Deploy + +ตาม Step 9-10 ด้านล่าง + +--- + +### Step 9: Preview + QA + +```bash +npm run dev +``` + +**ก่อน QA — เรียก skills ตามลำดับ:** + +1. **`code-review-and-quality`** — Full multi-axis code review ก่อน delivery +2. **`performance-optimization`** — Performance audit + fixes +3. **`browser-testing-with-devtools`** — ทดสอบใน real browser + +**จากนั้นเรียก `dogfood` สำหรับ exploratory QA:** + +```bash +/skill dogfood +"ทดสอบ user journey: + 1. ดู home page → คลิก services + 2. ดู about us + 3. กรอก contact form + 4. ทดสอบ consent popup (ConsentOS) + 5. ตรวจ PDPA compliance (privacy policy, terms) + 6. ตรวจ mobile responsive + 7. ตรวจ SEO meta tags ทุกหน้า" +``` + +ให้ user ตรวจสอบ → รอ feedback → แก้ไข → รอ approve + +--- + +### Step 10: Deploy + +**เรียก skill: `easypanel-deploy` เมื่อ user ขอ** + +```bash +/skill easypanel-deploy +"deploy ไปยัง easypanel server + server: openclaw-vps + project: my-website + domain: example.com + git repo: https://github.com/user/my-website" +``` --- @@ -625,7 +816,7 @@ npm run dev 1. ดู home page → คลิก services 2. ดู about us 3. กรอก contact form - 4. ทดสอบ cookie consent popup + 4. ทดสอบ consent popup (ConsentOS) 5. ตรวจ PDPA compliance (privacy policy, terms) 6. ตรวจ mobile responsive 7. ตรวจ SEO meta tags ทุกหน้า" @@ -715,7 +906,7 @@ bash skills/website-creator/scripts/migrate-tina.sh /path/to/existing-site /path | `payload.find()` | Astro content collections | | `RichText` component | MDX files | | `payload.config.ts` collections | `.tina/schema.ts` collections | -| MongoDB/PostgreSQL | Astro DB (built-in) | +| MongoDB/PostgreSQL | ConsentOS (external) | | `/admin` | `/admin` (Tina visual editor) | | Payload Auth | Tina Auth (optional) | diff --git a/skills/website-creator/references/questions.md b/skills/website-creator/references/questions.md index 28009d1..f433646 100644 --- a/skills/website-creator/references/questions.md +++ b/skills/website-creator/references/questions.md @@ -1,8 +1,9 @@ # Pre-Project Questions -## คำถามก่อนเริ่มโปรเจค +## Creative Brief Questions ใช้เป็นแนวทางถามคำถามลูกค้าก่อนเริ่มสร้างเว็บไซต์ +เน้นว่า "ทำไม" ไม่ใช่แค่ "ทำอะไร" --- @@ -19,57 +20,63 @@ --- -## 2. กลุ่มเป้าหมาย +## 2. ทำไมต่างจากคนอื่น? -2.1 **กลุ่มลูกค้าเป้าหมาย** +2.1 **ทำไมลูกค้าควรเลือกคุณ ไม่ใช่คู่แข่ง?** + - คู่แข่งของคุณคือใครบ้าง? + - คุณต่างจากเขาอย่างไร? + +2.2 **มี brand story หรือ origin story อะไรที่น่าสนใจไหม?** + - ทำไมถึงเริ่มทำสิ่งนี้? + - มีจุดเริ่มต้นที่น่าสนใจไหม? + +2.3 **มี values หรือ beliefs อะไรที่คุณยึดถือไหม?** + - สิ่งที่คุณทำ/ไม่ทำเพราะอะไร? + +--- + +## 3. กลุ่มเป้าหมาย + Emotions + +3.1 **กลุ่มลูกค้าเป้าหมาย** - อายุ, เพศ, อาชีพ - - พฤติกรรมการใช้ internet - - ปัญหาที่ต้องการแก้ไข + - Pain points หลักของพวกเขาคืออะไร? + - พวกเขากำลัง looking for อะไรอยู่? -2.2 **ต้องการเข้าถึงตลาดไหน?** - - ภายในประเทศ (ไทย) - - ต่างประเทศ - - ทั้งในและต่างประเทศ +3.2 **ต้องการให้คนเข้าเว็บแล้ว "รู้สึก" อย่างไร?** + - [ ] มั่นใจ / เชื่อถือได้ + - [ ] สบายใจ / ไม่กังวล + - [ ] ตื่นเต้น / กระตือรือร้น + - [ ] ประทับใจ / หรูหรา + - [ ] เข้าใจง่าย / ชัดเจน + - [ ] ทันสมัย / นำหน้า + - [ ] อื่นๆ: ____________ + +3.3 **มีภาพที่ไม่อยากให้เว็บสื่อสารไหม?** + - เช่น: ธรรมดาเกินไป, ดูถูกเบา, เก่าจัง, ตลก, ไม่น่าเชื่อถือ --- -## 3. เว็บไซต์เดิม +## 4. Design Context -3.1 **มีเว็บอยู่แล้วหรือยัง?** - - ถ้ามี: URL ของเว็บเก่า - - ถ้ามี: ทำไมอยากเปลี่ยน? - - ถ้ามี: มี source code ไหม? +4.1 **มี brand guidelines/logo files ไหม?** + - ถ้ามี: แชร์มาได้เลย + - Logo files (SVG, PNG, AI) + - สีที่ใช้ (hex codes) + - Typography ที่ใช้ -3.2 **มี domain และ hosting แล้วหรือยัง?** - - ถ้ามี: provider อะไร? - - ถ้ามี: domain ชื่ออะไร? +4.2 **มี reference sites ที่ชอบ/ไม่ชอบบ้างไหม?** + - ชอบ: URL + บอกว่าชอบอะไรจากเว็บนั้น + - ไม่ชอบ: URL + บอกว่าไม่ชอบอะไร ---- +4.3 **มีสีที่ห้ามใช้/ต้องใช้ไหม?** + - สีที่ต้องใช้ (ถ้ามี brand colors) + - สีที่ไม่ชอบ/ห้ามใช้ -## 4. ดีไซน์และ Branding - -4.1 **มี brand guidelines ไหม?** - - Logo files - - สีที่ใช้ (color palette) - - Typography - - ภาพประกอบที่มี - -4.2 **ชอบดีไซน์แบบไหน?** - - Minimal / Clean - - Bold / Eye-catching - - Creative / Artistic - - Corporate / Professional - - Modern / Futuristic - -4.3 **ชอบ Dark Mode, Light Mode หรือทั้งสอง?** +4.4 **ชอบ Dark Mode, Light Mode หรือทั้งสอง?** - Light mode อย่างเดียว - Dark mode อย่างเดียว - ทั้งสอง (user เลือกได้) -4.4 **มีเว็บที่ชอบเป็น reference ไหม?** - - URL(s) ของเว็บที่ชอบ - - ชอบอะไรจากเว็บนั้น? - --- ## 5. หน้าที่ต้องการ @@ -96,82 +103,77 @@ --- -## 6. ฟังก์ชันพิเศษ +## 6. Technical Requirements -6.1 **ต้องการระบบจัดการเนื้อหา (CMS) ไหม?** - - ใช้เพื่ออะไร? - - ใครจะเป็นคนใช้? - - ต้องการให้แอดมินทำอะไรได้บ้าง? - -6.2 **ต้องการระบบ E-commerce ไหม?** - - มีสินค้ากี่ชิ้น? - - ต้องการ payment gateway อะไร? - - ต้องการ shipping integration ไหม? - -6.3 **ต้องการระบบสมาชิก/ล็อกอินไหม?** - - สมาชิกทำอะไรได้บ้าง? - - มีกี่ role? (admin, member, etc.) - ---- - -## 7. Technical Requirements - -7.1 **มี SMTP/Email server ไหม?** +6.1 **มี SMTP/Email server ไหม?** - สำหรับส่ง email จากเว็บ - เช่น contact form, newsletter -7.2 **มี Google Analytics หรือ Marketing tools ไหม?** - - GA4 Tracking ID +6.2 **มี Tracking tools ต้องติดตั้งไหม?** + - Google Analytics 4 (GA4) - Facebook Pixel - - Other tracking codes + - Google Ads Conversion + - TikTok Pixel + - LINE Channel Tag + - Umami / Plausible + - Microsoft Clarity + - Other: ____________ -7.3 **มี Third-party integrations ไหม?** +6.3 **มี Third-party integrations ไหม?** - Payment gateways - CRM systems - Other APIs --- -## 8. PDPA Compliance +## 7. PDPA Compliance -8.1 **มี DPO (Data Protection Officer) หรือยัง?** +7.1 **มี DPO (Data Protection Officer) หรือยัง?** - ถ้ายัง: ต้องการให้ช่วยจัดหาไหม? -8.2 **เว็บจะเก็บข้อมูลอะไรบ้าง?** +7.2 **เว็บจะเก็บข้อมูลอะไรบ้าง?** - ข้อมูลลูกค้า - ข้อมูลการสั่งซื้อ - Newsletter subscribers - Other: ____________ -8.3 **ต้องการ Cookie Consent Popup ไหม?** - - ใช้ cookies อะไรบ้าง? - - ต้องการให้ users มีทางเลือกไหม? +7.3 **ConsentOS Integration** + - ใช้ ConsentOS สำหรับ cookie consent (บังคับ PDPA) --- -## 9. งบประมาณและ Timeline +## 8. เว็บไซต์เดิม (ถ้ามี) -9.1 **งบประมาณ** - - ต้องการทำเท่าไหร่? - - มีงบแบบไหน? (fixed/negotiable) +8.1 **มีเว็บอยู่แล้วหรือยัง?** + - ถ้ามี: URL ของเว็บเก่า + - ถ้ามี: ทำไมอยากเปลี่ยน? + - ถ้ามี: มี source code ไหม? -9.2 **ต้องการให้เสร็จเมื่อไหร่?** - - มี deadline ไหม? - - มีเหตุการณ์พิเศษที่ต้องเสร็จก่อนไหม? +8.2 **มี domain และ hosting แล้วหรือยัง?** + - ถ้ามี: provider อะไร? + - ถ้ามี: domain ชื่ออะไร? --- ## Checklist สำหรับ Website Creator -เมื่อถามครบแล้ว ให้ตรวจสอบ: +เมื่อถามครบแล้ว ต้องได้: - [ ] ชื่อเว็บ/บริษัท -- [ ] ธุรกิจทำอะไร -- [ ] กลุ่มเป้าหมาย -- [ ] เว็บเก่า (ถ้ามี) -- [ ] Style ที่ต้องการ -- [ ] หน้าที่ต้องการ -- [ ] CMS ต้องการไหม -- [ ] Email/SMTP -- [ ] PDPA/DPO -- [ ] งบและ timeline +- [ ] ธุรกิจทำอะไร + ทำไมต่าง +- [ ] Target emotion ที่ต้องการ +- [ ] Design references (ชอบ/ไม่ชอบ) +- [ ] Brand assets (logo, colors) ถ้ามี +- [ ] Sitemap (หน้าที่ต้องการ) +- [ ] Tracking tools ที่ต้องติดตั้ง +- [ ] PDPA requirements + +--- + +## หลังได้ Context แล้ว + +1. สร้าง **Creative Brief** (ฉบับย่อ) +2. สร้าง **2-3 Creative Directions** ที่ต่างกันจริงๆ +3. นำเสนอ + รอ user เลือก +4. สร้าง **Master Plan** รวมทั้งหมด +5. ⏸️ **รอ APPROVE** ก่อนทำงาน diff --git a/skills/website-creator/templates/astro-tina-starter/src/content/posts/welcome.mdx b/skills/website-creator/templates/astro-tina-starter/src/content/posts/welcome.mdx index 2fd8ebe..8df33e2 100644 --- a/skills/website-creator/templates/astro-tina-starter/src/content/posts/welcome.mdx +++ b/skills/website-creator/templates/astro-tina-starter/src/content/posts/welcome.mdx @@ -11,7 +11,7 @@ Welcome to our new blog built with Astro and Tina CMS! - **Tina CMS** - Self-hosted content management - **Tailwind CSS v4** - Latest styling with @tailwindcss/vite -- **Astro DB** - Built-in database support +- **ConsentOS** - PDPA-compliant consent management - **Thai Support** - Ready for Thai language content Stay tuned for more updates! diff --git a/skills/website-creator/templates/astro-tina-starter/src/pages/index.astro b/skills/website-creator/templates/astro-tina-starter/src/pages/index.astro index fa84050..841ac53 100644 --- a/skills/website-creator/templates/astro-tina-starter/src/pages/index.astro +++ b/skills/website-creator/templates/astro-tina-starter/src/pages/index.astro @@ -29,9 +29,9 @@ import Layout from "@/layouts/Layout.astro"
- Built-in database for consent logging and more. + PDPA-compliant consent management with auto-blocking tracking.
,Code development,Outline
-98,Development,terminal,console cli command shell,Phosphor,import { Terminal } from '@phosphor-icons/react',