Agent skill

sf-connected-apps

Salesforce Connected Apps and OAuth configuration with 120-point scoring. TRIGGER when: user configures OAuth flows, JWT bearer auth, Connected Apps, or touches .connectedApp-meta.xml / .eca-meta.xml files. DO NOT TRIGGER when: Named Credentials for callouts (use sf-integration), permission policies (use sf-permissions), or API endpoint code (use sf-apex).

Stars 252
Forks 63

Install this agent skill to your Project

npx add-skill https://github.com/Jaganpro/sf-skills/tree/main/skills/sf-connected-apps

Metadata

Additional technical details for this skill

author
Jag Valaiyapathy
scoring
120 points across 6 categories
version
1.1.0

SKILL.md

sf-connected-apps: Salesforce Connected Apps & External Client Apps

Use this skill when the user needs OAuth app configuration in Salesforce: Connected Apps, External Client Apps (ECAs), JWT bearer setup, PKCE decisions, scope design, or migration from older Connected App patterns to newer ECA patterns.

When This Skill Owns the Task

Use sf-connected-apps when the work involves:

  • .connectedApp-meta.xml or .eca-meta.xml files
  • OAuth flow selection and callback / scope setup
  • JWT bearer auth, device flow, client credentials, or auth-code decisions
  • Connected App vs External Client App architecture choices
  • consumer-key / secret / certificate handling strategy

Delegate elsewhere when the user is:

  • configuring Named Credentials or runtime callouts → sf-integration
  • analyzing access / permission policy assignments → sf-permissions
  • writing Apex token-handling code → sf-apex
  • deploying metadata to orgs → sf-deploy

First Decision: Connected App or External Client App

If the need is... Prefer
simple single-org OAuth app Connected App
new development with better secret handling External Client App
multi-org / packaging / stronger operational controls External Client App
straightforward legacy compatibility Connected App

Default guidance:

  • choose ECA for new regulated, packageable, or automation-heavy solutions
  • choose Connected App when simplicity and legacy compatibility matter more

Required Context to Gather First

Ask for or infer:

  • app type: Connected App or ECA
  • OAuth flow: auth code, PKCE, JWT bearer, device, client credentials
  • client type: confidential vs public
  • callback URLs / redirect surfaces
  • required scopes
  • distribution model: local org only vs packageable / multi-org
  • whether certificates or secret rotation are required

Recommended Workflow

1. Choose the app model

Decide whether a Connected App or ECA is the better long-term fit.

2. Choose the OAuth flow

Use case Default flow
backend web app Authorization Code
SPA / mobile / public client Authorization Code + PKCE
server-to-server / CI/CD JWT Bearer
device / CLI auth Device Flow
service account style app Client Credentials (typically ECA)

3. Start from the right template

Use the provided assets instead of building from scratch:

  • assets/connected-app-basic.xml
  • assets/connected-app-oauth.xml
  • assets/connected-app-jwt.xml
  • assets/external-client-app.xml
  • assets/eca-global-oauth.xml
  • assets/eca-oauth-settings.xml
  • assets/eca-policies.xml

4. Apply security hardening

Favor:

  • least-privilege scopes
  • explicit callback URLs
  • PKCE for public clients
  • certificate-based auth where appropriate
  • rotation-ready secret / key handling
  • IP restrictions when realistic and maintainable

5. Validate deployment readiness

Before handoff, confirm:

  • metadata file naming is correct
  • scopes are justified
  • callback and auth model match the real client type
  • secrets are not embedded in source

High-Signal Security Rules

Avoid these anti-patterns:

Anti-pattern Why it fails
wildcard / overly broad callback URLs token interception risk
Full scope by default unnecessary privilege
PKCE disabled for public clients code interception risk
consumer secret committed to source credential exposure
no rotation / cert strategy for automation brittle long-term ops

Default fix direction:

  • narrow scopes
  • constrain callbacks
  • enable PKCE for public clients
  • keep secrets outside version control
  • use JWT certificates or controlled secret storage where appropriate

Metadata Notes That Matter

Connected App

Usually lives under:

  • force-app/main/default/connectedApps/

External Client App

Typically involves multiple metadata files, including:

  • base ECA header
  • global OAuth settings
  • instance OAuth settings
  • optional policy metadata

Important file-name gotcha:

  • the global OAuth suffix is .ecaGlblOauth, not .ecaGlobalOauth

Output Format

When finishing, report in this order:

  1. App type chosen
  2. OAuth flow chosen
  3. Files created or updated
  4. Security decisions
  5. Next deployment / testing step

Suggested shape:

text
App: <name>
Type: Connected App | External Client App
Flow: <oauth flow>
Files: <paths>
Security: <scopes, PKCE, certs, secrets, IP policy>
Next step: <deploy, retrieve consumer key, or test auth flow>

Cross-Skill Integration

Need Delegate to Reason
Named Credential / callout runtime config sf-integration runtime integration setup
deploy app metadata sf-deploy org validation and deployment
Apex token or refresh handling sf-apex implementation logic
permission review after deployment sf-permissions access governance

Reference Map

Start here

  • references/oauth-flows-reference.md
  • references/security-checklist.md
  • references/testing-validation-guide.md

Migration / examples

  • references/migration-guide.md
  • references/example-usage.md
  • assets/

Score Guide

Score Meaning
80+ production-ready OAuth app config
54–79 workable but needs hardening review
< 54 block deployment until fixed

Expand your agent's capabilities with these related and highly-rated skills.

Jaganpro/sf-skills

sf-diagram-mermaid

Salesforce architecture diagrams using Mermaid with ASCII fallback. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use sf-diagram-nanobananapro), or asks about non-Salesforce systems.

252 63
Explore
Jaganpro/sf-skills

sf-integration

Salesforce integration architecture with 120-point scoring. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use sf-connected-apps), Apex-only logic (use sf-apex), or data import/export (use sf-data).

252 63
Explore
Jaganpro/sf-skills

sf-deploy

Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex/LWC code (use sf-apex/sf-lwc), creating metadata XML (use sf-metadata), or querying org data (use sf-data).

252 63
Explore
Jaganpro/sf-skills

sf-industry-commoncore-omnistudio-analyze

Cross-cutting OmniStudio analysis skill for namespace detection, dependency visualization, and impact analysis across OmniScripts, FlexCards, Integration Procedures, and Data Mappers. TRIGGER when: user asks about OmniStudio dependencies, wants namespace detection (Core vs vlocity_cmt vs vlocity_ins), needs impact analysis, or requests dependency diagrams. DO NOT TRIGGER when: authoring OmniScripts (use sf-industry-commoncore-omniscript), building FlexCards (use sf-industry-commoncore-flexcard), creating Integration Procedures (use sf-industry-commoncore-integration-procedure), or configuring Data Mappers (use sf-industry-commoncore-datamapper).

252 63
Explore
Jaganpro/sf-skills

sf-industry-commoncore-callable-apex

Salesforce Industries Common Core (OmniStudio/Vlocity) Apex callable generation and review with 120-point scoring. TRIGGER when: user creates or reviews System.Callable classes, migrates `VlocityOpenInterface` / `VlocityOpenInterface2`, or builds Industries callable extensions used by OmniStudio, Integration Procedures, or DataRaptors. DO NOT TRIGGER when: generic Apex classes/triggers (use sf-apex), building Integration Procedures (use sf-industry-commoncore-integration-procedure), authoring OmniScripts (use sf-industry-commoncore-omniscript), configuring Data Mappers (use sf-industry-commoncore-datamapper), or analyzing namespace/dependency issues (use sf-industry-commoncore-omnistudio-analyze).

252 63
Explore
Jaganpro/sf-skills

sf-datacloud-act

Salesforce Data Cloud Act phase. TRIGGER when: user manages activations, activation targets, data actions, or downstream delivery of Data Cloud audiences and data. DO NOT TRIGGER when: the task is segment creation (use sf-datacloud-segment), data retrieval/search work (use sf-datacloud-retrieve), or STDM/session tracing (use sf-ai-agentforce-observability).

252 63
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results