anth-local-dev-loop
'Configure a local development workflow for Anthropic Claude API projects.
Install / Use
npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-local-dev-loopInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of anth-local-dev-loop
anth-local-dev-loop scores 87/100 on our quality scale, 1341st of 2,607 Automation skills we index.
Its SKILL.md is 5.2 KB long, well organised into 18 sections with 6 code examples: a solid amount of guidance for an agent.
With 2,785 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 6 days ago, so anth-local-dev-loop is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
anth-local-dev-loop compared with similar skills
All 4 of these similar skills score higher than anth-local-dev-loop; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| anth-local-dev-loop (this skill)by jeremylongshore | 87 | 2.8k | 6d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 86.3k | 14d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.1k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 73.6k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 84.6k | today | MCP Server |
Frequently asked questions
- How do I install anth-local-dev-loop?
- Run
npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-local-dev-loop. The install tabs above show the steps for each supported agent. - Which AI agents does anth-local-dev-loop work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is anth-local-dev-loop safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is anth-local-dev-loop still maintained?
- The repository was last updated 6 days ago, so anth-local-dev-loop is actively maintained.
Skill content
View source on GitHubname: anth-local-dev-loop description: '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".
' allowed-tools: Read, Write, Edit, Bash(npm:), Bash(pip:), Grep version: 1.7.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
- saas
- ai
- anthropic compatibility: Designed for Claude Code
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-authsetup - Node.js 18+ or Python 3.8+
.envfile withANTHROPIC_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
// 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 },
'claude-haiku-4-20250514': { input: 0.80, output: 4.0 },
'claude-opus-4-20250514': { input: 15.0, output: 75.0 },
};
const rates = pricing[model] || pricing['claude-sonnet-4-20250514'];
const cost = (usage.input_tokens * rates.input + usage.output_tokens * rates.output) / 1_000_000;
console.log(`[${messageId}] ${model} | ${usage.input_tokens}+${usage.output_tokens} tokens | $${cost.toFixed(4)}`);
}
Step 3: Mock Responses for Tests
// tests/mock-client.ts
import { type Message } from '@anthropic-ai/sdk/resources/messages';
export function mockMessage(text: string): Message {
return {
id: 'msg_test_123',
type: 'message',
role: 'assistant',
model: 'claude-sonnet-4-20250514',
content: [{ type: 'text', text }],
stop_reason: 'end_turn',
stop_sequence: null,
usage: { input_tokens: 10, output_tokens: 20 },
};
}
Step 4: Hot-Reload Dev Script
# package.json scripts
"scripts": {
"dev": "tsx watch src/index.ts",
"dev:debug": "ANTHROPIC_LOG=debug tsx watch src/index.ts",
"test": "vitest",
"test:live": "LIVE_API=1 vitest --run"
}
Output
The development loop produces a repeatable local project layout, a single configured client, mock-backed tests, and a request log that records model and token usage. A change can then be exercised with no API spend in the normal test suite or with deliberately enabled live traffic when investigating a prompt or integration behavior.
Examples
While editing a prompt, run the default vitest command against a saved mock
response and confirm the application handles the expected text and stop reason.
When a real API check is needed, set LIVE_API=1 only for that invocation,
choose the lower-cost development model, and inspect the logger for token use.
If the live response changes the contract, first update the fixture and its
assertions, then rerun the mock suite so later local iterations remain fast and
deterministic.
Environment Management
# .env.example (commit this)
ANTHROPIC_API_KEY=your-key-here
ANTHROPIC_MODEL=claude-sonnet-4-20250514
ANTHROPIC_MAX_TOKENS=1024
ANTHROPIC_LOG=warn # debug | info | warn | error
# Enable SDK debug logging
export ANTHROPIC_LOG=debug # Logs all requests/responses
Cost Control During Development
import os
DEV_MODEL = "claude-haiku-4-20250514" # $0.80/$4.00 per MTok
PROD_MODEL = "claude-sonnet-4-20250514" # $3.00/$15.00 per MTok
model = DEV_MODEL if os.getenv("ENV") == "development" else PROD_MODEL
Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Hot reload triggers duplicate requests | File save causes restart | Add debounce or save-on-explicit-action |
| .env not loading | Missing dotenv setup | Use dotenv package or tsx --env-file=.env |
| Mock tests pass but live fails | Response shape changed | Update mocks from real API responses |
Resources
Next Steps
Apply patterns in anth-sdk-patterns for production-ready code.
Related Skills
Agent-Reach
86.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.6k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Scrapling
84.6k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
