一键导入
diagnose
Systematically diagnoses build, runtime, DB, API, and frontend errors with classification and fix workflow. Use when encountering errors or test failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Systematically diagnoses build, runtime, DB, API, and frontend errors with classification and fix workflow. Use when encountering errors or test failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generates numbered SQL migration files for tables, indexes, and views. Use when adding or modifying database schema.
Crawls exchange API documentation and generates structured markdown specs. Use when integrating a new exchange or updating API specifications.
Commits code changes with automated CHANGELOG and design document updates. Runs build/lint verification before commit. Use after completing a feature, bug fix, or refactoring.
Scaffolds a new API endpoint with router, handler, OpenAPI docs, and TS bindings. Use when adding REST endpoints to trader-api.
Scaffolds a new exchange connector with connector, provider, and trait implementations. Use when integrating a new exchange.
Adds a new trading strategy across 5 locations (mod.rs, routes, backtest, SDUI schema, frontend). Use when implementing a new strategy.
| name | diagnose |
| description | Systematically diagnoses build, runtime, DB, API, and frontend errors with classification and fix workflow. Use when encountering errors or test failures. |
| disable-model-invocation | true |
| user-invocable | true |
| argument-hint | [에러 메시지 또는 증상 설명] |
| allowed-tools | Read, Grep, Edit, Bash(cargo *), Bash(npm *), Bash(podman *), Bash(git *), Bash(curl *) |
| context | fork |
| agent | debugger |
$ARGUMENTS 문제를 진단합니다.
전달된 에러를 다음 카테고리로 분류합니다:
| 카테고리 | 키워드 | 진단 경로 |
|---|---|---|
| 컴파일 에러 | error[E, cannot find, trait bound | → Rust 진단 |
| 런타임 에러 | panic, thread 'main', SIGABRT | → 런타임 진단 |
| DB 에러 | sqlx, relation does not exist, connection | → DB 진단 |
| API 에러 | 4xx, 5xx, timeout, connection refused | → API 진단 |
| 프론트엔드 에러 | TypeError, ESLint, tsc | → TS 진단 |
| 컨테이너 에러 | podman, container, port | → 인프라 진단 |
# 전체 빌드로 에러 컨텍스트 확인
cargo check 2>&1 | Select-Object -First 50
# 특정 패키지만
cargo check -p <package> --message-format=short
에러 코드별 일반적 원인:
E0277 (trait bound) → 타입 불일치, derive 누락E0308 (mismatched types) → Decimal/f64 혼용 확인E0433 (unresolved import) → use 경로 확인E0599 (method not found) → 트레이트 import 누락# 1. 컨테이너 상태 확인
podman ps --filter "name=trader"
# 2. DB 접속 테스트
podman exec trader-timescaledb pg_isready -U trader
# 3. 마이그레이션 상태 확인
podman exec trader-timescaledb psql -U trader -d trader -c "SELECT * FROM _sqlx_migrations ORDER BY installed_on DESC LIMIT 5"
# 1. API 서버 상태
curl -s http://localhost:3000/health | ConvertFrom-Json
# 2. 특정 엔드포인트 테스트
curl -s http://localhost:3000/api/v1/<endpoint> | ConvertFrom-Json
Push-Location frontend
npx tsc --noEmit 2>&1 | Select-Object -First 30
npx eslint src --max-warnings 0 2>&1 | Select-Object -First 30
Pop-Location