Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/wangfumin1/claude-code-adapter-fastapi/claude-mdgit clone --depth 1 https://github.com/wangfumin1/claude-code-adapter-fastapiWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00638 | $0.00638 |
| Opus 5 | $0.00319 | $0.00319 |
| Sonnet 5 | $0.00128 | $0.00128 |
| Haiku 4.5 | $0.00064 | $0.00064 |
Grade A, and why
claude-code-adapter-fastapi CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is a Claude Code Adapter built with FastAPI that converts Claude Code tool definitions into system prompts, allowing non-native tool models to understand and use tools. The adapter acts as a proxy between Anthropic-style API requests and OpenAI-compatible endpoints.
Development Commands
Basic Commands
make run- Start development server with hot reloadmake run-prod- Run production servermake test- Run testsmake lint- Run code linting (flake8 + mypy)make format- Format code (black + isort)
Environment Setup
make setup- Create virtual environmentmake install- Install production dependenciesmake install-dev- Install development dependenciesmake check-env- Check environment configuration
Docker Commands
make docker-build- Build Docker imagemake docker-run- Run Docker containermake docker-compose-up- Start with docker-compose
Architecture
Core Components
- app.py - FastAPI application with main endpoints (
/health,/v1/messages) - services.py - Business logic layer (message conversion, OpenAI client, response processing)
- models.py - Pydantic data models for API requests/responses
- config.py - Configuration management with YAML and environment variable support
- utils.py - Utility functions for tool parsing and content processing
Key Features
- Tool Prompt Adaptation: Converts tool definitions into system prompts for non-native models
- Message Format Conversion: Translates between Anthropic and OpenAI message formats
- Tool Selection: Dynamic tool selection based on conversation context
- Streaming Support: Full support for streaming responses
- Flexible Configuration: YAML config files with environment variable overrides
Project Structure
src/claude_code_adapter/
├── app.py # FastAPI application and endpoints
├── config.py # Configuration management
├── models.py # Pydantic data models
├── services.py # Business logic services
└── utils.py # Utility functions
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 74 lines · 638 tokens per session scan A 0c7be8fc0fc2
claude-code-adapter-fastapi CLAUDE.md is an instructions file published in the GitHub repository wangfumin1/claude-code-adapter-fastapi (5 stars, last pushed 22d ago), licensed MIT. It adds 638 tokens to every session, about $0.0032 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
exploreyc CLAUDE.md
Instructions for KonstantinMB/exploreyc, covering claude.md, project overview, tech stack, development commands and backend dev server.
PatchBay AGENTS.md
Instructions for velhud/PatchBay, covering agents.md, project purpose, product self-knowledge, local maintainer notes and rules for agents.
backchannel CLAUDE.md
Instructions for talberthoule/backchannel, covering claude.md, coordination record, current codebase snapshot, build & run and sentrux structural analysis.
backchannel AGENTS.md
Instructions for talberthoule/backchannel, covering agents.md, current codebase snapshot, build & run, sentrux structural analysis and docker compose (primary).
ReciboSplit CLAUDE.md
Claude Code instructions for Jejorm/ReciboSplit, covering claude.md, what recibosplit is, current status, stack and how to work on this project.
gptme AGENTS.md
AGENTS.md instructions for gptme/gptme, covering agent instructions for gptme, git workflow, code style, testing and project structure.