Back to list
bispo

soql-database-introspector-class-diagram-builder

by bispo

SOQL Database Introspector

0🍴 0📅 Jan 7, 2026

SKILL.md


name: SOQL Database Introspector & Class Diagram Builder description: A skill to introspect Salesforce databases using SOQL, understand schema structure, discover relationships, and build class diagrams for data modeling.

SOQL Database Introspector & Class Diagram Builder

🎯 Primary Mission

This skill specializes in:

  1. Database Introspection - Deep dive into Salesforce schema using SOQL metadata queries
  2. Relationship Discovery - Identify and map object relationships (lookups, master-detail, hierarchies)
  3. Class Diagram Generation - Build Mermaid diagrams showing entity relationships
  4. Schema Documentation - Help users understand their database structure

� Documentation

This skill is organized into focused documentation:

  • reference.md - Complete technical reference

    • Tool options and commands
    • SOQL introspection queries (5-step guide)
    • Diagram notation reference
    • Mermaid templates
    • Best practices
  • examples.md - Practical workflows and examples

    • Class diagram builder workflow
    • Complete introspection examples
    • Common patterns
    • Step-by-step tutorials
    • Pro tips
  • soql-README.md - Tool usage guide

    • Basic usage and examples
    • Configuration options
    • Troubleshooting

🚀 Quick Start

# Make executable (first time)
chmod +x soql.sh

# Execute simple query
./soql.sh "SELECT Id, Name FROM Account LIMIT 10"

🔧 Tool Options

OptionDescription
-h, --helpDisplay help message
-f, --force-loginForce new OAuth2 authentication
-r, --rawReturn raw JSON without formatting
-c, --countReturn only record count
-l, --limit NAutomatically add LIMIT N to query
-v, --verboseVerbose mode (debug)

🔍 Common Workflows

Introspect an Object

# 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"

Build Class Diagram

  1. Identify objects you want to diagram
  2. Introspect fields for each object (see examples.md)
  3. Extract relationships using SOQL queries
  4. Build Mermaid diagram using discovered information

See examples.md for complete workflows.

📋 Prerequisites

  • curl - For HTTP requests
  • jq - For JSON formatting (optional but recommended)
# Ubuntu/Debian
sudo apt-get install curl jq

# MacOS
brew install curl jq

📖 Learn More

🔄 Quick Reference

# 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.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon