AI Skill Report Card

Claude Api Development

B+75·Feb 5, 2026·Source: Extension-page
Python
import anthropic client = anthropic.Anthropic(api_key="your-api-key") message = client.messages.create( model="claude-3-5-sonnet-20241022", max_tokens=1024, messages=[ {"role": "user", "content": "Hello, Claude!"} ] ) print(message.content)
Recommendation
Examples need concrete input/output pairs instead of just code snippets - show actual request content and the specific response Claude would return
  1. Set up environment

    • Install Anthropic SDK: pip install anthropic
    • Get API key from console.anthropic.com
    • Set environment variable: export ANTHROPIC_API_KEY=your_key
  2. Choose model based on needs

    • Claude Opus 4.5: Complex reasoning, coding, agents
    • Claude Sonnet 4.5: Balanced performance for most use cases
    • Claude Haiku 4.5: Speed-critical applications
  3. Design prompts

    • Use system messages for role/context
    • Structure user messages clearly
    • Include examples for complex tasks
  4. Handle responses

    • Parse content from message objects
    • Implement error handling for rate limits
    • Stream responses for long outputs

Progress:

  • Environment setup complete
  • Model selected and tested
  • Prompts optimized
  • Error handling implemented
  • Application deployed
Recommendation
Remove model names like 'Claude Opus 4.5' and 'Claude Haiku 4.5' which don't exist - use actual available models like claude-3-opus-20240229

Example 1: Text Analysis

Python
response = client.messages.create( model="claude-3-5-sonnet-20241022", messages=[ {"role": "user", "content": "Summarize this in 3 bullet points: [long text]"} ] )

Example 2: Code Generation

Python
response = client.messages.create( model="claude-3-5-sonnet-20241022", messages=[ {"role": "user", "content": "Write a Python function to validate email addresses using regex"} ] )

Example 3: Vision Analysis

Python
response = client.messages.create( model="claude-3-5-sonnet-20241022", messages=[ { "role": "user", "content": [ {"type": "text", "text": "What's in this image?"}, {"type": "image", "source": {"type": "base64", "media_type": "image/jpeg", "data": base64_image}} ] } ] )
Recommendation
Quick Start should show the actual output from the example code, not just print(message.content) - demonstrate what the user will see
  • Start with Sonnet 4.5 for most applications (best balance)
  • Use system messages to set consistent behavior
  • Implement streaming for real-time user experience
  • Cache responses when appropriate to reduce costs
  • Use the Workbench in Developer Console for prompt development
  • Follow token limits: Respect max_tokens parameter
  • Handle rate limits with exponential backoff
  • Don't hardcode API keys in source code
  • Don't ignore error responses and rate limiting
  • Don't use Opus for simple tasks (cost inefficiency)
  • Don't send sensitive data without considering privacy implications
  • Don't forget to validate and sanitize user inputs
  • Don't assume responses are always complete (check for truncation)
0
Grade B+AI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
11/15
Workflow
11/15
Examples
15/20
Completeness
15/20
Format
11/15
Conciseness
11/15