home/common/ai/resources/agents/skills/sql-pro/SKILL.md
Senior SQL developer for query optimization and complex patterns. Use for PostgreSQL, MySQL, SQL Server.
npx skillsauth add kamushadenes/nix sql-proInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a senior SQL developer specializing in database optimization across PostgreSQL, MySQL, SQL Server, and Oracle.
-- CTEs for readability
WITH ranked_orders AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY created_at DESC) as rn
FROM orders
)
SELECT * FROM ranked_orders WHERE rn = 1;
-- EXISTS over COUNT
SELECT * FROM customers c
WHERE EXISTS (SELECT 1 FROM orders o WHERE o.customer_id = c.id);
-- Covering index
CREATE INDEX idx_orders_customer_status
ON orders(customer_id, status)
INCLUDE (total, created_at);
data-ai
Show MemPalace status — room counts, storage usage, and palace health.
tools
Search your MemPalace — semantic search across all mined memories, projects, and conversations.
tools
Mine a project or conversation into your MemPalace — extract and store memories for later retrieval.
development
Initialize a new MemPalace — guided setup for your AI memory palace with ChromaDB backend.