forcedotcom avatar

Platform Soql Query

This is your SOQL authoring and optimization companion for Salesforce. It generates queries from natural language, handles relationship traversals and aggregates, and scores output on a 100-point scale with specific optimization feedback. The skill knows when to use child-to-parent vs subqueries, how to write selective filters, and catches common anti-patterns like querying in loops. It won't execute queries itself but hands off to platform-data-manage when you need results. The reference files cover syntax, indexing strategy, and selector patterns, plus it includes validation scripts that run query plan analysis after you save .soql files. Best for writing new queries or fixing slow ones, not for bulk operations or broader Apex logic.

skills.sh installs
7.1K
GitHub stars
1.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add forcedotcom/sf-skills --skill platform-soql-query --agent claude-code

Installs into .claude/skills of the current project.

Files

platform-soql-query: 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 platform-soql-query 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:


Required Context to Gather First

Sponsors

Details

Repository
github.com/forcedotcom/sf-skills
Categories
Debugging, Productivity & Planning, Sales & Marketing
First seen
Jul 14, 2026

More from forcedotcom/sf-skills

All 158

Recommended

More Debugging
1mvanhorn avatarprinting-press-polishmvanhorn/cli-printing-pressPolish a generated CLI to pass verification and become publish-ready. Runs diagnostics (dogfood, verify, scorecard, go vet, gosec), automatically fixes all issu7.1Kskills.sh installs
2affaan-m avatarfrontend-patternsaffaan-m/eccFrontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.7.1Kskills.sh installs
3trailofbits avatarvariant-analysistrailofbits/skillsHunts for the other instances of a bug already found — the variants of one root cause across a codebase. Use immediately after a vulnerability, logic bug, or ba7Kskills.sh installs
4wondelai avatarclean-codewondelai/skillsWrite readable, maintainable code through disciplined naming, small functions, and clean error handling. Use when the user mentions "clean up this code", "this 7Kskills.sh installs
5aws avataringesting-into-data-lakeaws/agent-toolkit-for-awsImport data into the AWS data lake from S3 files, local uploads, JDBC databases (Oracle, SQL Server, PostgreSQL, MySQL, RDS, Aurora), Amazon Redshift, Snowflake7Kskills.sh installs
6jeffallan avatarcode-reviewerjeffallan/claude-skillsAnalyzes code diffs and files to identify bugs, security vulnerabilities (SQL injection, XSS, insecure deserialization), code smells, N+1 queries, naming issues6.9Kskills.sh installs