Generates, optimizes, and scores SOQL queries for Salesforce with a 100-point rubric across five categories. Handles everything from natural language to query conversion, relationship traversals, aggregates, and selectivity analysis. Knows when to use child-to-parent lookups versus subqueries, when SOSL beats SOQL, and flags anti-patterns like querying in loops or leading wildcards. The scoring system is genuinely useful: anything under 70 needs work before production, 90+ means it's optimized and ready. Delegates actual query execution to sf-data and Apex embedding to sf-apex, keeping focus purely on query shape and performance. Built by someone who clearly debugged too many slow queries.

skills.sh installs
1.5K
GitHub stars
422
last updated
Jul 14, 2026

Install

$ npx -y skills add jaganpro/sf-skills --skill sf-soql --agent claude-code

Installs into .claude/skills of the current project.

Files

sf-soql: Salesforce SOQL Query Expert

Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance/safety improvements for Salesforce queries.

When This Skill Owns the Task

Use sf-soql when the work involves:

  • .soql files
  • query generation from natural language
  • relationship queries and aggregate queries
  • query optimization and selectivity analysis
  • SOQL/SOSL syntax and governor-aware design

Delegate elsewhere when the user is:

  • performing bulk data operations → sf-data
  • embedding query logic inside broader Apex implementation → sf-apex
  • debugging via logs rather than query shape → sf-debug

Required Context to Gather First

Ask for or infer:

  • target object(s)
  • fields needed
  • filter criteria
  • sort / limit requirements
  • whether the query is for display, automation, reporting-like analysis, or Apex usage
  • whether performance / selectivity is already a concern

Recommended Workflow

Sponsors

Details

Repository
github.com/jaganpro/sf-skills
First seen
Apr 16, 2026

More from jaganpro/sf-skills

All 37

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs