Get the FREE Ultimate OpenClaw Setup Guide →

Provider Integration

npx machina-cli add skill hex/claude-council/provider-integration --openclaw
Files (1)
SKILL.md
1.4 KB

Adding AI Providers to Claude Council

Provider Script Interface

Each provider is a shell script in scripts/providers/ that:

  1. Accepts a prompt as the first argument
  2. Outputs the AI response to stdout
  3. Exits 0 on success, non-zero on failure

Quick Start

  1. Create scripts/providers/{name}.sh (see api-patterns.md for templates)
  2. chmod +x scripts/providers/{name}.sh
  3. Set {NAME}_API_KEY environment variable
  4. Test: ./scripts/providers/{name}.sh "Hello"

Current Providers

ProviderAPI Key VariableDefault Model
GeminiGEMINI_API_KEYgemini-3-flash-preview
OpenAIOPENAI_API_KEYgpt-5.2-codex
GrokGROK_API_KEYgrok-4-1-fast-reasoning
PerplexityPERPLEXITY_API_KEYsonar-pro

Troubleshooting

  • Not discovered: Check API key is set and script is executable
  • API errors: Verify key, check rate limits, confirm model name
  • Parse fails: Add echo "$RESPONSE" to debug, check response format

Reference

For API patterns and code templates, see api-patterns.md in this directory.

Source

git clone https://github.com/hex/claude-council/blob/main/skills/provider-integration/SKILL.mdView on GitHub

Overview

This skill covers adding new providers to Claude Council, configuring provider API keys, and debugging the provider script interface. It explains how each provider is a shell script under scripts/providers/, how to test prompts, and how to troubleshoot connection issues.

How This Skill Works

Each provider is a shell script located in scripts/providers/ that accepts a prompt as its first argument, outputs the AI response to stdout, and exits with status 0 on success or non-zero on failure. You configure access by setting the provider-specific API key environment variable (e.g., GEMINI_API_KEY or OPENAI_API_KEY) and verify behavior with a simple test prompt.

When to Use It

  • Adding a new provider to Claude Council
  • Configuring API keys and default model for a provider
  • Troubleshooting provider connections, not discovered, or API errors
  • Verifying the provider script interface and I/O behavior
  • Extending Claude Council by integrating additional providers

Quick Start

  1. Step 1: Create scripts/providers/{name}.sh and implement the provider interface
  2. Step 2: chmod +x scripts/providers/{name}.sh and ensure the appropriate API key env var is set
  3. Step 3: Run ./scripts/providers/{name}.sh "Hello" to verify a clean 0 exit and stdout

Best Practices

  • Place each provider as scripts/providers/{name}.sh
  • Ensure the script is executable with chmod +x
  • Set the correct environment variable for the provider API key (e.g., GEMINI_API_KEY, OPENAI_API_KEY)
  • Test with a simple prompt (e.g., 'Hello') to confirm stdout and exit status
  • Add lightweight debug logging (e.g., echo "$RESPONSE") when parsing outputs or errors

Example Use Cases

  • Add Gemini provider and set GEMINI_API_KEY, then run ./scripts/providers/gemini.sh 'Hello'
  • Add OpenAI provider with OPENAI_API_KEY and verify default model gpt-5.2-codex
  • Troubleshoot not discovered: confirm API key presence and that scripts/providers/gemini.sh is executable
  • Resolve API errors by checking key validity, rate limits, and the correct model name
  • Diagnose parse failures by printing the raw RESPONSE to stdout for inspection

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers