anth-local-dev-loop

Featured

Configure a local development workflow for Anthropic Claude API projects. Use when setting up dev environment, configuring hot reload, or establishing a fast iteration cycle with the Messages API. Trigger with phrases like "anthropic local dev", "claude dev setup", "anthropic development workflow", "test claude locally".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anthropic Local Dev Loop ## Overview Set up a fast local development cycle for Claude API projects with environment management, request logging, cost tracking, and hot-reload. ## Prerequisites - Completed `anth-install-auth` setup - Node.js 18+ or Python 3.8+ - `.env` file with `ANTHROPIC_API_KEY` ## Instructions ### Step 1: Project Structure ``` my-claude-app/ ├── .env # ANTHROPIC_API_KEY=sk-ant-... ├── .env.example # ANTHROPIC_API_KEY=your-key-here ├── .gitignore # Include .env ├── src/ │ ├── client.ts # Singleton client │ ├── prompts/ # System prompts as files │ └── tools/ # Tool definitions ├── tests/ │ └── mock-responses/ # Saved API responses for testing └── scripts/ └── dev.ts # Dev runner with logging ``` ### Step 2: Singleton Client with Request Logging ```typescript // src/client.ts import Anthropic from '@anthropic-ai/sdk'; let client: Anthropic | null = null; export function getClient(): Anthropic { if (!client) { client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, maxRetries: 2, timeout: 30_000, }); } return client; } // Development logger — tracks cost per request export function logUsage(messageId: string, usage: { input_tokens: number; output_tokens: number }, model: string) { const pricing: Record<string, { input: number; output: number }> = { 'claude-sonnet-4-20250514': { input: 3.0, output: 15.0 }, 'cl...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

clade-local-dev-loop

Set up a fast local development loop for building with the Anthropic API — Use when working with local-dev-loop patterns. hot reload, cost-saving tips, and test patterns. Trigger with "anthropic dev setup", "claude local development", "anthropic test locally", "claude dev workflow".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apollo-local-dev-loop

Configure Apollo.io local development workflow. Use when setting up development environment, testing API calls locally, or establishing team development practices. Trigger with phrases like "apollo local dev", "apollo development setup", "apollo dev environment", "apollo testing locally".

2,266 Updated today
jeremylongshore
AI & Automation Featured

klaviyo-local-dev-loop

Configure Klaviyo local development with hot reload, mocking, and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with the Klaviyo API. Trigger with phrases like "klaviyo dev setup", "klaviyo local development", "klaviyo dev environment", "develop with klaviyo", "klaviyo testing".

2,266 Updated today
jeremylongshore
AI & Automation Featured

assemblyai-local-dev-loop

Configure AssemblyAI local development with hot reload and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with AssemblyAI. Trigger with phrases like "assemblyai dev setup", "assemblyai local development", "assemblyai dev environment", "develop with assemblyai".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-local-dev-loop

Configure Cohere local development with mocking, testing, and hot reload. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Cohere API v2. Trigger with phrases like "cohere dev setup", "cohere local development", "cohere dev environment", "develop with cohere", "mock cohere".

2,266 Updated today
jeremylongshore