adapter-factory

Integrate new AI models into the AI Counsel deliberation system via CLI and HTTP adapters.

1|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/OmarTheGrey/Council-Of-HAL --skill adapter-factory-omarthegrey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adapter-factory
Source: https://github.com/OmarTheGrey/Council-Of-HAL/tree/main/.claude/skills/adapter-factory
Command: npx skills add https://github.com/OmarTheGrey/Council-Of-HAL --skill adapter-factory-omarthegrey

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Integrating diverse AI models (CLI tools, HTTP APIs) into a unified deliberation system can be complex and error-prone. This skill provides a factory pattern and step-by-step guide to create robust adapters, enabling seamless participation of any AI model in your AI Counsel.

Core Features & Use Cases

  • CLI Adapter Creation: Build adapters for command-line AI tools, handling subprocess execution and output parsing.
  • HTTP Adapter Creation: Integrate HTTP-based AI APIs, managing requests, retries, and response parsing.
  • Config-Driven Integration: Configure new adapters via YAML, supporting environment variable substitution for secrets.
  • Test-Driven Development: Guides on writing unit and integration tests, including VCR for HTTP response recording.
  • Use Case: You want to add support for a new local LLM (e.g., a custom fine-tuned model via Ollama) or a proprietary cloud API. This skill walks you through creating the necessary adapter, configuring it, and testing its integration into the deliberation system.

Quick Start

Show me how to create a new HTTP adapter for a custom AI API, including how to build the request and parse the response.

Frequently Asked Questions about adapter-factory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate a new AI model into an AI Counsel deliberation system?

Integrate new AI models using the adapter-factory's factory pattern with BaseCLIAdapter for command-line tools or BaseHTTPAdapter for HTTP APIs. Register adapters via YAML config, handle request/response parsing, manage retries and timeouts, and substitute environment variables for secrets to enable seamless model participation in deliberations.

What's the difference between CLI adapters and HTTP adapters for AI model integration?

CLI adapters handle subprocess execution for local command-line AI tools, managing output parsing and tool-specific results. HTTP adapters integrate cloud APIs, managing HTTP requests, retries, response parsing, and timeout handling. Choose CLI for local models like Ollama; use HTTP adapters for proprietary cloud services.

Can I add a custom AI model or local LLM to my council without rewriting core logic?

Yes. The adapter-factory uses config-driven integration where new adapters are registered via YAML without modifying core deliberation code. Environment variable substitution supports secrets, context-aware argument adjustments handle model-specific requirements, and backward compatibility is preserved across all existing adapters.

How do I test a new AI model adapter after integrating it?

Write unit and integration tests guided by test-driven development practices included in the skill. For HTTP adapters, use VCR to record and replay HTTP responses, enabling reproducible testing without external API calls. Validation includes prompt-length checks and response parsing verification.

What happens if my AI model API request times out or fails?

The adapter-factory implements built-in retry and timeout handling in BaseHTTPAdapter, managing transient failures gracefully. Context-aware argument adjustments and proper error handling preserve deliberation flow while logging failures for debugging and maintaining system stability.

Do I need to know the factory pattern to create adapters?

No. The skill provides step-by-step guidance and pre-built BaseCLIAdapter and BaseHTTPAdapter base classes that handle boilerplate concerns like retries, timeouts, and environment variable substitution, so you focus on tool-specific output parsing and request construction.