messages

Send conversational messages to Claude and receive structured block-based responses.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill messages-theslashdojo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: messages
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/anthropic/messages
Command: npx skills add https://github.com/theslashdojo/dojo --skill messages-theslashdojo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires anthropic, and includes scripts (resource) components.

What problem does it solve?

This Skill provides a standardized way to send conversational turns to Claude and receive structured, block-based responses so applications can power chat, completion, analysis, and multimodal workflows without bespoke request plumbing.

Core Features & Use Cases

  • Unified Messages API: Send multi-turn conversations including text, images, documents, tool results, and system prompts to get the next assistant response.
  • Streaming & Synchronous Modes: Support for both synchronous create calls and token-by-token SSE streaming for real-time UIs.
  • Structured Outputs & Tooling: Built-in support for tool definitions, structured JSON output schemas, extended thinking, and detailed usage/stop_reason metadata for robust integration.
  • Use Case: Build a chat interface that streams Claude's tokens to the user, handles tool calls mid-conversation, and validates the final response against a JSON schema for downstream processing.

Quick Start

Send a chat message to Claude asking "Hello, Claude" using model claude-sonnet-4-6 with max_tokens 1024 and read the assistant text from the returned content block.

Frequently Asked Questions about messages

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send conversational messages to Claude and get structured responses?

To send conversational messages to Claude and get structured responses, use the Anthropic Messages API to submit multi-turn conversations with defined roles, content blocks, and optional system prompts for block-based assistant replies.

Can I stream Claude chat responses token by token for real-time UIs?

Yes, you can stream Claude chat responses token by token for real-time UIs using Server-Sent Events (SSE). This allows applications to display text incrementally as the model generates the output.

How do I enforce structured JSON output when using the Anthropic Messages API?

To enforce structured JSON output with the Anthropic Messages API, define JSON output schemas and tool definitions in your request. The API returns content blocks that validate against your specified schema for downstream processing.

Does Claude's Messages API support vision-enabled prompts and image analysis?

Yes, the Claude Messages API supports vision-enabled prompts and image analysis. You can include images and documents alongside text in the content blocks array to perform multimodal document analysis.

What metadata is returned when sending chat messages to Claude via the API?

When sending chat messages to Claude via the API, the response returns content blocks, stop_reason indicators, and token usage metadata. This provides detailed integration context for managing conversation budgets.

Do I need the anthropic package to manage multi-turn chatbot dialogues with tool use?

Yes, you need the anthropic package to manage multi-turn chatbot dialogues with tool use. It provides the necessary client methods to send message arrays, handle mid-conversation tool calls, and process assistant responses.