What problem does it solve? Writing performant Salesforce queries requires deep knowledge of selectivity rules, indexed fields, governor limits, and security modes. This Skill converts natural-language requirements into correct SOQL/SOSL and audits existing queries against a 100-point scoring rubric so slow, non-selective, or insecure queries are caught before production. ## Core Features & Use Cases - Natural Language to SOQL: Turn plain-English requests into executable queries with the right shape — relationship queries, aggregates, semi-joins, or SOSL. - Query Optimization & Scoring: Evaluate selectivity, LIMIT usage, field selection, and security clauses (WITH USER_MODE, WITH SECURITY_ENFORCED) with a 100-point score guide. - Anti-Pattern Detection: Identify SOQL-in-loops, leading wildcards, non-selective filters, and missing field coverage in Apex contexts. - Use Case: Ask for "Accounts with open Opportunities created this quarter" and receive an optimized query plus design rationale, then validate a .soql file edit via the post-write hook with static checks and live query plan analysis. ## Quick Start Ask the assistant to generate an optimized SOQL query for the records you need, naming the target object, fields, and filter criteria.