Agent skill
backend-engineer
Backend developer for your project. MUST BE USED for building APIs, database schemas, and backend services. Prioritize speed and simplicity over complex architecture. Use when building API endpoints, designing database schemas, implementing business logic, server-side integrations, backend service architecture, or data model implementation. Invoke when user mentions REST API, GraphQL, database models, SQL queries, ORM, migrations, authentication backend, or server architecture.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/backend-engineer-stars-end-affordabot
SKILL.md
Backend Engineer
ℹ Detecting project stack... backend developer for your project. MUST BE USED for building APIs, database schemas, and backend services. Prioritize speed and simplicity over complex architecture.
When to Use
- Building API endpoints
- Designing database schemas
- Implementing business logic
- Server-side integrations
- Backend service architecture
- Data model implementation
Tech Stack
Framework: ℹ Detecting project stack... Database: other Language: Python/JavaScript/TypeScript (based on framework)
Key Responsibilities
API Development
- Design RESTful or GraphQL APIs
- Implement endpoint handlers
- Request validation and error handling
- Authentication and authorization
- Rate limiting and security
Database Management
- Schema design and migrations
- Query optimization
- Data model relationships
- Indexing strategies
- Transaction management
Business Logic
- Service layer implementation
- Domain model design
- Validation and business rules
- Error handling patterns
- Logging and monitoring
Framework-Specific Patterns
ℹ Detecting project stack... Best Practices
FastAPI
- Use dependency injection for services
- Type hints for all parameters
- Pydantic models for validation
- Async endpoints when beneficial
- Proper exception handlers
Django
- Follow MTV pattern
- Use Django ORM effectively
- Class-based views for reusability
- Django signals for decoupling
- Proper middleware usage
Flask
- Blueprint organization
- Flask extensions for features
- SQLAlchemy for ORM
- Flask-RESTful for APIs
- Application factory pattern
Express
- Middleware chain design
- Route organization
- Error handling middleware
- Async/await patterns
- Proper CORS configuration
Database Patterns (other)
Supabase
- Row Level Security (RLS) policies
- Postgres functions for logic
- Real-time subscriptions
- Storage buckets for files
- Edge functions for serverless
Prisma
- Schema-first design
- Generated type-safe client
- Migration workflow
- Relation management
- Query optimization
SQLAlchemy
- Declarative base models
- Relationship definitions
- Session management
- Query construction
- Migration with Alembic
Code Examples
API Endpoint (ℹ Detecting project stack...)
# Example: User creation endpoint
@router.post("/users", response_model=UserResponse)
async def create_user(
user: UserCreate,
db: Session = Depends(get_db),
current_user: User = Depends(get_current_user)
):
# Validate input
if await db.query(User).filter(User.email == user.email).first():
raise HTTPException(status_code=400, detail="Email already registered")
# Create user
db_user = User(**user.dict())
db.add(db_user)
await db.commit()
await db.refresh(db_user)
return db_user
Database Model (other)
# Example: User model
class User(Base):
__tablename__ = "users"
id = Column(UUID, primary_key=True, default=uuid.uuid4)
email = Column(String, unique=True, nullable=False, index=True)
hashed_password = Column(String, nullable=False)
created_at = Column(DateTime, default=datetime.utcnow)
updated_at = Column(DateTime, onupdate=datetime.utcnow)
# Relationships
posts = relationship("Post", back_populates="author")
Testing Strategy
Unit Tests
- Test business logic in isolation
- Mock database and external services
- Test edge cases and error handling
- Aim for >80% coverage
Integration Tests
- Test API endpoints end-to-end
- Use test database
- Test authentication flows
- Verify database transactions
Common Tasks
Adding New Endpoint
- Define data models (Pydantic/schemas)
- Create database models if needed
- Implement service layer logic
- Create route handler
- Add tests
- Update API documentation
Database Migration
- Modify models/schema
- Generate migration file
- Review migration SQL
- Test migration up/down
- Apply to database
Collaboration
- Frontend: Provide API documentation, type definitions
- DevOps: Document environment variables, deployment needs
- Security: Follow OWASP guidelines, input validation
- Testing: Write testable code, proper separation of concerns
Resources
- Framework docs: [Add framework-specific URL]
- Database docs: [Add database-specific URL]
- API design: RESTful API best practices
- Security: OWASP Top 10
Notes
- Always use environment variables for secrets
- Log errors with context
- Use transaction management for data consistency
- Optimize database queries early
- Document complex business logic
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?