Claude Code로 배우는 Software Development
Dani Zysman
AI Curriculum Manager @ DataCamp
/init으로 시작한 다음 반복 개선하세요music-analytics-api/
app.py # Application entry point
routes.py # API endpoints
models.py # Artist/Album models
analytics.py # Statistics functions
middleware.py # Request logging
config.py # Session settings
CLAUDE.md # <- Project memory file

규칙: 포스트잇 한 장보다 길면 CLAUDE.md에 넣지 마세요.
> Add error handling to the /artists endpoint.
Done. I've added error handling to /artists (routes.py:9-19):
- Try-except block wrapping retrieval and serialization
- AttributeError handler if the data store isn't initialized
- General exception handler returning error details with 500 status
return jsonify({'error': f'Failed to retrieve artists: {str(e)}'}), 500
> Don't expose exception details to users, that's a security risk. Log internally
and return a generic message. Update CLAUDE.md.
Updated /artists to log errors internally and return a
generic 500 message. CLAUDE.md updated with the convention:
never expose exception details in responses.
지나치게 방대한 버전 (200줄 이상)
# Inventory API
This is an Inventory Management
API built with Flask...
## Full Source Code
### routes.py
from flask import jsonify...
[entire file pasted]
### models.py
[entire file pasted]
## API Documentation
GET /items returns...
적절한 버전 (15줄)
# Inventory API
Flask REST API for inventory.
## Commands
- Run: flask run --port 5001
- Test: pytest tests/
## Conventions
- Use type hints
- Keep routes thin
> @routes.py what endpoints does this API have?
API Endpoints (6 GET routes)
Artists
- GET /artists All artists
- GET /artists/<id> Single artist by ID
- GET /artists/<id>/albums Albums for an artist
Albums
- GET /albums All albums
- GET /stats/albums Album popularity statistics
- GET /stats/average-tracks Average track count per album
All endpoints return JSON.
# CLAUDE.md - Music Analytics API A Flask-based REST API for music data analytics, providing endpoints for artists, albums, and statistics. ...## Key Files @routes.py - API endpoint definition @models.py - Artist and Album data models with in-memory store ...
CLAUDE.md는 지속적인 컨텍스트를 제공합니다. @를 사용하면 Claude가 항상 핵심 파일을 파악할 수 있습니다.

CLAUDE.md (프로젝트, 공유)
CLAUDE.local.md (프로젝트, 개인)
~/.claude/CLAUDE.md (전역, 개인)
/init과CLAUDE.md → 지속적인 프로젝트 컨텍스트Shift+Tab 또는 /plan → Plan 모드 전환think ... ultrathink → 심층 추론 (5단계)Claude Code로 배우는 Software Development