home / skills / lobehub / lobe-chat / add-provider-doc

add-provider-doc skill

/.agents/skills/add-provider-doc

This skill guides you through creating and updating provider documentation, env vars, Docker configs, and image resources for new AI providers.

npx playbooks add skill lobehub/lobe-chat --skill add-provider-doc

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.2 KB
---
name: add-provider-doc
description: Guide for adding new AI provider documentation. Use when adding documentation for a new AI provider (like OpenAI, Anthropic, etc.), including usage docs, environment variables, Docker config, and image resources. Triggers on provider documentation tasks.
---

# Adding New AI Provider Documentation

Complete workflow for adding documentation for a new AI provider.

## Overview

1. Create usage documentation (EN + CN)
2. Add environment variable documentation (EN + CN)
3. Update Docker configuration files
4. Update .env.example
5. Prepare image resources

## Step 1: Create Provider Usage Documentation

### Required Files

- `docs/usage/providers/{provider-name}.mdx` (English)
- `docs/usage/providers/{provider-name}.zh-CN.mdx` (Chinese)

### Key Requirements

- 5-6 screenshots showing the process
- Cover image for the provider
- Real registration and dashboard URLs
- Pricing information callout
- **Never include real API keys** - use placeholders

Reference: `docs/usage/providers/fal.mdx`

## Step 2: Update Environment Variables Documentation

### Files to Update

- `docs/self-hosting/environment-variables/model-provider.mdx` (EN)
- `docs/self-hosting/environment-variables/model-provider.zh-CN.mdx` (CN)

### Content Format

```markdown
### `{PROVIDER}_API_KEY`
- Type: Required
- Description: API key from {Provider Name}
- Example: `{api-key-format}`

### `{PROVIDER}_MODEL_LIST`
- Type: Optional
- Description: Control model list. Use `+` to add, `-` to hide
- Example: `-all,+model-1,+model-2=Display Name`
```

## Step 3: Update Docker Files

Update all Dockerfiles at the **end** of ENV section:

- `Dockerfile`
- `Dockerfile.database`
- `Dockerfile.pglite`

```dockerfile
# {New Provider}
{PROVIDER}_API_KEY="" {PROVIDER}_MODEL_LIST=""
```

## Step 4: Update .env.example

```bash
### {Provider Name} ###
# {PROVIDER}_API_KEY={prefix}-xxxxxxxx
```

## Step 5: Image Resources

- Cover image
- 3-4 API dashboard screenshots
- 2-3 LobeChat configuration screenshots
- Host on LobeHub CDN: `hub-apac-1.lobeobjects.space`

## Checklist

- [ ] EN + CN usage docs
- [ ] EN + CN env var docs
- [ ] All 3 Dockerfiles updated
- [ ] .env.example updated
- [ ] All images prepared
- [ ] No real API keys in docs

Overview

This skill guides contributors through adding documentation and configuration for a new AI provider. It covers usage pages, environment variables, Docker updates, .env.example changes, and required image assets. The goal is consistent, localized docs plus safe, reproducible configuration without exposing real keys.

How this skill works

It inspects the repository layout and prescribes the files and sections to create or update, including English and Chinese usage pages. It specifies exact environment variable entries, Dockerfile ENV additions, and .env.example patterns. It also lists required images and hosting expectations so assets are ready for CDN upload.

When to use it

  • Adding a new AI provider integration (OpenAI, Anthropic, Gemini, etc.)
  • Creating usage guides for provider features and setup
  • Updating self-hosted environment variable references
  • Preparing Docker and example environment configs for deployment

Best practices

  • Always produce both English and Simplified Chinese usage docs for parity
  • Include 5–6 screenshots showing registration, dashboard, and setup steps
  • Use placeholder API keys only; never paste real keys into docs or examples
  • Add environment variable docs with TYPE/Description/Example blocks exactly as specified
  • Update all three Dockerfiles and the .env.example to avoid runtime surprises

Example use cases

  • Add docs and assets for a new provider so users can configure it via the UI and .env
  • Document provider model mappings using {PROVIDER}_MODEL_LIST examples to control visible models
  • Prepare Docker ENV defaults so containers start with empty placeholders for keys
  • Provide clear pricing and dashboard links so teams can evaluate provider costs quickly

FAQ

Do I need both language files for every provider?

Yes. Create an English and a Simplified Chinese usage document so the product remains bilingual and consistent.

What images are required and where should they be hosted?

Provide a cover image, 3–4 API dashboard screenshots, and 2–3 LobeChat config screenshots. Host them on the LobeHub CDN (hub-apac-1.lobeobjects.space) and reference CDN URLs in the docs.