Créer une page produit prête pour la production

VérifiéSûr

Génère une page produit complète et prête pour la production selon la structure de référence hydrascan-pro : entrée de collection, contenu JSON, routes et validation Zod.

Spar Skills Guide Bot
DeveloppementIntermédiaire
1013/09/2026
Claude Code
#ecommerce#astro#product-page#json-schema#content-generation

Recommandé pour

Notre avis

Génère une page produit complète et prête pour la production dans un projet Astro/e-commerce en créant les fichiers JSON de collection et de contenu, puis en les validant selon le schéma du projet.

Points forts

  • Respecte un ordre de sections fixe et documenté pour le ProductLayout, garantissant la cohérence avec les pages existantes
  • Exécute la vérification de syntaxe JSON, la validation du schéma Zod et contrôle la route générée
  • Gère automatiquement les images de remplacement et les replis i18n
  • Réutilise les fichiers de contenu JSON existants comme modèles pour accélérer la rédaction

Limites

  • Fortement lié à la structure du projet hydrascan-pro et aux chemins de contenu hongrois (/hu/)
  • La qualité dépend des informations fournies par l'utilisateur ; le skill n'invente pas de véritables spécifications techniques
  • S'arrête à l'écriture des fichiers et à la validation : il ne vérifie pas le rendu visuel au-delà de l'URL de dev
Quand l'utiliser

Pour ajouter un nouveau produit à ce site Astro e-commerce précis en obtenant une page complète conforme au modèle existant.

Quand l'éviter

Pour des pages non-produit ou un projet qui n'utilise pas ce ProductLayout, ce schéma product-content et cette structure de contenu hongroise.

Analyse de sécurité

Sûr
Score qualité88/100

The skill instructs creation and validation of JSON content files and runs specific node/npm commands for syntax checking, but does not involve destructive actions, exfiltration, or arbitrary command execution. It only accesses localhost for development verification.

Aucun point d'attention détecté

Exemples

New in-stock product page
Készíts egy új termékoldalt: slug novalight-4wave, kategória diodalezerek, név NovaLight 4Wave, rövid leírás 'Négy hullámhosszú diódalézer bőrgyógyászati kezelésekhez', ár 2500000, elérhetőség in_stock.
Preorder product with full content
Add a preorder product page: slug hydrafacial-elite, category hydrafacial, name HydraFacial Elite, price 4200000, availability preorder, and fill specs, FAQ, testimonials and what's included.

Új termékoldal létrehozása

Teljes, production-ready termékoldal készítése a hydrascan-pro referencia-struktúra szerint.

Input

Kérd be (ha nem adta meg):

  1. Termék slug — fájlnév és URL (pl. novalight-4wave)
  2. Kategória slugdiodalezerek | sminktetovalas | nd-yag-lezerek | hydrafacial | anti-aging | szalonberendezes
  3. Termék neve
  4. Rövid leírás (1-2 mondat)
  5. Ár (HUF szám, vagy null)
  6. Elérhetőségin_stock | preorder | out_of_stock

Ha a felhasználó egyéb infót is ad (specifikációk, funkciók, USP-k, leírás), használd fel a content feltöltésénél.

Lépések

1. Product collection entry

Keress: src/content/products/{slug}.json. Ha nincs, hozd létre a séma szerint. Lásd: .claude/commands/new-product-page/references/product-collection-schema.json

Kép kezelés: Az image mező @assets/products/{slug}.webp formátumú. Ha a kép fájl nem létezik, használj egy meglévő placeholder képet ugyanabból a kategóriából. Szólj a felhasználónak, hogy a képet cserélje ki. A images[] tömbbe a galéria képeket sorold (szintén @assets/products/ prefix).

2. Content JSON

Hozd létre: src/content/product-content/hu/{slug}.json Lásd: .claude/commands/new-product-page/references/content-schema.json

Minden szekció opcionális a name, shortDescription, description kivételével. A ProductLayout feltételes renderelést használ — ha egy mező hiányzik, az adott szekció nem jelenik meg.

3. Route ellenőrzés

Ellenőrizd, hogy src/pages/{categorySlug}/[slug].astro létezik. Ha nincs, hozd létre a meglévők mintájára (mind ugyanazt a patternt követi — ProductLayout-ot importál).

4. Validáció

  1. node -e "JSON.parse(require('fs').readFileSync('src/content/product-content/hu/{slug}.json','utf8'))" — JSON szintaxis check
  2. npm run validate:content — Zod séma validáció
  3. Ellenőrizd a dev szervert: http://localhost:4321/{categorySlug}/{slug}

Ha validáció hibát dob: Olvasd el a hibaüzenetet, javítsd a JSON-t, futtasd újra. Gyakori hibák: idézőjel escape, trailing comma, hiányzó kötelező mező.

Szekció-sorrend (ProductLayout.astro)

| # | Komponens | JSON mező | Feltétel | |---|-----------|-----------|----------| | 1 | ProductGallery + Hero inline | collection data + content overrides | mindig | | 2 | StatsBar | stats[] | ha van | | 3 | ROICalculator | roi.defaultTreatmentPrice | mindig | | 4 | VideoDescription | videoDescription | ha van | | 5 | ProductCTA variant="light" | cta.afterVideo | mindig (i18n fallback) | | 6 | FeatureRows | featureRows | ha van | | 7 | ProductCTA variant="accent" | cta.afterFeatures | ha van featureRows | | 8 | TrainingCard | training | ha van | | 9 | Testimonials | testimonials[] | ha van | | 10 | ExpertQuote | expertQuote | ha van | | 11 | Specs table + FunctionCards | specs{} + functionCards[] | ha van bármelyik | | 12 | ProductFAQ | faq[] | ha van | | 12.5 | BuyerChecklist | buyerChecklist | ha van | | 13 | WhatsIncluded | whatsIncluded[] | ha van | | 14 | WarrantyService | — (i18n) | mindig | | 15 | ProductCTA variant="primary" | cta.final | mindig (i18n fallback) | | 16 | RelatedProducts | — (auto) | mindig |

Fontos fájlok

  • Layout: src/layouts/ProductLayout.astro
  • Típusok: src/lib/types/product-content.ts
  • Loader: src/lib/load-product-content.ts (cascade: product JSON → category JSON → undefined)
  • Komponensek: src/components/product/*.astro
  • Ikonok, HTML minták: .claude/commands/new-product-page/references/patterns.md

DO

  • Minden szekciót tölts ki tartalommal — egy teljes oldal a cél
  • <mark> tag-gel jelöld a testimonials legfontosabb részét
  • FAQ: minimum 5-7 kérdés, válaszok 2-3 mondat
  • WhatsIncluded: mindig zárd "2 év teljes körű garancia" és "Cseregép javítás idejére" sorokkal
  • ExpertQuote: általában Horváth László, Technikai szakértő
  • Használd a meglévő content JSON-öket mintának (lásd references/patterns.md)
  • A featureRows description mezőben HTML használható (checklistek, grid-ek)
  • JSON validáció MINDIG a végén

DON'T

  • Ne használj és " (magyar idézőjelet) JSON stringekben — helyette \u201E és \u201D
  • Ne hagyj trailing comma-t a JSON-ban
  • Ne hozz létre képfájlt — csak hivatkozz rá, szólj a usernek ha hiányzik
  • Ne módosítsd a ProductLayout.astro-t — csak content JSON-t és collection JSON-t írj
  • Ne felejtsd el a categorySlug egyeztetést a collection és content JSON között
  • Ne írj üres tömböket/objektumokat a content JSON-be — hagyd ki az egész mezőt ha nincs tartalom
Skills similaires