anth-hello-world
'Create a minimal working Anthropic Claude Messages API example.
Install / Use
npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-hello-worldInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Education & ResearchSupported Platforms
Our assessment of anth-hello-world
anth-hello-world scores 85/100 on our quality scale, 235th of 344 Education & Research skills we index.
Its SKILL.md is 4.9 KB long, well organised into 15 sections with 3 code examples: a solid amount of guidance for an agent.
With 2,785 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 6 days ago, so anth-hello-world is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
anth-hello-world compared with similar skills
All 4 of these similar skills score higher than anth-hello-world; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| anth-hello-world (this skill)by jeremylongshore | 85 | 2.8k | 6d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 86.3k | 14d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.1k | today | CLAUDE.md |
| last30days-skillby mvanhorn | 100 | 63.2k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 84.6k | today | MCP Server |
Frequently asked questions
- How do I install anth-hello-world?
- Run
npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-hello-world. The install tabs above show the steps for each supported agent. - Which AI agents does anth-hello-world work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is anth-hello-world safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is anth-hello-world still maintained?
- The repository was last updated 6 days ago, so anth-hello-world is actively maintained.
Skill content
View source on GitHubname: anth-hello-world description: '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".
' allowed-tools: Read, Write, Edit version: 1.7.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
- saas
- ai
- anthropic compatibility: Designed for Claude Code
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-authsetup - Valid
ANTHROPIC_API_KEYin environment - Python 3.8+ with
anthropicpackage or Node.js 18+ with@anthropic-ai/sdk
Instructions
Example 1: Basic Text Message (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)
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: {
type: 'base64',
media_type: 'image/png',
data: imageData,
},
},
{ type: 'text', text: 'Describe what this chart shows.' },
],
}],
});
console.log(message.content[0].type === 'text' ? message.content[0].text : '');
Example 3: Streaming Response (Python)
import anthropic
client = anthropic.Anthropic()
with client.messages.stream(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "Write a haiku about APIs."}]
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
# Get final message with full metadata
final = stream.get_final_message()
print(f"\nTokens used: {final.usage.input_tokens}+{final.usage.output_tokens}")
Output
- Working code file with Claude client initialization
- Successful API response with text content
- Console output showing model response and usage metadata
Examples
Use the text example first when verifying credentials: send a fixed, short
prompt and confirm that message.content[0].text is present before integrating
the client into application code. Use the vision example only after that check
passes and replace chart.png with a non-sensitive local fixture. For an
interactive command-line feature, use the streaming example so text is emitted
incrementally, then read the final message to capture token usage for logs or
cost controls.
Error Handling
| Error | HTTP Code | Cause | Solution |
|-------|-----------|-------|----------|
| authentication_error | 401 | Invalid API key | Check ANTHROPIC_API_KEY |
| invalid_request_error | 400 | Bad params (e.g., empty messages) | Validate request body |
| rate_limit_error | 429 | Too many requests | Implement backoff (see anth-rate-limits) |
| overloaded_error | 529 | API temporarily overloaded | Retry after 30-60s |
| api_error | 500 | Server error | Retry with exponential backoff |
Key API Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| model | Yes | Model ID: claude-sonnet-4-20250514, claude-haiku-4-20250514, claude-opus-4-20250514 |
| max_tokens | Yes | Maximum output tokens (model-dependent max) |
| messages | Yes | Array of {role, content} objects |
| system | No | System prompt (string or content blocks) |
| temperature | No | 0.0-1.0, default 1.0 |
| top_p | No | Nucleus sampling (use temperature OR top_p) |
| stop_sequences | No | Array of strings that stop generation |
| stream | No | Enable SSE streaming |
Resources
Next Steps
Proceed to anth-local-dev-loop for development workflow setup.
Related Skills
Agent-Reach
86.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
last30days-skill
63.2kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Scrapling
84.6k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
