Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Freebies — Basic SQL Crud Generator

    1

    Generate secure, parameterized SQL CRUD queries and indexes for PostgreSQL, MySQL, and SQLite.

    Free

    Security scanned
    Freebies — Basic SQL Crud Generator

    Freebies — Basic SQL Crud Generator

    Example session with this skill installed

    Generate PostgreSQL CRUD queries for a 'users' table with id (PK), email (unique), password_hash, and created_at. Include an index for email.

    • Read your context and instructions
    • Compiled the freebies

    I have generated the PostgreSQL CRUD queries for the users table. All queries use bind variables to ensure security and include timestamp tracking and indexing.

    Users Table CRUD Operations (PostgreSQL)

    -- Schema Definition
    CREATE TABLE users (
        id SERIAL PRIMARY KEY,
        email VARCHAR(255) UNIQUE NOT NULL,
        password_hash TEXT NOT NULL,
        created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
        updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
    );
    
    -- Indexes for performance
    CREATE INDEX idx_users_email ON users(email);
    
    -- CREATE (Insert)
    INSERT INTO users (email, password_hash)
    VALUES ($1, $2)
    RETURNING id, created_at;
    
    -- READ (Select by ID)
    SELECT id, email, password_hash, created_at, updated_at
    FROM users
    WHERE id = $1;
    
    -- READ (Select by Email)
    SELECT id, email, password_hash, created_at, updated_at
    FROM users
    WHERE email = $1;
    
    -- UPDATE
    UPDATE users
    SET email = $1,
        password_hash = $2,
        updated_at = CURRENT_TIMESTAMP
    WHERE id = $3;
    
    -- DELETE
    DELETE FROM users
    WHERE id = $1;
    

    Next steps

    • Review the updated_at trigger requirements if your environment requires a manual trigger function for PostgreSQL.
    • Add additional indexes for columns frequently used in ORDER BY or JOIN clauses.
    • Integrate these queries into your data access layer using a library like pg-promise or sqlx.

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

    About this skill

    Manual SQL writing is error-prone and often leads to SQL injection vulnerabilities. This skill automates the creation of production-ready, parameterized CRUD queries for relational databases.

    What it does

    • Multi-dialect support handles syntax variations for PostgreSQL, MySQL, and SQLite.
    • Parameterized queries uses bind variables like $1 or ? to prevent injection attacks.
    • Relational integrity incorporates primary keys, foreign keys, and timestamp tracking columns.
    • Performance scaffolding generates index creation statements for columns used in filters.

    How it works

    1. Identify the dialect to ensure syntax compatibility for your target database.
    2. Define the schema based on the provided table structure and relationships.
    3. Generate CRUD operations including SELECT, INSERT, UPDATE, and DELETE.
    4. Append optimization by providing sample index statements for frequent query paths.

    Frameworks & tools

    This skill supports PostgreSQL, MySQL, and SQLite. It adheres to standard relational database patterns and produces syntax-compliant SQL scripts.

    Why this beats prompting it yourself

    Generic prompts often return string-concatenated queries that are vulnerable to attacks. This skill strictly enforces parameter markers and relational constraints, ensuring every query follows database engineering best practices by default.

    Use cases

    • Generating boilerplate repository layer code for new features.
    • Creating migration scripts for tables with complex foreign key relations.
    • Building secure data access layers for public-facing APIs.
    • Setting up initial database schemas with proper indexing.

    Known limitations

    Focuses on standard CRUD operations and does not handle complex analytical window functions or specific NoSQL syntax. Requires clear table definitions to map foreign keys accurately.

    Limited to PostgreSQL, MySQL, and SQLite. Does not support complex analytical window functions or NoSQL databases.

    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: - Generate parameterized SQL CRUD queries for PostgreSQL. - Write an INSERT and SELECT query with JOINs in MySQL. - Create standard SQL CRUD statements for a table.

    Listed2 days ago

    What's inside

    Frequently Asked Questions

    This skill automates the creation of PostgreSQL, MySQL, and SQLite queries that use bind variables, effectively eliminating the risk of SQL injection that often occurs with manual or generic AI-generated code.

    The generator requires a basic schema definition, including table names, columns, and relationships; it then outputs complete CREATE TABLE statements, CRUD operations, and recommended indexes.

    It is designed to work with any AI agent capable of processing structured instructions, including popular platforms like ChatGPT, Claude, and specialized developer IDE agents.

    No, this skill is focused on standard relational databases; it does not currently support NoSQL syntax like MongoDB or complex analytical window functions.

    Yes, the skill automatically generates index creation statements for columns used in filters and handles relational integrity through proper foreign key and timestamp tracking scaffolding.

    Upon purchase, you receive the full skill logic ready for immediate deployment in your preferred AI agent environment, along with a guide on how to input your schema for best results.

    New in Data & Databases