bakrsabeeh

Claude API Skill — Development skill for Claude Code

Development community

Professional-grade Claude API skill framework.

How to install Claude API Skill

This entry records only its repository, not the path inside it, so there is no exact command to give. Open bakrsabeeh/claude-api-skill and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude API Skill does

Professional-grade Claude API skill framework. Comprehensive guide covering Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, error handling, cost optimization, and production patterns.

Alternatives in Development

  • Create PRD — Create a PRD with 8-section template covering problem to release 7.8k ★
  • Claude Code iOS Dev Guide — A comprehensive guide for setting up Claude Code CLI with PRD-driven workflows, extended thinking (ultrathink) 492 ★
  • Skill.Color Expert — Agent skill for color science expertise 426 ★

README

Claude API Skill (Professional Edition v2.0)

**The most comprehensive guide for building production-grade applications with the Anthropic Claude API.**

Master Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, optimization, error handling, and architecture patterns.


What's Inside

This enhanced skill framework covers everything needed to build scalable AI applications:

Core Concepts

  • Model Selection — Comparison matrix and selection guide (Opus, Sonnet, Haiku)
  • 7 Key Features — Messages, Streaming, Tool Use, Vision, Extended Thinking, Caching, Batches

Python SDK (Complete Guide)

  • Installation & configuration
  • Basic messages, streaming, system prompts
  • Multi-turn conversations
  • Tool use with examples
  • Vision (images, multiple images)
  • Extended thinking for complex reasoning
  • Prompt caching (90% cost savings)
  • Batches API (50% cost reduction)

TypeScript SDK (Complete Guide)

  • Installation & configuration
  • Basic messages, streaming, system prompts
  • Tool use with event handlers
  • Vision with image loading
  • Extended thinking
  • Prompt caching
  • Batches API

Production Patterns

  • Error handling with retry logic
  • Token counting before API calls
  • Structured JSON output
  • Smart caching strategies
  • Comprehensive logging and monitoring

Cost Optimization

  • Model selection by task ($4.80/M vs $18 vs $90)
  • Caching strategy (90% savings)
  • Batches API (50% savings)
  • Cost examples with real numbers
  • Task-specific model selection

Debugging & Monitoring

  • Request/response logging
  • Token usage tracking
  • API metrics collection
  • Common pitfalls and solutions
  • Quality checklist

Quick Start

Python

from anthropic import Anthropic

client = Anthropic()  # reads ANTHROPIC_API_KEY from environment

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude!"}]
)
print(message.con