Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add exergy-connect/xFrame.ai --skill "xframe-model"
Install specific skill from multi-skill repository
# Description
Create or edit YAML model and data files for xFrame consolidation. Use when authoring entity schemas, model YAML, data YAML, or any input to the xframe-consolidate skill.
# SKILL.md
name: xframe-model
description: Create or edit YAML model and data files for xFrame consolidation. Use when authoring entity schemas, model YAML, data YAML, or any input to the xframe-consolidate skill.
xframe-model
Create YAML files that define the model (entity schemas) and data (entity records) consumed by xframe-consolidate. After authoring, run the consolidate skill to validate and produce JSON/JS output.
When to use
- User wants to define entities, model schema, or data for xFrame.
- User is creating or editing YAML under a
model/ordata/layout for consolidation. - User mentions xFrame model, entity, primary key, foreign key, or consolidate input.
Directory layout
- model/ – One or more YAML files defining entities and fields. All are merged into a single schema.
- data/ – One or more YAML files with entity data, keyed by entity name. Often a single file (e.g.
sample_data.yaml) with multiple entity keys.
Model YAML structure
Top-level:
name: "My Model"
version: "25.01.01.1"
author: "Author Name"
entities:
- name: <entity_name>
brief: "Short description"
description: "Optional longer description"
primary_key: <field_name> # or composite (see below)
fields:
- name: <field_name>
type: string | integer | number | boolean | date | datetime | duration_in_days | array | composite
required: true | false
description: "Optional"
# For references to another entity (parent or peer):
foreignKeys:
- entity: <other_entity>
parent_array: <array_field_on_other_entity> # optional (for parent nesting)
# For array fields: use one of
item_type:
entity: <child_entity>
# or
primitive: string | integer | number | boolean | date | ...
# For computed fields:
computed:
operation: add | subtraction | multiplication | division | min | max
fields:
- field: <field_name>
# Optional cross-entity:
- field: <field_name>
entity: <entity_name>
# For composite fields
composite:
- name: <part_name>
type: <type>
- primary_key: Single field name, or use a
type: compositefield and setprimary_keyto that field name; thecompositelist defines the key parts. - foreignKeys: Link this field to another entity;
parent_arrayis the array field on the parent that contains these records (for nesting). - item_type.entity or item_type.primitive: For
type: array, the type of each element. - computed: Consolidator fills these from other fields; do not put values in data YAML.
Data YAML structure
Use entity name as the top-level key; value is a list of records. Nested children go under the same key as the model’s array field.
company:
- company_id: "acme"
company_name: "ACME Corp"
departments:
- department_id: "eng"
department_name: "Engineering"
employees:
- employee_id: "alice"
employee_name: "Alice"
- employee_id: "bob"
employee_name: "Bob"
manager_id: "alice"
- company_id: "other"
company_name: "Other Co"
departments: []
- Primary key and foreign key values must match the model and reference existing records where required.
- Omit computed fields; they are generated by the consolidator.
After authoring
Run the xframe-consolidate skill (or script) with the same model/ and data/ paths to validate and produce consolidated_model.json and consolidated_data.json in output/.
References
- Example model and data:
assets/example-model.yaml,assets/example-data.yaml(Company → Department → Employee). - Consolidation: use the xframe-consolidate skill or
skills/xframe-consolidate/scripts/consolidate.min.js.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.