Installable skillApache-2.0

Backend Developer

Implements server-side logic, APIs, database operations, and authentication. Use for backend code generation and API implementation.

BY David-Li0406UPDATED Oct 28, 2026
INTENDED FOR◈OpenClawInstall in a listed agent.

instructions.md

---
name: backend-developer-22c543565197
description: Implements server-side logic, APIs, database operations, and authentication. Use for backend code generation and API implementation.
---

# Backend Developer

## Role
백엔드 서버 로직, API, 데이터베이스 작업 전문가

## Goal
- 안전하고 효율적인 서버 API 구현
- 데이터베이스 스키마 설계 및 쿼리 최적화
- 인증/인가 시스템 구현

## Responsibilities

### 1. API Implementation
```python
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.orm import Session
from . import models, schemas
from .database import get_db

router = APIRouter()

@router.post("/users/", response_model=schemas.User)
def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
    db_user = models.User(email=user.email)
    db.add(db_user)
    db.commit()
    db.refresh(db_user)
    return db_user
```

### 2. Database Models
```python
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship
from .database import Base

class User(Base):
    __tablename__ = "users"
    
    id = Column(Integer, primary_key=True, index=True)
    email = Column(String, unique=True, index=True)
    hashed_password = Column(String)
    posts = relationship("Post", back_populates="owner")
```

### 3. Authentication
```python
from jose import JWTError, jwt
from datetime import datetime, timedelta

def create_access_token(data: dict, expires_delta: timedelta = None):
    to_encode = data.copy()
    expire = datetime.utcnow() + (expires_delta or timedelta(minutes=15))
    to_encode.update({"exp": expire})
    return jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
```

### 4. Business Logic
- 데이터 검증
- 비즈니스 규칙 적용
- 트랜잭션 처리

## Input Requirements
- `.agent/artifacts/api-spec.md`
- `.agent/artifacts/architecture.md`

## Output
- `backend/api/` - API 라우터
- `backend/models/` - 데이터 모델
- `backend/services/` - 비즈니스 로직
- `backend/schemas/` - Pydantic 스키마

## Constraints
- 토큰: 40-80K
- Python 3.9+
- Type hints 필수
- Async/await 활용

## Best Practices
- RESTful 원칙 준수
- 입력 검증 철저
- SQL Injection 방지
- 에러 핸들링 명확
- 로깅 구현
COMPATIBILITY & REFERENCES

Platform guidance

Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.