machhub-collection-json

Generate MACHHUB Collection schemas as JSON arrays with fields and relations.

1|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/machhub-dev/skills --skill machhub-collection-json
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: machhub-collection-json
Source: https://github.com/machhub-dev/skills/tree/main/machhub-collection-json
Command: npx skills add https://github.com/machhub-dev/skills --skill machhub-collection-json

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill generates valid MACHHUB collection schemas in JSON format for import into the MACHHUB database, enabling consistent data models and painless migrations.

Core Features & Use Cases

  • Generate a MACHHUB collection schema as a JSON array of collection objects, each with name, description, fields, and indexDetails.
  • Validate and align with standard MACHHUB fields (id, created_dt, updated_dt) and proper relation types using the relation structure.
  • Use cases include creating new collections programmatically, migrating schemas between environments, exporting/importing definitions, and backing up collection structures.

Quick Start

Use this skill to generate a schema for a new collection, or to validate an existing collection definition and convert it to the MACHHUB Collection JSON format.

Frequently Asked Questions about machhub-collection-json

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a MACHHUB collection schema in JSON format?

Generate a MACHHUB collection JSON schema by creating a JSON array of collection objects, each containing name, description, fields, indexDetails, relation types, and onDelete rules for valid database import and schema management.

What is the correct JSON structure for MACHHUB collection relation types?

MACHHUB collection relation types use a specific relation structure that includes relation and relatedCollectionID fields, ensuring proper schema validation and relational mapping when importing the JSON collection definitions into the database.

Can I use this approach to migrate schemas between different MACHHUB environments?

Yes, you can migrate schemas between MACHHUB environments by exporting existing collection structures to a valid JSON array format and then importing those definitions programmatically into the target environment for consistent data models.

What standard fields are required when defining MACHHUB collection objects in JSON?

MACHHUB collection objects in JSON require standard fields including id, created_dt, and updated_dt, alongside custom name, description, fields definitions, indexDetails, onDelete rules, and relation structures to pass schema validation.

How do I validate existing collection definitions and convert them to MACHHUB Collection JSON?

To validate and convert existing definitions to MACHHUB Collection JSON, align the data with standard fields, ensure proper relation types use the relation structure, define indexDetails, and output a JSON array of validated collection objects.

Why does my MACHHUB collection JSON schema fail validation during database import?

MACHHUB collection JSON schema validation fails during database import if the output lacks standard fields, uses incorrect relation structures without relatedCollectionID, misses indexDetails definitions, or contains syntax errors within the JSON array of collection objects.