fui-skill

Use this skill when developing, structuring, or modifying FUI web modules. It provides strict guidelines for the metadata-driven architecture (controls.json), mandatory grid layout system, action protocols, and includes specific tools for saving and publishing modules/components.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "fui-skill" with this command: npx skills add minhphongvn/fui-skill/minhphongvn-fui-skill-fui-skill

FUI Skill

Develop web modules using FUI's metadata-driven approach where UI and logic are defined in JSON.

Module Structure

<module-name>/
├── module.json        (Core: data, watch, controls, set - Replaces controls.json)
├── script.js          (Helper functions)
├── _info.json         (Module Metadata: ID, Name, Framework version)
├── dependencies.json  (External libraries & assets)
├── header.html        (Optional: Header template)
├── body.html          (Optional: Body template)
├── components/        (Custom .vue components)
└── styles/            (CSS)

module.json Anatomy

The core file has four sections:

  • data: Reactive state and named Actions
  • watch: Observers triggering actions on change
  • controls: UI layout (containers > rows > cols > elements)
  • set: Module settings (title, menu)

Action Protocol

Define logic in data as named action objects. Execute with CALL.

KeyDescription
APIEndpoint to call
INInput params (use vueData. or item. refs)
OUTStore response (e.g., "myList")
CALLBACKAction after success
CONFIRMShow confirmation first
MESSToast message
CALLExecute another named action
IF/THEN/ELSEConditional logic
EXERaw JS (use sparingly)

Example:

"fetchUsers": {
  "API": "/api/users",
  "IN": { "GroupID": "vueData.selectedGroup" },
  "OUT": "userList",
  "CALLBACK": { "MESS": "Loaded!" }
}

Layout System (Grid & Controls)

CRITICAL RULE: The controls array MUST follow the Mandatory Grid System structure at the top level.

1. Mandatory Grid Wrapper

All controls must be wrapped in a container > rows > cols structure:

"controls": [
  {
    "prop": "fluid grid-list-md",
    "rows": [
      {
        "prop": "row",
        "cols": [
          // Control Objects go here
        ]
      }
    ]
  }
]

2. Control Object Structure

Inside the cols array (or nested innerHTML), every item is a Control Object:

KeyTypeDescription
elStringHTML tag (div, span), Vue component, or FUI component.
attrObjectAttributes/directives (class, style, v-model, v-on:click). NO @.
wNumber/StringColumn width. 1-12 (grid) or pixel value. REQUIRED for items in cols.
colObjectWrapper config. Attributes for the grid column (class, style).
innerHTMLString/ArrayContent. Can be recursive array of Control Objects.

Example:

{
  "el": "v-btn",
  "w": 6,
  "col": { "class": "text-center" },
  "attr": {
    "color": "primary",
    "v-on:click": "CALL(vueData.submit)"
  },
  "innerHTML": "Submit"
}

Layout Rules

  • Wrapper: ALWAYS start with the Grid Wrapper.
  • No children: Use innerHTML (array) for nesting.
  • Attributes: Use attr for element attributes. Use col for grid column attributes.
  • Events: Use v-on:click (valid JSON), not @click.

UI Templates

Copy templates from examples/ as starting points. See ui-templates.md for usage guide.

TemplateTypeUse Case
form-basic.jsonJSONSimple input forms
table-crud.jsonJSONData tables with CRUD
dialog-form.jsonJSONModal dialogs
component.vueVueCustom component starter

Instructions

  1. Creating New Modules: ALWAYS create a ROOT DIRECTORY with the module name first (e.g., my-module/). All files (module.json, script.js, etc.) MUST be inside this directory.

    • module.json (Required): Define UI and Logic.
    • _info.json (Required): Metadata (ID, Name, Framework).
    • dependencies.json (Optional): External libs.
    • styles/index.css (Optional): Custom CSS.
    • components/ (Optional): Custom Vue components.
  2. Reference Docs: See references/ for component and function details:

  3. Module Assessment: When asked to review/assess a module, follows the Quality Assurance Protocol to identify issues, propose clean solutions, and analyze edge cases.

  4. Editing module.json: Use valid JSON. Reference state with vueData. prefix.

  5. UI Templates: Copy from examples/, modify APIs and fields.

Continuous Improvement

This skill is a living document. The Agent MUST actively maintain and improve it based on user feedback and project evolution.

Workflow

  1. Post-Task Review: After completing a complex task, ask the user: "Are there any lessons, patterns, or corrections from this task that should be added to the FUI skill?"
  2. Correction & Refinement: If the user points out a mistake or a better way to do something:
    • Update: Modify existing guidelines/references immediately.
    • Delete: Remove obsolete or incorrect information.
    • Add: Create new reference files for novel techniques.
  3. Knowledge Consolidation: Periodically review references/ to merge scattered tips into cohesive guides.

Goal: Ensure fui-skill always reflects the most up-to-date, best-practice way to build FUI modules.

Common Components

f-table (Data Table with CRUD)

The f-table component supports built-in CRUD operations using update-api and update-form.

Configuration:

  • ctrl-update: Add a header with value: "ctrl-update" to show Action buttons.
  • update-form: Array of controls for the Add/Edit dialog.
  • update-api: Object defining logic for new, edit, delete keys. Logic passed as string expressions.

Example:

{
  "el": "f-table",
  "attr": {
    ":items": "vueData.list",
    ":headers": [
      { "text": "Name", "value": "name" },
      { "text": "Actions", "value": "ctrl-update" }
    ],
    ":update-form": [
      { "el": "v-text-field", "attr": { "v-model": "name", "label": "Name" } }
    ],
    ":update-api": {
      "new": { "list": "[...list, item]" },
      "edit": { "list": "list.map(i => i.id === item.id ? item : i)" },
      "delete": { "list": "list.filter(i => i.id !== item.id)" }
    }
  }
}

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

python-image

Local image processing toolkit for format conversion, compression, resizing, batch jobs, and image-to-PDF. Use when users ask 压缩图片/改尺寸/批量处理/转PDF. Supports si...

Registry SourceRecently Updated
Coding

Climate

Climate - command-line tool for everyday use

Registry SourceRecently Updated
Coding

Vultr

Manage Vultr cloud infrastructure including VPS instances, bare metal, Kubernetes clusters, databases, DNS, firewalls, VPCs, object storage, and more. Use wh...

Registry SourceRecently Updated
Coding

ProxyGate Update

Use when updating ProxyGate CLI or SDK to the latest version. Also triggers proactively when an update notification is shown. Make sure to use this whenever...

Registry SourceRecently Updated