A skill to introspect Salesforce databases using SOQL, understand schema structure, discover relationships, and build class diagrams for data modeling.
This skill specializes in:
This skill is organized into focused documentation:
reference.md - Complete technical reference
- Practical workflows and examples
soql-README.md - Tool usage guide
# Make executable (first time)
chmod +x soql.sh
# Execute simple query
./soql.sh "SELECT Id, Name FROM Account LIMIT 10"
| Option | Description |
|---|---|
-h, --help | Display help message |
-f, --force-login | Force new OAuth2 authentication |
-r, --raw | Return raw JSON without formatting |
-c, --count | Return only record count |
-l, --limit N | Automatically add LIMIT N to query |
-v, --verbose | Verbose mode (debug) |
# Get all fields
./soql.sh "SELECT QualifiedApiName, DataType, Label
FROM FieldDefinition
WHERE EntityDefinition.QualifiedApiName = 'Account'
LIMIT 200"
# Get relationships
./soql.sh "SELECT QualifiedApiName, ReferenceTargetField, RelationshipName
FROM FieldDefinition
WHERE EntityDefinition.QualifiedApiName = 'Account'
AND ReferenceTargetField != null"
See examples.md for complete workflows.
curl - For HTTP requestsjq - For JSON formatting (optional but recommended)# Ubuntu/Debian
sudo apt-get install curl jq
# MacOS
brew install curl jq
# List custom objects
./soql.sh "SELECT QualifiedApiName, Label FROM EntityDefinition WHERE QualifiedApiName LIKE '%__c'"
# Count records
./soql.sh --count "SELECT COUNT() FROM Account"
# Sample data
./soql.sh "SELECT FIELDS(ALL) FROM Account LIMIT 1"
For complete query reference, see reference.md.