sf-connected-apps by jaganpro/sf-skills
npx skills add https://github.com/jaganpro/sf-skills --skill sf-connected-apps当用户需要在 Salesforce 中进行 OAuth 应用配置时使用此技能:包括连接应用、外部客户端应用、JWT 持有者设置、PKCE 决策、作用域设计,或从旧的连接应用模式迁移到新的 ECA 模式。
当工作涉及以下内容时,使用 sf-connected-apps:
.connectedApp-meta.xml 或 .eca-meta.xml 文件当用户进行以下操作时,请委托给其他技能:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 如果需求是... | 推荐 |
|---|---|
| 简单的单组织 OAuth 应用 | 连接应用 |
| 具有更好密钥处理的新开发 | 外部客户端应用 |
| 多组织 / 打包 / 更强的操作控制 | 外部客户端应用 |
| 直接的遗留兼容性 | 连接应用 |
默认指导原则:
询问或推断:
决定连接应用还是 ECA 是更好的长期选择。
| 用例 | 默认流程 |
|---|---|
| 后端 Web 应用 | 授权码 |
| SPA / 移动端 / 公共客户端 | 授权码 + PKCE |
| 服务器到服务器 / CI/CD | JWT 持有者 |
| 设备 / CLI 认证 | 设备流程 |
| 服务账户风格的应用 | 客户端凭据(通常为 ECA) |
使用提供的资源,而不是从头开始构建:
assets/connected-app-basic.xmlassets/connected-app-oauth.xmlassets/connected-app-jwt.xmlassets/external-client-app.xmlassets/eca-global-oauth.xmlassets/eca-oauth-settings.xmlassets/eca-policies.xml优先考虑:
在交接前,确认:
避免以下反模式:
| 反模式 | 失败原因 |
|---|---|
| 通配符 / 过于宽泛的回调 URL | 令牌拦截风险 |
默认使用 Full 作用域 | 不必要的权限 |
| 公共客户端禁用 PKCE | 代码拦截风险 |
| 将消费者密钥提交到源代码 | 凭据泄露 |
| 自动化场景无轮换 / 证书策略 | 长期运维脆弱 |
默认修复方向:
通常位于:
force-app/main/default/connectedApps/通常涉及多个元数据文件,包括:
重要的文件名注意事项:
.ecaGlblOauth,而不是 .ecaGlobalOauth完成时,按以下顺序报告:
建议格式:
App: <名称>
Type: Connected App | External Client App
Flow: <oauth 流程>
Files: <路径>
Security: <作用域, PKCE, 证书, 密钥, IP 策略>
Next step: <部署, 获取消费者密钥, 或测试认证流程>
| 需求 | 委托给 | 原因 |
|---|---|---|
| 命名凭据 / 调用运行时配置 | sf-integration | 运行时集成设置 |
| 部署应用元数据 | sf-deploy | 组织验证和部署 |
| Apex 令牌或刷新处理 | sf-apex | 实现逻辑 |
| 部署后的权限审查 | sf-permissions | 访问治理 |
| 分数 | 含义 |
|---|---|
| 80+ | 可用于生产的 OAuth 应用配置 |
| 54–79 | 可用但需要加固审查 |
| < 54 | 阻止部署,直到修复 |
每周安装次数
251
代码仓库
GitHub 星标数
219
首次出现时间
2026年1月22日
安全审计
安装于
codex243
cursor242
opencode241
gemini-cli240
github-copilot237
amp235
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.
Use sf-connected-apps when the work involves:
.connectedApp-meta.xml or .eca-meta.xml filesDelegate elsewhere when the user is:
| 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:
Ask for or infer:
Decide whether a Connected App or ECA is the better long-term fit.
| 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) |
Use the provided assets instead of building from scratch:
assets/connected-app-basic.xmlassets/connected-app-oauth.xmlassets/connected-app-jwt.xmlassets/external-client-app.xmlassets/eca-global-oauth.xmlassets/eca-oauth-settings.xmlassets/eca-policies.xmlFavor:
Before handoff, confirm:
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:
Usually lives under:
force-app/main/default/connectedApps/Typically involves multiple metadata files, including:
Important file-name gotcha:
.ecaGlblOauth, not .ecaGlobalOauthWhen finishing, report in this order:
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>
| 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 |
| Score | Meaning |
|---|---|
| 80+ | production-ready OAuth app config |
| 54–79 | workable but needs hardening review |
| < 54 | block deployment until fixed |
Weekly Installs
251
Repository
GitHub Stars
219
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex243
cursor242
opencode241
gemini-cli240
github-copilot237
amp235
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
68,100 周安装