anth-hello-world

Featured

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".

AI & Automation 2,266 stars 315 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 Hello World ## Overview Three minimal examples covering the Claude Messages API core surfaces: basic text completion, vision (image analysis), and streaming responses. ## Prerequisites - Completed `anth-install-auth` setup - Valid `ANTHROPIC_API_KEY` in environment - Python 3.8+ with `anthropic` package or Node.js 18+ with `@anthropic-ai/sdk` ## Instructions ### Example 1: Basic Text Message (Python) ```python import anthropic client = anthropic.Anthropic() message = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[ {"role": "user", "content": "Explain quantum computing in 3 sentences."} ] ) # Response structure print(message.content[0].text) # The actual text response print(f"ID: {message.id}") # msg_01XFDUDYJgAACzvnptvVoYEL print(f"Model: {message.model}") # claude-sonnet-4-20250514 print(f"Stop: {message.stop_reason}")# end_turn print(f"Usage: {message.usage.input_tokens}in / {message.usage.output_tokens}out") ``` ### Example 2: Vision — Analyze an Image (TypeScript) ```typescript import Anthropic from '@anthropic-ai/sdk'; import * as fs from 'fs'; const client = new Anthropic(); // From file (base64) const imageData = fs.readFileSync('chart.png').toString('base64'); const message = await client.messages.create({ model: 'claude-sonnet-4-20250514', max_tokens: 1024, messages: [{ role: 'user', content: [ { type: 'image', source: { ...

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 Featured

clade-hello-world

Send your first message to Claude using the Anthropic SDK. Use when starting a new Claude integration, testing your setup, or learning the Messages API basics. Trigger with phrases like "anthropic hello world", "claude api example", "first claude call", "anthropic quick start".

2,266 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.

199,464 Updated today
affaan-m
AI & Automation Featured

clade-model-inference

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".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anth-install-auth

Install and configure Anthropic Claude SDK authentication for Python and TypeScript. Use when setting up a new Claude API integration, configuring API keys, or initializing the Anthropic SDK in your project. Trigger with phrases like "install anthropic", "setup claude api", "anthropic auth", "configure anthropic API key", "claude sdk setup".

2,266 Updated today
jeremylongshore