Create a minimal working Anthropic Claude Messages API example.

MITAuto-check passedAI & LLM Engineering

Install Anth Hello World

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-hello-world -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace anth-hello-world --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/anth-hello-world .claude/skills/anth-hello-world && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
anth-hello-world
GitHub stars
2.8k
Token cost
~1.3k tokens
SKILL.md length
281 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Create a minimal working Anthropic Claude Messages API example.

  • Starting a new Claude integration
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 5 more sections
  • Needs ANTHROPIC_API_KEY
  • Testing your setup

What it does

Anth Hello World is an agent skill from jeremylongshore/tons-of-skills-marketplace. 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".

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code

It sits in AI & LLM Engineering, covering LLM API integration and Integration testing. It works with Anthropic API and Python. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Starting a new Claude integration
  • Testing your setup
  • Learning basic Messages API patterns for text
  • With phrases like anthropic hello world

Example prompts

  • “anthropic hello world”
  • “claude api example”
  • “anthropic quick start”
  • “/anth-hello-world”

Requirements

  • Python 3
  • Node.js
  • A credential in ANTHROPIC_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • platform.claude.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ANTHROPIC_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Anth Hello World loads about 1.3k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 281 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 281 words, ~1,257 tokens.

Download SKILL.mdSave it as .claude/skills/anth-hello-world/SKILL.md (or your agent's skills folder).
name
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
compatibility
Designed for Claude Code
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, ai, anthropic

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: {
          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)
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

ErrorHTTP CodeCauseSolution
authentication_error401Invalid API keyCheck ANTHROPIC_API_KEY
invalid_request_error400Bad params (e.g., empty messages)Validate request body
rate_limit_error429Too many requestsImplement backoff (see anth-rate-limits)
overloaded_error529API temporarily overloadedRetry after 30-60s
api_error500Server errorRetry with exponential backoff

Key API Parameters

ParameterRequiredDescription
modelYesModel ID: claude-sonnet-4-20250514, claude-haiku-4-20250514, claude-opus-4-20250514
max_tokensYesMaximum output tokens (model-dependent max)
messagesYesArray of {role, content} objects
systemNoSystem prompt (string or content blocks)
temperatureNo0.0-1.0, default 1.0
top_pNoNucleus sampling (use temperature OR top_p)
stop_sequencesNoArray of strings that stop generation
streamNoEnable SSE streaming

Resources

Next Steps

Proceed to anth-local-dev-loop for development workflow setup.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/.curated/anth-hello-world of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Anth Hello World next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Anth Hello World compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Anth Hello World this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
Claude Cookbooks Reference2025Emma/vibe-coding-cn23k1 repos~2.2kAutomated safety check: PassMIT
Claude APIloulanyue/awesome-claude-notes2722 repos~2.1kAutomated safety check: PassMIT
Claude API Developmentwarpdotdev/warp65k3 repos~8.2kAutomated safety check: PassApache-2.0
Aivisonism1767-creator/potato166—~757Automated safety check: PassMIT
Claude APIloulanyue/awesome-claude-notes2721 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Claude Cookbooks Reference

    2025Emma/vibe-coding-cn

    Reference of Claude API examples and guides covering tool use, vision, RAG, classification, summarization, text-to-SQL, prompt caching and agent patterns.

    23k GitHub starsUsed in 1 repo~2.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Claude API

    loulanyue/awesome-claude-notes

    Anthropic Claude API patterns for Python and TypeScript. An agent skill from loulanyue/awesome-claude-notes.

    272 GitHub starsUsed in 2 repos~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Claude API Development

    warpdotdev/warp

    Guides building, debugging and tuning apps on the Claude API and Anthropic SDK, including prompt caching, and migrating code between Claude model versions.

    65k GitHub starsUsed in 3 repos~8.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Aivis

    onism1767-creator/potato

    Claude API web-search 可见度(代理测量):用冻结题库反复探测 Claude API(websearch), 以确定性规则统计品牌被提及/被引用的频率与结构,输出带不确定区间、可审计的报告。

    166 GitHub stars~757 tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Claude API

    loulanyue/awesome-claude-notes

    Anthropic Claude API 的 Python 和 TypeScript 使用模式。涵盖 Messages API、流式处理、工具使用、视觉功能、扩展思维、批量处理、提示缓存和 Claude Agent SDK。适用于使用 Claude API 或 Anthropic SDK 构建应用程序的场景。

    272 GitHub starsUsed in 1 repo~1.9k tokens
    AI & LLM EngineeringAuto-check passed
  • Gives text-only models sight by running the modlens CLI on an image path or URL and returning structured JSON evidence with transcribed text, layout and semantics.

    4.2k GitHub stars~1.3k tokensUpdated 7 days ago
    AI & LLM EngineeringAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Anth Hello World

What does Anth Hello World do?

Create a minimal working Anthropic Claude Messages API example. Anth Hello World is an agent skill from jeremylongshore/tons-of-skills-marketplace. Create a minimal working Anthropic Claude Messages API example.

When should I use Anth Hello World?

Anth Hello World fits situations like: starting a new Claude integration; testing your setup; learning basic Messages API patterns for text; with phrases like anthropic hello world.

How do I install Anth Hello World in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-hello-world -a claude-code`. Or copy the skill folder (skills/.curated/anth-hello-world in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/anth-hello-world in your project. Claude Code loads it when a task matches its description.

How do I install Anth Hello World in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-hello-world -a codex`. Or copy the skill folder (skills/.curated/anth-hello-world in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/anth-hello-world in your project. Codex loads it when a task matches its description.

Can I use Anth Hello World in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-hello-world -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/anth-hello-world, .gemini/skills/anth-hello-world, .github/skills/anth-hello-world and .opencode/skills/anth-hello-world in your project.

What does Anth Hello World need to run?

Going by SKILL.md and its folder, Anth Hello World needs credentials named ANTHROPIC_API_KEY. Our summary lists: Python 3; Node.js; A credential in ANTHROPIC_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code.

Does Anth Hello World access the network?

SKILL.md names 1 domain. As links in the text: platform.claude.com. This is read from the text; nothing was executed.

Is Anth Hello World safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Anth Hello World use?

Anth Hello World is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Anth Hello World use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Anth Hello World?

Skills that share tags, products or a category with Anth Hello World: Claude Cookbooks Reference (2025Emma/vibe-coding-cn, 23k stars), Claude API (loulanyue/awesome-claude-notes, 272 stars), Claude API Development (warpdotdev/warp, 65k stars) and Aivis (onism1767-creator/potato, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Anth Hello World?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.