auto_trader CLAUDE.md

auto_trader CLAUDE.md is an instructions file for coding agents from mgh3326/auto_trader. It costs 22,298 tokens per session, scanned A, original, MIT.

Project instructions for an AI-powered financial analysis system that collects data from domestic stocks, overseas stocks, and cryptocurrencies. It uses Python, PostgreSQL, Redis, and a separate MCP consumer—another program that sends data to an AI session for analysis.

In plain words
What is it for?
Use it to install dependencies with UV, configure API keys, start PostgreSQL and Redis with Docker Compose, apply database migrations, run the development server, and execute unit or integration tests.
Why use it?
It gives contributors the setup commands and project context needed to run the system consistently. It also explains the required databases, environment variables, migrations, and test commands so development does not depend on guesswork.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/mgh3326/auto_trader/claude-md
Clone the repo
git clone --depth 1 https://github.com/mgh3326/auto_trader

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for auto_trader CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mgh3326/auto_trader/claude-md.svg)](https://agentmods.dev/instructions/mgh3326/auto_trader/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mgh3326/auto_trader/claude-md"><img src="https://agentmods.dev/badge/instructions/mgh3326/auto_trader/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 22,298 This file is loaded in full into every session.
When invoked 22,298 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.22298 $0.22298
Opus 5 $0.11149 $0.11149
Sonnet 5 $0.04460 $0.04460
Haiku 4.5 $0.02230 $0.02230

Measured today against content hash d8d4f84cddb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

auto_trader 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 today.

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.

CLAUDE.md · 1,105 lines

How it starts

The opening of the file, as written. The whole thing — 1,105 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.

프로젝트 개요

AI 기반 자동 거래 분석 시스템으로, 다양한 금융 데이터를 수집하고 out-of-process MCP consumer(claude 세션 등)를 통해 투자 분석을 제공합니다.

주요 특징:

  • 다중 시장 지원: 국내주식(KIS), 해외주식(KIS/Yahoo Finance), 암호화폐(Upbit)
  • 다중 시간대 분석: 일봉 200개 + 분봉(60분/5분/1분)
  • AI 분석: out-of-process MCP consumer(claude 세션 등)가 담당 (런타임은 in-process LLM provider 미탑재 — ROB-501 가드)

개발 환경 설정

필수 요구사항

  • Python 3.13+
  • UV (의존성 관리)
  • PostgreSQL (데이터베이스)
  • Redis (모델 제한 관리 및 캐싱)

초기 설정

# UV 설치 (미설치 시)
pip install uv

# 의존성 설치
uv sync                           # 프로덕션 의존성만
uv sync --all-groups              # 모든 의존성 (test, dev 포함)

# 환경 변수 설정
cp env.example .env
# .env 파일 편집하여 API 키 설정

# 데이터베이스 마이그레이션
uv run alembic upgrade head

# 개발 서버 실행
make dev                          # 또는 uv run uvicorn app.main:app --reload

Docker 환경

docker compose up -d              # PostgreSQL, Redis, Adminer 시작
docker compose ps                 # 서비스 상태 확인
docker compose down               # 서비스 중지

핵심 명령어

테스트

make test                         # 모든 테스트 실행
make test-unit                    # 단위 테스트만
make test-integration             # 통합 테스트만
make test-cov                     # 커버리지 리포트 포함
uv run pytest tests/test_*.py -v -k "test_name"  # 특정 테스트만

코드 품질

make lint                         # Ruff + ty 검사
make format                       # Ruff로 코드 포맷팅
make typecheck                    # ty 타입 체킹
make security                     # bandit, safety 보안 검사

데이터베이스

# 마이그레이션 생성 및 적용
uv run alembic revision --autogenerate -m "migration message"
uv run alembic upgrade head

# 마이그레이션 롤백
uv run alembic downgrade -1

# 현재 버전 확인
uv run alembic current

개발 도구

python manage_users.py list                 # 사용자 권한/상태 확인
python websocket_monitor.py --mode both     # 통합 WebSocket 모니터링
python kis_websocket_monitor.py             # KIS WebSocket 모니터링
python upbit_websocket_monitor.py           # Upbit WebSocket 모니터링

Read the full file on GitHub · 1,105 lines

Changes

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.

  1. today Changed · +21 lines · +456 tokens per session d8d4f84cddb5
  2. 5d ago First seen · 1,084 lines · 21,842 tokens per session scan A ed64e91ad76a

Subscribe to this mod's changes

auto_trader CLAUDE.md is an instructions file published in the GitHub repository mgh3326/auto_trader (6 stars, last pushed today), licensed MIT. It adds 22,298 tokens to every session, about $0.1115 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.