← ClaudeAtlas

boost-moduleslisted

Create custom modules for [Harbor Boost](https://github.com/av/harbor/tree/main/boost), an optimizing LLM proxy. Use when building Python modules that intercept/transform LLM chat completions—reasoning chains, prompt injection, structured outputs, artifacts, or custom workflows. Triggers on requests to create Boost modules, extend LLM behavior via proxy, or implement chat completion middleware.
av/skills · ★ 13 · AI & Automation · score 80
Install: claude install-skill av/skills
# Harbor Boost Custom Modules Boost modules are Python files that intercept chat completions and can transform, augment, or replace LLM responses. ## Module Structure ```python ID_PREFIX = 'mymodule' # Models prefixed with this trigger the module async def apply(chat, llm): # chat: conversation history (linked list of ChatNodes) # llm: interface to downstream LLM and output streaming await llm.stream_final_completion() ``` ## Quick Reference ### Output Methods ```python # Stream text to client await llm.emit_message("Hello") # Status indicator (formatted per HARBOR_BOOST_STATUS_STYLE) await llm.emit_status("Processing...") # Internal completion (not streamed to client) result = await llm.chat_completion(prompt="Summarize: {text}", text=content, resolve=True) # Streamed completion (visible to client) await llm.stream_chat_completion(prompt="Explain {topic}", topic="quantum") # Final completion (always streamed, even when intermediate output disabled) await llm.stream_final_completion() await llm.stream_final_completion(prompt="Reply to: {msg}", msg=chat.tail.content) # Structured output from pydantic import BaseModel, Field class Response(BaseModel): answer: str = Field(description="The answer") result = await llm.chat_completion(prompt="...", schema=Response, resolve=True) # Artifacts (for clients like Open WebUI) await llm.emit_artifact("<h1>Interactive content</h1>") ``` ### Chat Manipulation ```python # Read conversation chat.text()