clade-model-inference

Featured

Stream Claude responses, use system prompts, handle multi-turn conversations, Use when working with model-inference patterns. and process structured output with the Messages API. Trigger with "anthropic streaming", "claude messages api", "claude inference", "stream claude response".

AI & Automation 2,274 stars 319 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anthropic Messages API — Streaming & Advanced Patterns ## Overview The Messages API is the only inference endpoint. Every Claude interaction goes through `client.messages.create()`. This skill covers streaming, system prompts, vision, and structured output. ## Prerequisites - Completed `clade-install-auth` - Familiarity with `clade-hello-world` ## Instructions ### Step 1: Streaming Responses ```typescript import Anthropic from '@claude-ai/sdk'; const client = new Anthropic(); const stream = client.messages.stream({ model: 'claude-sonnet-4-20250514', max_tokens: 1024, messages: [{ role: 'user', content: 'Write a haiku about TypeScript.' }], }); for await (const event of stream) { if (event.type === 'content_block_delta' && event.delta.type === 'text_delta') { process.stdout.write(event.delta.text); } } const finalMessage = await stream.finalMessage(); console.log('\n\nTokens:', finalMessage.usage); ``` ### Step 2: Vision — Sending Images ```typescript const message = await client.messages.create({ model: 'claude-sonnet-4-20250514', max_tokens: 1024, messages: [{ role: 'user', content: [ { type: 'image', source: { type: 'base64', media_type: 'image/png', data: fs.readFileSync('screenshot.png').toString('base64'), }, }, { type: 'text', text: 'Describe what you see in this image.' }, ], }], }); ``` ### Step 3: JSON / Structured Output ```typescript const message =...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

clade-core-workflow-a

Redirect to claude-model-inference for Messages API streaming, vision, and structured output patterns. Use when looking for the primary Anthropic workflow. Trigger with "anthropic workflow", "claude main workflow".

2,274 Updated today
jeremylongshore
AI & Automation Listed

claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

0 Updated today
CodeWithBehnam
AI & Automation Solid

claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

201,447 Updated yesterday
affaan-m
AI & Automation Featured

anth-hello-world

Create a minimal working Anthropic Claude Messages API example. Use when starting a new Claude integration, testing your setup, or learning basic Messages API patterns for text, vision, and streaming. Trigger with phrases like "anthropic hello world", "claude api example", "anthropic quick start", "simple claude code", "first messages api call".

2,274 Updated today
jeremylongshore
AI & Automation Listed

claude

Call the Claude API (claude-opus, claude-sonnet, claude-haiku) through RunAPI using the official Anthropic SDK or any Anthropic-compatible client. Use when the user asks for Claude / Anthropic chat, streaming messages, multimodal vision input, tool use, extended thinking, or token counting, or when they want to point an existing Anthropic SDK setup at RunAPI as the base URL.

0 Updated today
runapi-ai