Sf connected apps

From Jaganpro/sf-skills · View interactive version

Sf connected apps is an AI agent skill from the GitHub repository Jaganpro/sf-skills. 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

How to use this skill

Skill file

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:

Delegate elsewhere when the user is:


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:


Required Context to Gather First

Ask for or infer:


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:

If you need source-controlled ECA OAuth security metadata, retrieve it from an org first and treat the retrieved file as the schema source of truth:

4. Apply security hardening

Favor:

5. Validate deployment readiness

Before handoff, confirm:


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:


Metadata Notes That Matter

Connected App

Usually lives under:

External Client App

Current source-supported ECA metadata uses multiple top-level source directories, not a single externalClientApps/ folder:

Important file-name gotchas:


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:

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

Migration / examples


Score Guide

| Score | Meaning |

|---|---|

| 80+ | production-ready OAuth app config |

| 54–79 | workable but needs hardening review |

| < 54 | block deployment until fixed |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.