Skip to content
OpenSmartRoute
Skillv1.0.0

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 hel

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/clade-hello-world/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill clade-hello-world. Copyright stays with the author (MIT).

Anthropic Hello World

Overview

Send your first message to Claude and get a response using the Messages API.

Prerequisites

  • Completed clade-install-auth setup
  • ANTHROPIC_API_KEY environment variable set

Instructions

Step 1: Basic Message

import Anthropic from '@claude-ai/sdk';

const client = new Anthropic();

const message = await client.messages.create({
  model: 'claude-sonnet-4-20250514',
  max_tokens: 1024,
  messages: [
    { role: 'user', content: 'What is the capital of France?' }
  ],
});

console.log(message.content[0].text);
// "The capital of France is Paris."

Step 2: Add a System Prompt

const message = await client.messages.create({
  model: 'claude-sonnet-4-20250514',
  max_tokens: 1024,
  system: 'You are a helpful geography expert. Be concise.',
  messages: [
    { role: 'user', content: 'What is the capital of France?' }
  ],
});

Step 3: Multi-Turn Conversation

const message = await client.messages.create({
  model: 'claude-sonnet-4-20250514',
  max_tokens: 1024,
  messages: [
    { role: 'user', content: 'What is the capital of France?' },
    { role: 'assistant', content: 'The capital of France is Paris.' },
    { role: 'user', content: 'What is its population?' },
  ],
});

Python Example

import anthropic

client = anthropic.Anthropic()

message = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "What is the capital of France?"}
    ],
)
print(message.content[0].text)

Output

  • message.content[0].text — Claude's text response
  • message.model — model ID used
  • message.usage.input_tokens / message.usage.output_tokens — token counts
  • message.stop_reasonend_turn, max_tokens, or tool_use

Error Handling

Error Cause Solution
authentication_error Bad API key Check ANTHROPIC_API_KEY
invalid_request_error Missing required field Both messages and max_tokens are required
not_found_error Invalid model ID Use a valid model like claude-sonnet-4-20250514

Available Models

Model Best For Context Cost (input/output per MTok)
claude-opus-4-20250514 Complex reasoning 200K $15 / $75
claude-sonnet-4-20250514 Balanced quality + speed 200K $3 / $15
claude-haiku-4-5-20251001 Fast, cheap tasks 200K $0.80 / $4

Examples

See Step 1 (basic message), Step 2 (system prompt), and Step 3 (multi-turn) above. Python example included in its own section.

Resources

Next Steps

Proceed to clade-model-inference for streaming and advanced patterns.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-clade-hello-world/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-clade-hello-world.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-clade-hello-world",
  "kind": "skill",
  "name": "clade-hello-world",
  "description": "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\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding",
      "general_chat"
    ],
    "tags": [
      "skill-md",
      "saas",
      "anthropic",
      "claude",
      "messages-api",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "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\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/clade-hello-world/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/clade-hello-world/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/clade-hello-world/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit"
    ],
    "license": "MIT"
  },
  "instructions": "# Anthropic Hello World\n\n## Overview\n\nSend your first message to Claude and get a response using the Messages API.\n\n## Prerequisites\n\n- Completed `clade-install-auth` setup\n- `ANTHROPIC_API_KEY` environment variable set\n\n## Instructions\n\n### Step 1: Basic Message\n\n```typescript\nimport Anthropic from '@claude-ai/sdk';\n\nconst client = new Anthropic();\n\nconst message = await client.messages.create({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 1024,\n  messages: [\n    { role: 'user', content: 'What is the capital of France?' }\n  ],\n});\n\nconsole.log(message.content[0].text);\n// \"The capital o",
  "cost": {
    "context_tokens": 735
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-clade-hello-world/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.