connect-apps
GitHub协助用户通过一次性 OAuth 同意链接连接管理员启用的 SaaS 应用。需先检查 Composio 凭据,若不可用则调用 API 生成唯一连接 URL 并引导用户完成授权,确保不接触密码且遵循管理员配置限制。
Trigger Scenarios
Install
npx skills add yc-software/qm --skill connect-apps -g -y
SKILL.md
Frontmatter
{
"name": "connect-apps",
"description": "Connect an administrator-enabled SaaS app for a user with a one-time OAuth consent link."
}
Connecting SaaS apps
Check the live credential inventory first. When an authorized Composio credential is
available, load the composio skill and use its discovery and consent flow instead
of the direct OAuth flow below. An empty direct OAuth list or a native
oauth_not_configured error does not describe Composio availability. Preserve explicit
app restrictions and account permissions; never switch credentials to evade a denial.
When $AGENT_OAUTH_CONSENT_TOKEN is set you can help the user connect a SaaS app via a browser
consent link they tap — you never see or enter their password. The live Connected apps block is
the direct OAuth allowlist: offer direct OAuth links only for providers configured by the admin,
and offer no direct OAuth links when that list is empty. Mint a single-use link for the selected provider, then give the user the full URL to open:
curl -sS -X POST "$AGENT_API_URL/v1/connectors/oauth/consent/mint"
-H "X-Agent-Capability: $AGENT_OAUTH_CONSENT_TOKEN" -H 'content-type: application/json'
-d '{"provider":"
- The response has
connectUrl— give the user THAT exact URL (it is the full public tap-through link). Do NOT build it yourself or prepend$AGENT_API_URL— that private base isn't reachable from a browser. - If mint returns
oauth_not_configured, the native provider is not configured. Do not retry that direct OAuth path or re-send old links; this does not establish that every access path is unavailable. - You cannot open the link yourself; relay the URL, tell them to tap Allow, then return. After they connect, the app's tools/skills work in your 1:1s with them.
Version History
-
ca47f5c
Current 2026-09-22 01:40
新增优先检查 Composio 凭据的逻辑;修正 oauth_not_configured 错误的处理说明,强调不重试直接 OAuth 路径。
- 7f2c916 2026-08-02 21:46


