smithery/valec3

backend-database-query-builder

CodeIgniter query builder, joins, complex queries.

Installation

$ npx skills add smithery/valec3 --skill backend-database-query-builder

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/valec3 · top by installs.

npx skills add smithery/valec3

Browse all from smithery/valec3

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,265 B
  • docs SUMMARY.md 88 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Backend Database Query Builder

When to use this skill

  • Complex database queries
  • Dynamic query construction
  • JOIN operations
  • Query optimization

Workflow

  • Use query builder for safety
  • Avoid raw SQL when possible
  • Use prepared statements
  • Optimize with indexes
  • Use get() vs first()

Instructions

Basic Queries

<?php

$users = $this->db->table('users')
    ->where('status', 'active')
    ->orderBy('created_at', 'DESC')
    ->get()
    ->getResult();

Joins

<?php

$orders = $this->db->table('orders o')
    ->join('users u', 'u.id = o.user_id')
    ->join('products p', 'p.id = o.product_id')
    ->select('o.*, u.name as user_name, p.name as product_name')
    ->where('o.status', 'completed')
    ->get()
    ->getResult();

Complex Conditions

<?php

$this->db->table('users')
    ->groupStart()
        ->where('role', 'admin')
        ->orWhere('role', 'moderator')
    ->groupEnd()
    ->where('status', 'active')
    ->get();

Resources

  • Query builder prevents SQL injection
  • Use whereIn() for multiple values
  • Use groupBy() and having() for aggregates