AGENT SKILL

widget-cms

Tạo, sửa và kiểm thử widget Laravel CMS theo renderer theme/core/plugin, layout builder, settings_schema, shortcode, hook, CSS/JS và zone contract.

License 许可
MIT
最近更新
2026-09-04
Stars
★ 0
Forks
0

01 前言 Front Matter

name
widget-cms
license
MIT
version
2.0.0
description
Tạo, sửa và kiểm thử widget Laravel CMS theo renderer theme/core/plugin, layout builder, settings_schema, shortcode, hook, CSS/JS và zone contract.

02 资源文件 5

03 SKILL.md 正文

CMS Widget Builder

Tạo widget hoàn chỉnh cho C:\xampp\htdocs\cms theo đúng ownership: theme widget cho một theme, core widget dùng chung, plugin widget cho chức năng độc lập hoặc xuyên theme.

Workflow

  1. Đọc runtime-schema.md để xác định renderer, biến, schema và zone.
  2. Chọn ownership; đọc implementation.md cho theme/core hoặc plugin-boundary.md cho plugin.
  3. Tạo Blade, registry/manifest, schema và defaults cùng một contract; đọc rendering-content.md nếu có rich content, shortcode hoặc asset.
  4. Chạy checklist trong validation.md, kiểm layout builder và frontend.

Non-Negotiable

  • Giữ type/variant/style_key khớp path Blade và registry.
  • Dùng settings_schema cho mọi cấu hình block mới; key schema phải trùng key Blade đọc.
  • Nút sửa block phải mở popup schema trong Admin > Bố cục trang chủ, không chuyển sang plugin settings.
  • Scoped CSS/JS, ID unique theo $block->id, không tạo biến JS global.
  • Dùng cms_content() cho rich content admin nhập; escape dữ liệu text/URL.
  • Không đặt widget plugin vào core/theme hoặc sửa legacy controller khi schema giải quyết được.
  • Không query không giới hạn trong Blade.

Handoff

Báo type/variant, ownership, path Blade, schema, zone, asset/shortcode/hook, lệnh kiểm tra và trạng thái render.

04 同仓库更多 Skills