h-a-forster

Skinflint — Development skill for Claude Code

Development community

Local proxy for the Anthropic and OpenAI APIs: hard spend caps for coding agents, a context token profiler, and a prompt-cache doctor.

How to install Skinflint

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

What Skinflint does

Local proxy for the Anthropic and OpenAI APIs: hard spend caps for coding agents, a context token profiler, and a prompt-cache doctor.

Alternatives in Development

  • Claude Code Proxy — Run Claude Code on OpenAI models 3.3k ★
  • Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
  • Dexscreener Unofficial CLI + MCP + Skills — You are a token scanning specialist using the Dexscreener Unofficial CLI (not affiliated with or endorsed by D 213 ★

README

skinflint

[![CI](https://github.com/h-a-forster/skinflint/actions/workflows/ci.yml/badge.svg)](https://github.com/h-a-forster/skinflint/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](pyproject.toml)

A local proxy for the Anthropic and OpenAI APIs. It caps what coding agents spend, shows where every prompt token goes, and explains each prompt-cache miss. By default a cap holds only each request's prompt, so requests already in flight can carry spend past it (by up to 9% in [our runs](docs/results.md#7-caps-under-parallel-load)); `reserve = "worst_case"` never went over.

Point Claude Code, Codex or any SDK at `http://127.0.0.1:4100`. Requests are forwarded as sent, apart from two optional additions that make metering work ([details](docs/how-it-works.md#forwarding)). Each one is checked against your budgets first and recorded after.

Findings

From [measurements](docs/results.md) of Claude Code 2.1.296 and earlier, taken through skinflint.

  • A one-word answer carries a large fixed prompt. Reply with exactly: hi sends 21,328 prompt tokens with tool search on, 12,275 of them built-in tool definitions, and Claude Code called no tools (section 6).
  • A custom ANTHROPIC_BASE_URL silently changes the prompt. Claude Code turns tool search off and sends 35,995 tokens instead of 21,593 (+67%) unless ENABLE_TOOL_SEARCH=true is set (section 6).
  • Estimate-mode caps can overshoot; worst-case mode cannot. With reserve = "estimate", spend ended between $0.8906 and $1.0896 on a $1 cap (up to 9.0% over) under parallel agents. reserve = "worst_case" never went over, but reserved $1.57 for a first Sonnet 5.5 request ($1.97 later in a session) and $3.13 for a first Opus 5.5 request, so it needs caps of severa