Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

fosmvvm-leaf-view-generator

bởi foscomputerservices

Web & Frontend Development
404Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Generate Leaf templates for FOSMVVM WebApps.

Mô tả

Kỹ năng này làm gì

Generates Leaf templates for FOSMVVM web applications. Covers full-page views that extend a base layout and fragment templates returned via HTML-over-the-wire for partial DOM updates. Templates render pre-localized ViewModels, so the template just displays what it receives.

Enforcing a one-to-one filename match between ViewModel and Leaf template eliminates the lookup problem where developers must guess which template renders a given ViewModel.

Khi nào nên dùng

  • Creating a new feature page that extends the base layout
  • Building a card fragment for drag-and-drop kanban updates
  • Adding data-* attributes so JavaScript can build server request payloads
  • Troubleshooting Localizable types rendering as raw structs in templates
  • Generating fragment templates for modal and inline component responses

Quy trình ví dụ

ĐẦU VÀO

User asks: generate a fragment template for TaskCardViewModel with id, status enum, statusDisplay, and createdAt

AGENT
  1. 1

    Identify template type as fragment based on CardViewModel suffix

  2. 2

    Map id to data-task-id attribute for JS identification

  3. 3

    Map status enum to data-status attribute for raw server request values

  4. 4

    Map statusDisplay and createdAt as inline text using ViewModel properties

  5. 5

    Output fragment with single root element, no layout extension, and all state in data-* attributes

ĐẦU RA

A TaskCardView.leaf fragment with correct data attributes, localized display values from ViewModel properties, and no #extend("base") call

Cài đặt

clawhub install foscomputerservices/fosmvvm-leaf-view-generator

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết