Development assistant for CCProxy - OpenAI-compatible proxy for Anthropic Messages API. Handles setup, testing, linting, Docker operations, and architecture guidance following hexagonal/clean architecture principles.
Development assistant for CCProxy - an OpenAI-compatible proxy for the Anthropic Messages API built with FastAPI, featuring async operations, Cython optimizations, and hexagonal architecture.
Provides comprehensive development support for the CCProxy project including:
When setting up the project:
- `OPENAI_API_KEY` or `OPENROUTER_API_KEY`
- `BIG_MODEL_NAME`
- `SMALL_MODEL_NAME`
- `CCPROXY_ENABLE_CYTHON` (default True) - controls Cython optimizations
- `CACHE_WARMUP_ENABLED` (default False) - enables cache preloading
- Thread pool configuration variables for performance tuning
Choose the appropriate run method based on context:
**Local Development:**
```bash
python main.py
```
**Production:**
```bash
./run-ccproxy.sh
```
**Docker:**
```bash
./docker-compose-run.sh up -d
./docker-compose-run.sh logs -f
```
**Health checks:**
Always run tests after making changes:
**All tests:**
```bash
./run-tests.sh
uv run pytest -q
```
**With coverage:**
```bash
./run-tests.sh --coverage
```
**Single test file:**
```bash
uv run pytest -q test_optimized_client.py
```
**Single test function:**
```bash
uv run pytest -q test_optimized_client.py::test_name
```
**Key testing facts:**
**Linting (check only):**
```bash
./start-lint.sh --check
```
**Linting with auto-fix + format:**
```bash
./start-lint.sh --all
./start-lint.sh --fix
```
**Type checking:**
```bash
mypy .
```
**IMPORTANT:** Always run linting after making changes.
Follow hexagonal/clean architecture principles:
**Domain Layer (ccproxy/domain/):**
**Application Layer (ccproxy/application/):**
**Infrastructure Layer (ccproxy/infrastructure/):**
**Interface Layer (ccproxy/interfaces/):**
**Cython Optimization Layer (ccproxy/_cython/):**
**Cross-cutting:**
When modifying code:
1. **NEVER create files unless absolutely necessary**
2. **ALWAYS prefer editing existing files over creating new ones**
3. **NEVER proactively create documentation files** (*.md, README) unless explicitly requested
4. **Always construct FastAPI app through create_app(Settings)** - no global imports
5. **Use dependency injection** for testability and loose coupling
6. **Respect layer boundaries** - domain should not depend on infrastructure
7. **Use async converters** for better performance (convert_messages_async, convert_response_async)
8. **Preserve UTF-8** throughout - never assume ASCII
9. **Follow existing logging patterns** (LogEvent) - never log secrets
10. **Provide pure Python fallback** when integrating Cython modules
**Thread Pool Management:**
**Rate Limiting:**
**Caching:**
**Reasoning Support:**
**Example 1: Adding a new feature**
```
User: Add support for streaming tool calls
AI: First, I'll read the streaming.py file to understand current implementation...
[reads ccproxy/interfaces/http/streaming.py]
AI: I'll modify the existing streaming logic to handle tool calls...
[edits streaming.py - no new files created]
AI: Now running tests to verify...
[runs ./run-tests.sh]
```
**Example 2: Fixing a bug**
```
User: Fix the token counting cache invalidation
AI: Reading the tokenizer module...
[reads ccproxy/application/tokenizer.py]
AI: I see the issue - the TTL isn't being respected. I'll fix it...
[edits tokenizer.py]
AI: Running lint and type checks...
[runs ./start-lint.sh --check && mypy .]
```
**Example 3: Performance optimization**
```
User: Optimize the message conversion logic
AI: Checking if Cython module exists for this operation...
[reads ccproxy/_cython/ directory]
AI: I'll create a Cython implementation with pure Python fallback...
[creates .pyx file with corresponding .py fallback]
AI: Running benchmarks to verify improvement...
[runs pytest benchmarks/ --benchmark-only]
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/ccproxy-development/raw