--- name: sc-provider description: "SI-Coder provider + connection control plane for humans and agents. Manage user-scoped labeled provider connections, auth methods/scopes, custom provider metadata, secret-safe credential status/handoffs, injected execution, audits, and safe updates without putting provider secrets in chat/tool JSON." use_when: "Use when the task matches this skill scope: SI-Coder provider + connection control plane for humans and agents. Manage user-scoped labeled provider connections, auth methods/scopes, custom provider metadata, secret-safe credential status/handoffs, injected execution, audits, and safe updates without putting provider secrets in chat/tool JSON." do_not_use_when: "Do not use when the task is outside this skill scope or a more specific SI-Coder skill owns the requested outcome." required_tools: [] security_constraints: "Never request, print, or persist plaintext credentials in chat/tool payloads; use SI-Coder safe credential handoffs." references: [] compatibility: "Standalone SI-Coder; host invocation syntax and available tools may vary." --- # /sc-provider — provider + secret control plane ## Language Keep durable instructions in English. **Reply in the user's language** unless they request another language. Use this whenever an agent needs to discover, configure, rotate, remove, or consume API/provider credentials. ## Non-technical default UX — mandatory SI-Coder is primarily for people who want a working web app, not an infrastructure lesson. **Lead with the outcome, hide the plumbing.** A valid user request can be as simple as: > "Create a salon booking app and put it on my domain." From that sentence, the agent should normally choose the stack, database/data service, hosting route, repository strategy, deployment method, domain records, and verification approach itself. Rules: 1. **Speak in goals:** "publish the app", "connect the account", "connect the domain", "store the app data". Do not lead with terms such as environment variable, DNS record, deploy key, compose, container, build pipeline, or provider routing. 2. **One user action at a time.** Never dump a setup checklist when only one permission/account connection blocks progress. 3. **Do not ask users to choose technology** unless they explicitly care. Choose sensible defaults and keep the technology name in optional technical details. 4. **Do not ask a question that tools/repo state can answer.** Inspect first, then ask only the unresolved product/domain/account decision. 5. **Credentials are framed as permissions, not secrets.** Say "I need permission to use the email service" first. Then show the official create/connect action, where access is stored, and what SI-Coder will do next. Put env-key names and terminal commands under optional technical details unless the user must run the command. 6. **Never ask the user to copy values between services** when a connector/server-side flow can do it safely. 7. **Progress is product-oriented:** `Build the app → Prepare data → Publish → Connect domain → Verify`, not internal provider phases. 8. Every completion message must state what is now working and then offer exactly one `[rekomendasi]` next step. 9. Technical users can ask for "technical details", `--technical`, JSON, or provider-specific skills. Do not force those details on everyone else. When a technical failure occurs, translate it first: - preferred: "The domain is not connected yet. I am fixing the connection between the domain and the website." - optional detail: "The CNAME does not match the hosting target yet." Never hide a failure, but explain its user impact before its implementation detail. ## Non-negotiable secret boundary **Never ask the user to paste an API key/token/password into chat or tool JSON. Never put a secret value in argv.** The agent may handle provider/connection **metadata** and credential **status**, but not plaintext values. First resolve the user + labeled connection. For a new or rotated direct secret, hand the user a connection-specific terminal command such as: ```bash sc user credential-set personal resend RESEND_API_KEY --connection transactional-email ``` `sc` reads secret keys in hidden TTY mode. Non-interactive trusted local flows may use `--stdin`, `--from-env NAME`, or `--from-file PATH`; the value is never echoed by `sc`. To consume credentials, run the actual tool under the resolved profile: ```bash sc run -- [args...] ``` This injects only resolved `source=sc` credential sets into the child without printing secret values. `sc run` deliberately refuses `source=composio` / `source=native-mcp`; resolve those connections in SI-Coder, then execute through the returned Connected Account or provider-owned MCP session. ## SC + Composio hybrid routing SC is the local secret/control-plane boundary. Composio is a connected-account boundary for providers that benefit from managed tool execution. Read `../../references/provider-routing.md` before choosing a backend. Runtime policy: - **Hosted Claude Web/ChatGPT-style agent** → full Composio for GitHub, Convex Cloud, Vercel, and Hostinger. No local SC vault is required. - **Local + no VPS** → GitHub in SC; Vercel/Convex/Hostinger prefer Composio and may fall back to SC. - **Local + VPS** → GitHub/Dokploy/self-hosted Convex in SC; Hostinger may use Composio or SC. - Composio project key itself belongs in SC only when a local runtime needs API-key access. A hosted native connector should use its own connection flow. When using Composio, ask for a secure connection link, never the underlying provider secret. Hosted mode must not fall back to asking for a raw key in chat. ## Provider CRUD Built-in provider definitions are code-reviewed and immutable. Custom provider definitions live at `~/.config/si-coder/providers.json` (0600) and contain metadata only. ```bash sc providers --json sc providers create openai --title OpenAI --key OPENAI_API_KEY --prefix sk- --min-length 20 sc providers update openai --blurb "OpenAI project API" sc providers key-add openai OPENAI_ORG_ID --public --note "optional org id" sc providers key-rm openai OPENAI_ORG_ID --yes sc providers delete openai --yes ``` Deleting a custom provider/key also purges corresponding managed values from legacy profiles, named connection stores, and the managed `~/.bashrc` block. User-owned exports outside the managed block are reported and left untouched. ## Credential source guidance — one SSOT Every built-in credential field declares its acquisition metadata in `lib/providers.js`: - `url` — official/reference dashboard or credential endpoint when one exists, - `cmd` — safe local command when the value is generated/discovered locally, - `navigation[]` — the exact menu/click path to reach or create it, - `note` — scope/permission caveats. `lib/credential-guidance.js` renders that same metadata in the Finder `PREVIEW`, hidden-input CLI flow, onboarding, and `sc.user.credential.request`. Agents should surface `referenceUrl` + `navigation` before asking the user to enter anything locally. Do not invent a dashboard path when the registry already provides one. ## Named connections are the credential boundary The user-first hierarchy is now: ```text User → Provider → Connection(alias) → Credential fields ``` One user may own several isolated connections for the same provider (work/personal GitHub, multiple Convex deployments, multiple Vercel teams, client accounts, etc.). Each connection has a unique label/alias within that user+provider, one **source/backend**, one auth method, and one scope. Only `source=sc` has a private `0600` env file; external sources keep provider credentials outside SI-Coder. ```bash sc user connections [provider] sc user connection-add "