跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

add-provider

Add a DeepChat LLM provider through explicit reviewed source changes. Use when a developer asks Codex to add a provider, provider profile, upstream provider config, model catalog mapping, provider auth behavior, or a special provider adapter in this repository.

AI 与智能体6.4k.agents/skills/add-provider/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/thinkinaixyz/deepchat/add-provider/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Add Provider

Goal

Generate DeepChat provider integration changes against the current provider architecture. Keep provider display data in PublicProviderConf, map runtime behavior to known transports, and use a special provider implementation only when the API behavior requires one.

Required Inputs

Collect or derive these before editing source:

  • Provider ID in kebab case.
  • Display name.
  • API type or known transport family.
  • Default base URL.
  • Auth type: API key, no auth, OAuth, profile credentials, or provider-specific credential.
  • Model metadata source: built-in config, provider-db, config-db, live model fetch, or custom only.
  • Test model ID and check strategy.
  • Official website, API key URL, docs URL, model list URL.
  • Request quirks: headers, endpoint suffixes, route rewrites, streaming shape, tool-call support, reasoning support, image/audio/embedding endpoints, or proxy requirements.

Supported Paths

OpenAI-Compatible API

Use this when the provider supports OpenAI Chat Completions or Responses-compatible HTTP APIs.

Typical files:

  • src/main/provider/defaults.ts
  • src/main/provider/providerId.ts
  • src/main/provider/providerRegistry.ts for runtime strategies and derived public catalog membership
  • test/main/** provider registry or creation tests

Existing Native Transport

Use this when the provider maps to an existing DeepChat transport such as Anthropic, Gemini, Vertex, Azure, Bedrock, Ollama, or ACP.

Typical files:

  • src/main/provider/defaults.ts
  • src/main/provider/providerRegistry.ts
  • Settings components only when the existing generic form lacks required fields
  • Focused tests for provider creation and connection checks

Special Provider

Use this when auth, request shape, streaming, discovery, or error handling differs from existing transports.

Typical files:

  • src/main/provider/providers/<providerName>Provider.ts
  • src/main/provider/<providerName>Adapter.ts
  • src/main/provider/managers/providerInstanceManager.ts
  • src/shared/contracts/routes/* and src/renderer/api/*Client.ts for interactive auth
  • src/renderer/settings/components/* for provider-specific settings UI
  • Main and renderer tests covering the new behavior

Guardrails

  • Do not introduce ProviderRuntimeDefinition, generated runtime manifests, or runtime package-name inference.
  • Do not install provider SDK packages automatically.
  • Do not execute provider logic in the renderer.
  • Do not store new OAuth credentials in provider API-key fields.
  • Do not add a special provider when a known transport and explicit config are sufficient.
  • Reject the request when the required inputs cannot identify a safe path.

Workflow

  1. Read docs/features/provider-runtime/spec.md when the provider work touches the provider runtime scope. Also read plan.md if it exists for an active provider-runtime goal. Treat any legacy tasks.md as migration input rather than another execution tracker.
  2. Inspect the current provider files before editing:
    • src/main/provider/defaults.ts
    • src/main/provider/providerId.ts
    • src/main/provider/providerRegistry.ts
    • src/main/provider/aiSdk/providerFactory.ts
    • src/main/provider/managers/providerInstanceManager.ts
    • src/renderer/settings/components/ProviderApiConfig.vue
  3. Classify the request into one supported path.
  4. Add the smallest explicit source changes for that path.
  5. After implementation, assess provider creation, auth handling, and model discovery for durable regression coverage; add only the smallest contract-level tests warranted.
  6. Update an active SDD plan.md as coherent implementation slices land, when one exists. For a legacy tasks.md, merge remaining work into the existing plan; without one, keep a single-slice complex bug checklist in spec.md and create plan.md for feature, architecture, or multi-slice bug work. Do not update or recreate the task file.
  7. Run:
pnpm run format
pnpm run i18n
pnpm run lint
pnpm run typecheck

Run focused main/renderer tests for any touched provider code.

Output Checklist

Report:

  • Provider ID and API type.
  • Selected path.
  • Files changed.
  • Runtime transport or special provider class.
  • Credential storage location.
  • Model metadata source.
  • Check strategy and test model.
  • Validation commands run.

相似的 Skill

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI 与智能体

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI 与智能体

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI 与智能体

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI 与智能体

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI 与智能体

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI 与智能体