Provider Integration
npx machina-cli add skill hex/claude-council/provider-integration --openclawAdding AI Providers to Claude Council
Provider Script Interface
Each provider is a shell script in scripts/providers/ that:
- Accepts a prompt as the first argument
- Outputs the AI response to stdout
- Exits 0 on success, non-zero on failure
Quick Start
- Create
scripts/providers/{name}.sh(seeapi-patterns.mdfor templates) chmod +x scripts/providers/{name}.sh- Set
{NAME}_API_KEYenvironment variable - Test:
./scripts/providers/{name}.sh "Hello"
Current Providers
| Provider | API Key Variable | Default Model |
|---|---|---|
| Gemini | GEMINI_API_KEY | gemini-3-flash-preview |
| OpenAI | OPENAI_API_KEY | gpt-5.2-codex |
| Grok | GROK_API_KEY | grok-4-1-fast-reasoning |
| Perplexity | PERPLEXITY_API_KEY | sonar-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
- Step 1: Create scripts/providers/{name}.sh and implement the provider interface
- Step 2: chmod +x scripts/providers/{name}.sh and ensure the appropriate API key env var is set
- 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