Agent Skills › NicholasFlemmer/styx-app › provider-adapter

provider-adapter

GitHub

指导如何为系统添加或修改目标提供商适配器,涵盖连接模式、健康检查、令牌管理及测试。

.claude/skills/provider-adapter/SKILL.md NicholasFlemmer/styx-app

Trigger Scenarios

需要添加新的云服务商或数据库提供商支持 需要修改现有提供商的连接逻辑或认证方式

Install

npx skills add NicholasFlemmer/styx-app --skill provider-adapter -g -y
More Options

Non-standard path

npx skills add https://github.com/NicholasFlemmer/styx-app/tree/main/.claude/skills/provider-adapter -g -y

Use without installing

npx skills use NicholasFlemmer/styx-app@provider-adapter

指定 Agent (Claude Code)

npx skills add NicholasFlemmer/styx-app --skill provider-adapter -a claude-code -g -y

安装 repo 全部 skill

npx skills add NicholasFlemmer/styx-app --all -g -y

预览 repo 内 skill

npx skills add NicholasFlemmer/styx-app --list

SKILL.md

Frontmatter
{
    "name": "provider-adapter",
    "description": "Add or modify a target provider (vercel, aws, gcp, supabase, github, ssh, or a new one) - connect modes (CLI login, token, OAuth, keys), test and health, token issue\/revoke and scoping, scope classification, shims, fixtures and tests.",
    "allowed-tools": "Read, Grep, Edit, Write, Bash(pnpm:*), WebFetch",
    "argument-hint": "<provider>"
}

Provider adapter: $ARGUMENTS

The full, current walkthrough is docs/contributing/adding-a-target.md (worked example: Supabase). Read it first and follow its "Adding yours" checklist; this is the short version.

  1. Add the id to providerSchema (packages/core/src/model/common.ts) and the second Provider union in apps/desktop/src/main/providers/types.ts; targets.provider has a SQL CHECK, so add a table-rebuild migration (/db-migration).
  2. Implement ProviderAdapter in apps/desktop/src/main/providers/$0.ts: connect (CLI login first, then token / OAuth / keys under Advanced), test, health, issue, revoke, scopeOfCommand(argv) (fails closed: unknown commands are the widest scope). Register it in providers/index.ts.
  3. Secrets go through CredentialVault only, behind credentialRef; config holds non-secret ids. Report scoped honestly: an unscoped prod credential needs MFA even for reads.
  4. Shims are generic (packages/cli/src/wrap.ts + exec_authorize); add the CLI name to the shim tool list, the stripped env vars and the secret shapes the guide lists.
  5. Copy and UI: provider names, connect bodies and the renderer's provider lists (see the guide's checklist).
  6. Tests: MemoryVault, stubbed fetch, FakeCliRunner, a scope table including "fails closed", the registry test. Fake credentials are marked FIXTURE; never call real providers.
  7. Run the security-reviewer subagent.

Version History

  • 1d72019 Current 2026-10-18 15:23

Same Skill Collection

.claude/skills/db-migration/SKILL.md
.claude/skills/ipc-command/SKILL.md
.claude/skills/port-screen/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/run-app/SKILL.md
.claude/skills/spec-lookup/SKILL.md
.claude/skills/state-machine-change/SKILL.md
.claude/skills/ui-component/SKILL.md
.claude/skills/visual-diff/SKILL.md

Metadata

Files
0
Version
1d72019
Hash
cf2e9b64
Indexed
2026-10-18 15:23

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-18 20:43
浙ICP备14020137号-1