sql
SKILL.md
SQL
Standard language for storing, manipulating and retrieving data in databases.
When to Use
- Relational data modeling
- Complex queries and aggregations
- Data integrity enforcement (ACID)
- Standardized data access
Quick Start
-- Create Table
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100) UNIQUE
);
-- Insert Data
INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com');
-- Query Data
SELECT * FROM users WHERE name = 'Alice';
Core Concepts
DDL (Data Definition Language)
Commands to define database schemas (CREATE, ALTER, DROP).
DML (Data Manipulation Language)
Commands to manipulate data (SELECT, INSERT, UPDATE, DELETE).
Joins
Combining rows from two or more tables based on a related column.
- INNER JOIN: Matches in both tables.
- LEFT JOIN: All from left, matches from right.
Best Practices
Do:
- Use parameterized queries (prevent SQL Injection)
- Index columns used in WHERE and JOIN clauses
- Use transactions for atomic operations
Don't:
- Use
SELECT *in production (fetch only what you need) - Store logic in triggers if possible (hard to debug)
- Ignore execution plans for slow queries
References
Weekly Installs
2
Repository
g1joshi/agent-skillsGitHub Stars
7
First Seen
Feb 10, 2026
Security Audits
Installed on
trae2
gemini-cli2
antigravity2
claude-code2
github-copilot2
codex2