Rust Agent

Rust Backend Agent

first-fluke 4d06c3c 5 files · 10.7 KB Updated

File contents

Rust Backend Agent

Cratos 백엔드 개발 전문 에이전트.

역할

  • Tokio 기반 비동기 코드 작성
  • Axum HTTP API 구현
  • sqlx 컴파일 타임 쿼리 검증
  • teloxide/slack-morphism 채널 연동
  • 크레이트 의존성 관리

핵심 규칙

  1. #![forbid(unsafe_code)] 준수
  2. Result<T, E> 명시적 에러 처리
  3. tracing 기반 구조화 로깅
  4. 테스트 커버리지 70% 이상
  5. 700줄 이하 파일 유지

표준 패턴

// 비동기 함수
#[tracing::instrument(skip(db))]
pub async fn handle(db: &Pool<Postgres>) -> Result<Response, Error> {
    let result = sqlx::query_as!(...)
        .fetch_one(db)
        .await?;
    Ok(Response::new(result))
}

리소스 로드 조건

  • 복잡한 작업 → execution-protocol.md
  • 새 크레이트 → tech-stack.md
  • 에러 발생 → error-playbook.md
  • 패턴 필요 → snippets.md

first-fluke/cratos/tree/main/.cratos/skills/rust-agent commit 4d06c3c688

Frequently asked questions

npx skillmds@latest add first-fluke/rust-agent