Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Freebies — Json To Sql Converter

    1

    Convert arbitrary JSON objects and nested arrays into normalized PostgreSQL or MySQL relational schemas.

    Free

    Security scanned
    Freebies — Json To Sql Converter

    Freebies — Json To Sql Converter

    Example session with this skill installed

    Generate a normalized PostgreSQL schema from this JSON user profile: {"id": 1, "name": "Dev", "roles": ["admin", "editor"], "metadata": {"last_login": "2023-10-01T12:00:00Z"}}

    • Read your context and instructions
    • Compiled the freebies

    I have analyzed the JSON structure. The `roles` array has been normalized into a separate child table, and the `metadata` object has been mapped to a JSONB column. ## SQL Migration Schema ```sql -- Main user profiles table CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, metadata JSONB, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP ); -- Normalized roles table (1-to-many) CREATE TABLE IF NOT EXISTS user_roles ( id SERIAL PRIMARY KEY, user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE, role_name VARCHAR(50) NOT NULL ); -- Index recommendations for performance CREATE INDEX idx_users_metadata ON users USING GIN (metadata); CREATE INDEX idx_user_roles_user_id ON user_roles(user_id); ``` **Next steps** 1. Review the `VARCHAR` lengths to match your specific data requirements. 2. Apply these statements to your PostgreSQL instance using a migration tool or `psql`. 3. If you need to handle more complex nested objects, provide a larger JSON sample for recursive normalization.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Manually mapping JSON blobs to relational schemas is tedious and prone to normalization errors. This skill automates the transition from document-based data to structured SQL, ensuring your schemas follow relational best practices. ## What it does - **Structure analysis** evaluates JSON data types, nullability, and nested structures to determine the optimal schema. - **Automatic normalization** flattens nested arrays into separate one-to-many child tables with appropriate foreign keys. - **Type mapping** converts JSON types to target SQL types like `VARCHAR`, `NUMERIC`, and `JSONB`. - **DDL generation** produces clean `CREATE TABLE` statements including index recommendations for performance. ## How it works 1. **Provide JSON** input by pasting a sample object or pointing to a file in the workspace. 2. **Review normalization** as the skill identifies nested objects that require relational separation. 3. **Generate DDL** to receive a complete SQL script with primary keys, foreign keys, and indexes. ## Frameworks & tools The skill generates valid DDL statements optimized for PostgreSQL and MySQL. ## Why this beats prompting it yourself Generic prompts often fail to normalize nested arrays correctly, resulting in "God tables" or lost data. This skill follows a deterministic workflow to enforce 1:N relationships and optimal indexing by default. ## Use cases - Migrating legacy NoSQL data or API responses to a relational database. - Scaffolding a database schema from frontend JSON mockups. - Prototyping data models for PostgreSQL or MySQL projects. - Automating the creation of child tables for complex nested document structures. ## Known limitations Restricted to PostgreSQL and MySQL dialects. Execution is confined to the local workspace for file operations.

    Supports PostgreSQL and MySQL dialects only. Cannot access files outside the current project directory.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    • Free with an Agensi account

    Requires

    File System Read/Write (strictly scoped to current project workspace `./`).
    Zero global installation or elevated privileges required.

    Permissions

    Read Files

    Target Use Cases: - Convert this JSON object into SQL CREATE TABLE statements. - Infer relational database schema from JSON data. - Transform nested JSON into normalized SQL tables.

    Listed2 days ago

    What's inside

    Frequently Asked Questions

    The skill automatically identifies nested arrays within your JSON and creates separate child tables with the necessary Foreign Key relationships to ensure your database remains normalized and scalable.

    The skill is optimized for PostgreSQL and MySQL dialects, generating specific DDL scripts including data types like JSONB for Postgres and appropriate VARCHAR lengths.

    Yes, the skill analyzes your data structure to suggest and include CREATE INDEX statements in the final DDL to ensure performant querying of foreign keys and frequently used fields.

    This skill is designed for use within AI agent environments (such as AutoGPT or custom GPTs) that support file system access or text-based code generation tools.

    Unlike a basic prompt, this skill uses a deterministic normalization workflow that prevents 'God tables' and ensures 1:N relationships are correctly structured according to relational best practices.

    Updates are managed through the marketplace; once purchased, you will have access to the latest version of the skill's logic and any newly added SQL dialect optimizations.

    New in Data & Databases