What problem does it solve? Writing efficient Salesforce queries requires deep knowledge of SOQL syntax, relationship traversal, index selectivity, and governor limits. This Skill converts natural-language requirements into correct, performant SOQL/SOSL and audits existing queries for anti-patterns that cause full table scans, limit exceptions, or field-access runtime errors. ## Core Features & Use Cases - Natural Language to SOQL: Generate queries with the right shape—subqueries, dot-notation traversal, aggregates, semi/anti-joins, or SOSL—based on the data need. - Query Optimization & Scoring: Evaluate selectivity, indexed-field usage, LIMIT clauses, and wildcard patterns against a 100-point scoring rubric, with optional live Query Plan analysis via the Salesforce CLI. - Security & Apex Safety: Guidance on WITH SECURITY_ENFORCED, WITH USER_MODE, stripInaccessible, and field-coverage rules so queried fields match what Apex code actually accesses. - Use Case: Ask for "Accounts with open Opportunities created this quarter" and receive a selective, governor-aware query plus an explanation of filter and relationship choices, ready to run via sf data query. ## Quick Start Ask the agent to generate or optimize a SOQL query, for example: "Write a selective SOQL query that finds all Contacts whose Accounts are in the Technology industry, created in the last 90 days."