Sf Datacloud
Jaganpro/sf-skills
Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.
Builds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls).
$ npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install beyond-the-cloud-dev/soql-lib soql-lib-query-builder --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/beyond-the-cloud-dev/soql-lib.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/soql-lib-query-builder .claude/skills/soql-lib-query-builder && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "soql-lib-query-builder" agent skill from https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/.cursor/skills/soql-lib-query-builder into .claude/skills/soql-lib-query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "soql-lib-query-builder", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/.cursor/skills/soql-lib-query-builderType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install beyond-the-cloud-dev/soql-lib soql-lib-query-builder --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/beyond-the-cloud-dev/soql-lib.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.cursor/skills/soql-lib-query-builder .agents/skills/soql-lib-query-builder && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "soql-lib-query-builder" agent skill from https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/.cursor/skills/soql-lib-query-builder into .agents/skills/soql-lib-query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "soql-lib-query-builder", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install beyond-the-cloud-dev/soql-lib soql-lib-query-builder --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/beyond-the-cloud-dev/soql-lib.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.cursor/skills/soql-lib-query-builder .cursor/skills/soql-lib-query-builder && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "soql-lib-query-builder" agent skill from https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/.cursor/skills/soql-lib-query-builder into .cursor/skills/soql-lib-query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "soql-lib-query-builder", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/beyond-the-cloud-dev/soql-lib.git --path .cursor/skills/soql-lib-query-builder--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install beyond-the-cloud-dev/soql-lib soql-lib-query-builder --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/beyond-the-cloud-dev/soql-lib.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.cursor/skills/soql-lib-query-builder .gemini/skills/soql-lib-query-builder && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "soql-lib-query-builder" agent skill from https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/.cursor/skills/soql-lib-query-builder into .gemini/skills/soql-lib-query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "soql-lib-query-builder", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install beyond-the-cloud-dev/soql-lib soql-lib-query-builderInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/beyond-the-cloud-dev/soql-lib.git skills-src && mkdir -p .github/skills && cp -r skills-src/.cursor/skills/soql-lib-query-builder .github/skills/soql-lib-query-builder && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "soql-lib-query-builder" agent skill from https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/.cursor/skills/soql-lib-query-builder into .github/skills/soql-lib-query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "soql-lib-query-builder", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install beyond-the-cloud-dev/soql-lib soql-lib-query-builder --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/beyond-the-cloud-dev/soql-lib.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.cursor/skills/soql-lib-query-builder .opencode/skills/soql-lib-query-builder && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "soql-lib-query-builder" agent skill from https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/.cursor/skills/soql-lib-query-builder into .opencode/skills/soql-lib-query-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "soql-lib-query-builder", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
soql-lib-query-builderBuilds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls).
Soql Lib Query Builder is an agent skill from beyond-the-cloud-dev/soql-lib. Builds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls). Covers SELECT fields, toLabel, format, WHERE filters, USING SCOPE, FOR clauses, WITH DATA CATEGORY, ORDER BY, LIMIT, OFFSET, aggregate functions, GROUP BY / HAVING, all result methods (toList, toObject, toMap, toIds, toAggregated, toCursor, etc.) and security modes. Use when writing any SOQL query with SOQL Lib.
Its SKILL.md is about 4.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Sales & Support, covering ORMs and data access and CRM management. It works with Salesforce. The repository describes itself as: The SOQL Lib provides functional constructs for SOQL queries in Apex. The licence is MIT.
Read from SKILL.md and the folder at commit cc06784. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are apex).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Soql Lib Query Builder loads about 4.3k tokens when it runs. Until then it costs about 104 tokens; SKILL.md has 502 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from beyond-the-cloud-dev/soql-lib at commit cc06784, republished under its MIT licence (© beyond-the-cloud-dev). 502 words, ~4,271 tokens.
.claude/skills/soql-lib-query-builder/SKILL.md (or your agent's skills folder).SOQL Lib is a fluent Apex builder for SOQL queries. Every method returns Queryable, enabling chaining. All filter values are automatically bound — never string-concatenated.
toList, toObject, toMap, etc.)SOQL.Filter or SOQL.FilterGroupAlways use SOQL.of(SObjectType) when no selector exists. Prefer SObjectType over String for compile-time safety:
// If a selector exists — prefer it
SOQL_Account.query().with(Account.Id, Account.Name).toList();
// No selector — use inline
SOQL.of(Account.SObjectType).with(Account.Id, Account.Name).toList();
SOQL.of('Account').toList(); // dynamic only.with(Account.Id, Account.Name, Account.Industry) // up to 5 fields
.with(Account.Id) // single field, can be chained
.with(new List<SObjectField>{ Account.Id, Account.Name, ... }) // 6+ fields
.with('CreatedBy', User.Name) // parent field (up to 5)
.with('CreatedBy', User.Id, User.Name, User.Email) // multiple parent fields
.with('CreatedBy', new List<SObjectField>{ User.Id, User.Name, User.Phone, User.FirstName, User.LastName, User.Email }) // 6+ parent fields
.with(SOQL.SubQuery.of('Contacts').with(Contact.Id, Contact.Name)) // child sub-query
.withFieldSet('AccountFieldSet') // Field Set
.with('Id, Name, Industry') // dynamic String — avoid when possible.toLabel(Lead.Status) // SELECT toLabel(Status)
.toLabel(Lead.Status, 'leadStatus') // SELECT toLabel(Status) leadStatus
.toLabel('Recordtype.Name') // SELECT toLabel(Recordtype.Name)
.toLabel('Recordtype.Name', 'recordTypeName') // SELECT toLabel(Recordtype.Name) recordTypeName.format(Opportunity.Amount) // SELECT FORMAT(Amount)
.format(Opportunity.Amount, 'amt') // SELECT FORMAT(Amount) amt.whereAre(SOQL.Filter.id().equal(recordId))
.whereAre(SOQL.Filter.recordType().equal('Partner'))
.whereAre(SOQL.Filter.name().contains('Acme'))
.whereAre(SOQL.Filter.with(Account.Industry).equal('Technology'))
.whereAre(SOQL.Filter.with('CreatedBy', User.Email).equal('admin@example.com'))// AND (default)
.whereAre(SOQL.FilterGroup
.add(SOQL.Filter.with(Account.Industry).equal('Technology'))
.add(SOQL.Filter.with(Account.BillingCity).equal('Krakow'))
)
// OR
.whereAre(SOQL.FilterGroup
.add(SOQL.Filter.with(Account.Id).equal(id))
.add(SOQL.Filter.with(Account.Name).contains('Test'))
.anyConditionMatching()
)
// Custom logic — e.g. 1 AND (2 OR 3)
.whereAre(SOQL.Filter.with(Account.Name).equal('A'))
.whereAre(SOQL.Filter.with(Account.BillingCity).equal('Krakow'))
.whereAre(SOQL.Filter.with(Account.Industry).equal('Tech'))
.conditionLogic('1 AND (2 OR 3)')
// Top-level OR connector
.anyConditionMatching()| Method | SQL equivalent |
|---|---|
.equal(val) | = :v |
.notEqual(val) | != :v |
.isNull() / .isNotNull() | = null / != null |
.isTrue() / .isFalse() | = true / = false |
.lessThan(val) / .greaterThan(val) | < :v / > :v |
.lessOrEqual(val) / .greaterOrEqual(val) | <= :v / >= :v |
.contains('txt') | LIKE '%txt%' |
.startsWith('txt') | LIKE 'txt%' |
.endsWith('txt') | LIKE '%txt' |
.notContains('txt') | (NOT ... LIKE '%txt%') |
.isIn(new List<Object>{...}) | IN (:v) |
.notIn(new List<Object>{...}) | NOT IN (:v) |
.isIn(SOQL.InnerJoin...) | IN (SELECT ...) |
.isIn(records, Account.OwnerId) | IN from SObject list |
.includesAll(vals) / .includesSome(vals) | INCLUDES (multi-picklist) |
.asDateLiteral() | unbound — for THIS_MONTH, LAST_N_DAYS:30, etc. |
// Skip condition when expression is true
.whereAre(SOQL.Filter.with(Account.Industry).equal(industry).ignoreWhen(industry == null))
// Skip entire group
SOQL.FilterGroup.add(...).ignoreWhen(filters.isEmpty())
// Date literals (cannot be bound)
.whereAre(SOQL.Filter.with(Opportunity.CloseDate).equal('THIS_MONTH').asDateLiteral())
.whereAre(SOQL.Filter.with(Account.CreatedDate).greaterThan('LAST_N_DAYS:30').asDateLiteral()).byId(recordId) // WHERE Id = :id
.byId(record) // WHERE Id = :record.Id
.byIds(new Set<Id>{ id1, id2 }) // WHERE Id IN (...)
.byIds(new List<Id>{ id1, id2 }) // WHERE Id IN (...)
.byIds(records) // WHERE Id IN (ids from list)
.byRecordType('Partner') // WHERE RecordType.DeveloperName = 'Partner'.whereAre(SOQL.Filter.with(Contact.AccountId).isIn(
SOQL.InnerJoin.of(Account.SObjectType)
.with(Account.Id)
.whereAre(SOQL.Filter.with(Account.Industry).equal('Technology'))
))Scope the query to a subset of records based on the running user's context:
.mineScope() // USING SCOPE MINE — records owned by current user
.delegatedScope() // USING SCOPE DELEGATED — delegated records
.mineAndMyGroupsScope() // USING SCOPE MINE_AND_MY_GROUPS — ProcessInstanceWorkItem only
.myTerritoryScope() // USING SCOPE MY_TERRITORY — requires territory management
.myTeamTerritoryScope() // USING SCOPE MY_TEAM_TERRITORY — requires territory management
.teamScope() // USING SCOPE TEAM — account team records.forReference() // FOR REFERENCE — notify when record is referenced from custom UI
.forView() // FOR VIEW — update LastViewedDate
.forUpdate() // FOR UPDATE — lock records during update
.allRows() // ALL ROWS — include deleted records and archived activitiesFor Knowledge articles and objects with data categories:
SOQL.of(Knowledge__kav.SObjectType)
.with(Knowledge__kav.Id, Knowledge__kav.Title)
.withDataCategory(SOQL.DataCategoryFilter.with('Geography__c').at(new List<String>{ 'Europe__c', 'North_America__c' }))
.toList();.orderBy(Account.Name) // ASC NULLS FIRST (default)
.orderBy(Account.Name).sortDesc() // DESC
.orderBy(Account.Name).nullsLast() // NULLS LAST
.orderBy('Account', Account.Name) // parent field
.orderBy('Name', 'DESC') // dynamic direction — use only for dynamic
.sort('DESC') // dynamic direction on last orderBy
.nullsOrder('LAST') // dynamic nulls order
.orderByCount(Account.Industry).sortDesc().nullsLast() // ORDER BY COUNT(field)
.setLimit(100)
.offset(20).count() // SELECT COUNT() — use with toInteger()
.count(Opportunity.Id, 'cnt') // COUNT(Id) cnt
.count('Account', Account.Name, 'names') // COUNT(Account.Name) names
.avg(Opportunity.Amount, 'avgAmt') // AVG(Amount) avgAmt
.avg('Opportunity', Opportunity.Amount) // AVG(Opportunity.Amount)
.sum(Opportunity.Amount, 'total') // SUM(Amount) total
.sum('Opportunity', Opportunity.Amount) // SUM(Opportunity.Amount)
.min(Contact.CreatedDate) // MIN(CreatedDate)
.min('Account', Account.CreatedDate, 'createdDate') // MIN(Account.CreatedDate) createdDate
.max(Campaign.BudgetedCost) // MAX(BudgetedCost)
.max('Campaign', Campaign.BudgetedCost) // MAX(Campaign.BudgetedCost)
.countDistinct(Lead.Company) // COUNT_DISTINCT(Company)
.countDistinct('Lead', Lead.Company, 'company') // COUNT_DISTINCT(Lead.Company) company
.grouping(Lead.LeadSource, 'grpLS') // GROUPING — for ROLLUP/CUBENote:
COUNT()must be the only element in the SELECT list — other fields are removed automatically. Other aggregate functions auto-remove non-grouped default fields to avoidField must be grouped or aggregated.
SOQL.of(Lead.SObjectType)
.with(Lead.LeadSource)
.count(Lead.Name, 'cnt')
.groupBy(Lead.LeadSource)
.have(SOQL.HavingFilter.count(Lead.Name).greaterThan(100))
.toAggregated();
// Multiple GROUP BY
.groupBy(Contact.FirstName)
.groupBy(Contact.LastName)
// Related field GROUP BY
.groupBy('OpportunityLineItem.Opportunity.Account', Account.Id)
// ROLLUP / CUBE
.groupByRollup(Lead.LeadSource) // GROUP BY ROLLUP(...)
.groupByRollup('ConvertedOpportunity', Opportunity.StageName)
.groupByCube(Account.Type) // GROUP BY CUBE(...)
.groupByCube('ConvertedOpportunity', Opportunity.StageName)
// HAVING logic
.have(SOQL.HavingFilter.count(Lead.Name).greaterThan(100))
.have(SOQL.HavingFilter.with(Lead.City).startsWith('San'))
.anyHavingConditionMatching() // default AND → OR between HAVING conditions
.havingConditionLogic('1 OR 2') // custom HAVING logic
.have('COUNT(Name) > 100 AND COUNT(Name) < 200') // dynamic HAVING string.userMode() // FLS + sharing enforced (default for inline queries)
.systemMode() // ignores FLS; sharing controlled by class keyword
.withSharing() // explicit with sharing (requires systemMode)
.withoutSharing() // explicit without sharing (requires systemMode)
.stripInaccessible() // strip inaccessible fields (use with systemMode + withoutSharing)
.stripInaccessible(AccessType.READABLE) // with specific AccessTypeSelectors default to .systemMode().withoutSharing(). Override ad-hoc: .userMode().
| Goal | Method | Return type |
|---|---|---|
| Multiple records | .toList() | List<SObject> |
Single record (null-safe — returns null for 0 rows) | .toObject() | SObject |
| Record existence | .doExist() | Boolean |
| First record Id | .toId() | Id |
| All record Ids | .toIds() | Set<Id> |
| Ids from a field | .toIdsOf(Account.OwnerId) | Set<Id> |
| Ids from a parent field | .toIdsOf('Parent', Account.Id) | Set<Id> |
| Single field value | .toValueOf(Account.Name) | Object (cast required) |
| All values of one field | .toValuesOf(Account.Name) | Set<String> (not for Custom Metadata) |
| All values of parent field | .toValuesOf('Parent', Account.Name) | Set<String> |
| Map keyed by record Id | .toMap() | Map<Id, SObject> |
| Map keyed by String field | .toMap(Account.Name) | Map<String, SObject> |
| Map keyed by relationship field | .toMap('Parent.CreatedBy', User.Email) | Map<String, SObject> |
| Map key → String value | .toMap(Account.Name, Account.Industry) | Map<String, String> |
| Map keyed by Id field | .toIdMapBy(Account.OwnerId) | Map<Id, SObject> |
| Map keyed by related Id field | .toIdMapBy('Parent', Account.Id) | Map<Id, SObject> |
| Grouped by String key | .toAggregatedMap(Account.Industry) | Map<String, List<SObject>> |
| Grouped by String key + value list | .toAggregatedMap(Account.Industry, Account.Name) | Map<String, List<String>> |
| Grouped by relationship key | .toAggregatedMap('Parent.CreatedBy', User.Email) | Map<String, List<SObject>> |
| Grouped by Id key | .toAggregatedIdMapBy(Account.OwnerId) | Map<Id, List<SObject>> |
| Grouped by related Id key | .toAggregatedIdMapBy('Parent', Account.Id) | Map<Id, List<SObject>> |
| COUNT | .toInteger() | Integer |
| Aggregate | .toAggregated() | List<AggregateResult> |
| Aggregate (mockable) | .toAggregatedProxy() | List<SOQL.AggregateResultProxy> |
| Batch | .toQueryLocator() | Database.QueryLocator |
| Large sets (streaming) | .toCursor() | Database.Cursor |
| Large sets (pagination) | .toPaginationCursor() | Database.PaginationCursor |
| Debug SOQL string | .toString() | String |
Important behaviors:
toObject(): throws when >1 row, returnsnull(no exception) for 0 rows.toMap(),toIdMapBy(),toAggregatedMap(),toAggregatedIdMapBy()automatically addWHERE <keyField> != null.toValuesOf()does not work with Custom Metadata.- Map result types require explicit casting:
(Map<Id, Account>).
SOQL.of(Account.SObjectType).preview().toList(); // logs SOQL + bind vars at ERROR level// List with filters
List<Account> accounts = SOQL.of(Account.SObjectType)
.with(Account.Id, Account.Name, Account.Industry)
.whereAre(SOQL.Filter.with(Account.Industry).equal('Technology'))
.orderBy(Account.Name)
.setLimit(50)
.toList();
// Single record (null-safe)
Account acc = (Account) SOQL.of(Account.SObjectType)
.with(Account.Id, Account.Name)
.byId(accountId)
.toObject();
// Parent fields
List<Contact> contacts = SOQL.of(Contact.SObjectType)
.with(Contact.Id, Contact.LastName)
.with('Account', Account.Name, Account.Industry)
.toList();
// Child sub-query
List<Account> accs = SOQL.of(Account.SObjectType)
.with(Account.Id, Account.Name)
.with(SOQL.SubQuery.of('Contacts')
.with(Contact.Id, Contact.LastName)
.orderBy(Contact.LastName)
).toList();
// Dynamic / optional filter
List<Account> result = SOQL.of(Account.SObjectType)
.with(Account.Id, Account.Name)
.whereAre(SOQL.Filter.with(Account.Industry).equal(industry).ignoreWhen(industry == null))
.toList();
// Aggregate with GROUP BY + HAVING
List<AggregateResult> results = SOQL.of(Opportunity.SObjectType)
.with(Opportunity.StageName)
.sum(Opportunity.Amount, 'total')
.count(Opportunity.Id, 'cnt')
.groupBy(Opportunity.StageName)
.have(SOQL.HavingFilter.sum(Opportunity.Amount).greaterThan(10000))
.toAggregated();
// ROLLUP with GROUPING
List<AggregateResult> rollup = SOQL.of(Lead.SObjectType)
.with(Lead.LeadSource, Lead.Rating)
.grouping(Lead.LeadSource, 'grpLS')
.grouping(Lead.Rating, 'grpRating')
.count(Lead.Name, 'cnt')
.groupByRollup(Lead.LeadSource)
.groupByRollup(Lead.Rating)
.toAggregated();
// Map keyed by Id
Map<Id, Account> byId = (Map<Id, Account>) SOQL.of(Account.SObjectType).toMap();
// Map grouped by field
Map<String, List<Account>> byIndustry =
(Map<String, List<Account>>) SOQL.of(Account.SObjectType).toAggregatedMap(Account.Industry);
// Map keyed by owner Id
Map<Id, List<Account>> byOwner =
(Map<Id, List<Account>>) SOQL.of(Account.SObjectType).toAggregatedIdMapBy(Account.OwnerId);
// Extract single field value
String adminProfileId = (String) SOQL.of(Profile.SObjectType)
.whereAre(SOQL.Filter.name().equal('System Administrator'))
.toValueOf(Profile.Name);
// Extract set of field values
Set<Id> ownerIds = SOQL.of(Account.SObjectType)
.whereAre(SOQL.Filter.with(Account.Industry).equal('Technology'))
.toIdsOf(Account.OwnerId);
// Extract set of string values
Set<String> industries = SOQL.of(Account.SObjectType).toValuesOf(Account.Industry);
// toLabel — translated field
List<Lead> leads = SOQL.of(Lead.SObjectType)
.with(Lead.Company)
.toLabel(Lead.Status)
.toList();
// USING SCOPE — current user's records only
List<Task> myTasks = SOQL.of(Task.SObjectType)
.with(Task.Subject, Task.Status)
.mineScope()
.toList();
// FOR UPDATE — lock records
List<Contact> locked = SOQL.of(Contact.SObjectType)
.byIds(contactIds)
.forUpdate()
.toList();
// ALL ROWS — include deleted
Integer total = SOQL.of(Contact.SObjectType).count().allRows().toInteger();
// Batch QueryLocator
Database.QueryLocator ql = SOQL.of(Account.SObjectType)
.with(Account.Id, Account.Name)
.whereAre(SOQL.Filter.with(Account.Industry).equal('Technology'))
.toQueryLocator();
// Cursor for large sets
Database.Cursor cursor = SOQL.of(Account.SObjectType)
.with(Account.Id, Account.Name)
.toCursor();
// Pagination cursor
Database.PaginationCursor pCursor = SOQL.of(Account.SObjectType)
.with(Account.Id, Account.Name)
.orderBy(Account.Name)
.setLimit(100)
.toPaginationCursor();© beyond-the-cloud-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .cursor/skills/soql-lib-query-builder of beyond-the-cloud-dev/soql-lib.
Open the folder on GitHubat commit cc06784
Soql Lib Query Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Soql Lib Query Builder this skillbeyond-the-cloud-dev/soql-lib | 154 | — | ~4.3k | Automated safety check: Pass | MIT | |
| Sf DatacloudJaganpro/sf-skills | 424 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Dev SetupPortwood-Global-Solutions/Portwood | 125 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Sf FlowJaganpro/sf-skills | 424 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Automation Sandbox Post Copy Configureforcedotcom/sf-skills | 1.1k | — | ~5.3k | Automated safety check: Notes | Apache-2.0 | |
| Automation Sandbox Post Copy Configureforcedotcom/sf-skills | 1.1k | — | ~5.4k | Automated safety check: Notes | Apache-2.0 |
Jaganpro/sf-skills
Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.
Portwood-Global-Solutions/Portwood
Get from a fresh clone of Portwood to a working, fully-tested Salesforce org.
Jaganpro/sf-skills
Creates and validates Salesforce Flows with 110-point scoring.
forcedotcom/sf-skills
Apply a Salesforce sandbox post-copy automation JSON config against a target org.
forcedotcom/sf-skills
Apply a Salesforce sandbox post-copy automation JSON config against a target org.
gmapsscraper/google-maps-agent-skills
Export Google Maps business data to CSV, JSON, or CRM format (HubSpot, Pipedrive, Salesforce).
beyond-the-cloud-dev/soql-lib
Creates Salesforce Apex selector classes using the SOQL Lib selector pattern.
beyond-the-cloud-dev/soql-lib
Writes unit tests for Salesforce Apex code that uses SOQL Lib (SOQL.cls).
Works with
Categories
Builds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls). Soql Lib Query Builder is an agent skill from beyond-the-cloud-dev/soql-lib.cls).
Soql Lib Query Builder fits situations like: writing any SOQL query with SOQL Lib; tasks that involve ORMs and data access; tasks that involve CRM management.
Run `npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a claude-code`. Or copy the skill folder (.cursor/skills/soql-lib-query-builder in beyond-the-cloud-dev/soql-lib) into .claude/skills/soql-lib-query-builder in your project. Claude Code loads it when a task matches its description.
Run `npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a codex`. Or copy the skill folder (.cursor/skills/soql-lib-query-builder in beyond-the-cloud-dev/soql-lib) into .agents/skills/soql-lib-query-builder in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add beyond-the-cloud-dev/soql-lib --skill soql-lib-query-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/soql-lib-query-builder, .gemini/skills/soql-lib-query-builder, .github/skills/soql-lib-query-builder and .opencode/skills/soql-lib-query-builder in your project.
SKILL.md names no scripts, command-line tools or credentials: Soql Lib Query Builder is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Soql Lib Query Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.3k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Soql Lib Query Builder: Sf Datacloud (Jaganpro/sf-skills, 424 stars), Dev Setup (Portwood-Global-Solutions/Portwood, 125 stars), Sf Flow (Jaganpro/sf-skills, 424 stars) and Automation Sandbox Post Copy Configure (forcedotcom/sf-skills, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
beyond-the-cloud-dev (a GitHub organization) maintains it in beyond-the-cloud-dev/soql-lib, which has 154 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 3, 2026.
Source: beyond-the-cloud-dev/soql-lib on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.