# apinto25/claude-code-agents-skills architecture

> Architecture diagram of the GitHub repository apinto25/claude-code-agents-skills, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/apinto25/claude-code-agents-skills
- Repository: https://github.com/apinto25/claude-code-agents-skills

## Overview

#### Repository Role

This is course material for Claude Code agents and skills, with a contained example service: **Grades API**. The executable application is under `grades-api/`; repository-level `.claude/` content defines Claude Code guidance rather than application runtime behavior.

#### Application Entry and Composition

FastAPI starts from `grades-api/main.py`, exposing the ASGI `app` used by Uvicorn. The app composes resource routers for students and grades, separating HTTP endpoint registration from persistence models and request/response schemas.

Key paths:
- `grades-api/main.py`
- `grades-api/routes/students.py`
- `grades-api/routes/grades.py`

#### Persistence Boundary

SQLite access and SQLModel session/database setup are centralized in `grades-api/database.py`. This is the storage boundary between API request handling and local relational persistence. The service is intended to run with a local SQLite database, with no indicated remote database or external SaaS dependency.

Key paths:
- `grades-api/database.py`
- `grades-api/models/student.py`
- `grades-api/models/grade.py`

#### Domain Model

The core domain consists of students and their grades. `Student` is the parent entity; `Grade` records performance associated with a student and a subject. The model layer represents persisted SQLModel entities and their relationships.

Key paths:
- `grades-api/models/student.py`
- `grades-api/models/grade.py`
- `grades-api/models/__init__.py`

#### API Contract Layer

Schemas isolate transport-level validation and serialization from database entities. Student and grade-specific schema modules define the accepted creation data and returned API representations; grade schemas also encode subject/grade-oriented inputs and outputs.

Key paths:
- `grades-api/schemas/student.py`
- `grades-api/schemas/grade.py`
- `grades-api/schemas/__init__.py`

#### Primary Request and Data Flow

1. Uvicorn loads the FastAPI app from `grades-api/main.py`.
2. Requests are dispatched to student or grade routers.
3. Routers validate payloads using schema types.
4. Route handlers use database sessions from `grades-api/database.py`.
5. SQLModel entities in `grades-api/models/` create, query, and relate student and grade records.
6. Handlers return schema-shaped responses, including student performance summaries derived from persisted grades.

The main control boundary is router → schema validation → database session → SQLModel persistence/query → serialized response.

#### Runtime and Development Infrastructure

The service runs on Python, FastAPI, SQLModel, and SQLite. Dependency/environment management is defined by `uv`, with package metadata in `grades-api/pyproject.toml` and locked dependencies in `grades-api/uv.lock`. Local development launches Uvicorn against `main:app`; FastAPI provides interactive OpenAPI documentation at `/docs`.

Key paths:
- `grades-api/pyproject.toml`
- `grades-api/uv.lock`
- `grades-api/.python-version`

#### Claude Code Course Infrastructure

Repository-level agent instructions and reusable skills support the educational workflow around the example API. These are not imported by the API, but guide review, test execution, and commit-message tasks in Claude Code.

Key paths:
- `.claude/agents/test-runner.md`
- `.claude/agents/test-coverage.md`
- `.claude/skills/python-review/SKILL.md`

Main entry points: [`grades-api/main.py`](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/main.py) (FastAPI app), [`grades-api/routes/students.py`](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/routes/students.py) (Student routes), [`grades-api/routes/grades.py`](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/routes/grades.py) (Grade routes), [`grades-api/database.py`](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/database.py) (Database sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Grades API"]
  node_uvicorn{{"Uvicorn<br/>ASGI server"}}
  node_app["FastAPI app<br/>application entry<br/>[main.py]"]
  node_student_routes["Student routes<br/>HTTP router<br/>[students.py]"]
  node_grade_routes["Grade routes<br/>HTTP router<br/>[grades.py]"]
  node_student_schemas["Student schemas<br/>API contracts<br/>[student.py]"]
  node_grade_schemas["Grade schemas<br/>API contracts<br/>[grade.py]"]
  node_runtime_config["Python environment<br/>dependency management<br/>[pyproject.toml]"]
end

subgraph group_persistence["Persistence"]
  node_database["Database sessions<br/>SQLModel setup<br/>[database.py]"]
  node_student_model["Student model<br/>SQLModel entity<br/>[student.py]"]
  node_grade_model["Grade model<br/>SQLModel entity<br/>[grade.py]"]
  node_sqlite[("Local SQLite<br/>relational database")]
end

subgraph group_course["Claude Code Course"]
  node_test_runner["Test runner agent<br/>Claude agent guidance<br/>[test-runner.md]"]
  node_test_coverage["Coverage agent<br/>Claude agent guidance<br/>[test-coverage.md]"]
  node_python_review["Python review skill<br/>Claude skill<br/>[SKILL.md]"]
end

node_uvicorn -->|"loads main:app"| node_app
node_app -->|"registers"| node_student_routes
node_app -->|"registers"| node_grade_routes
node_student_routes -->|"validates and serializes"| node_student_schemas
node_grade_routes -->|"validates and serializes"| node_grade_schemas
node_student_routes -->|"uses sessions"| node_database
node_grade_routes -->|"uses sessions"| node_database
node_database -->|"connects"| node_sqlite
node_student_routes -->|"queries and persists"| node_student_model
node_grade_routes -->|"queries and persists"| node_grade_model
node_grade_model -->|"belongs to"| node_student_model
node_runtime_config -.->|"defines runtime dependencies"| node_app
node_test_runner -.->|"guides testing"| node_app
node_test_coverage -.->|"guides coverage work"| node_app
node_python_review -.->|"guides review"| node_app

click node_app "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/main.py"
click node_student_routes "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/routes/students.py"
click node_grade_routes "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/routes/grades.py"
click node_student_schemas "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/schemas/student.py"
click node_grade_schemas "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/schemas/grade.py"
click node_database "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/database.py"
click node_student_model "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/models/student.py"
click node_grade_model "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/models/grade.py"
click node_runtime_config "https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/pyproject.toml"
click node_test_runner "https://github.com/apinto25/claude-code-agents-skills/blob/main/.claude/agents/test-runner.md"
click node_test_coverage "https://github.com/apinto25/claude-code-agents-skills/blob/main/.claude/agents/test-coverage.md"
click node_python_review "https://github.com/apinto25/claude-code-agents-skills/blob/main/.claude/skills/python-review/SKILL.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_uvicorn,node_app,node_student_routes,node_grade_routes,node_student_schemas,node_grade_schemas,node_runtime_config toneBlue
class node_database,node_student_model,node_grade_model,node_sqlite toneAmber
class node_test_runner,node_test_coverage,node_python_review toneMint
```

## Components

### Grades API

FastAPI service runtime.

- **Uvicorn**: ASGI server
- [FastAPI app](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/main.py): application entry · Composes API routers. · `grades-api/main.py`
- [Student routes](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/routes/students.py): HTTP router · `grades-api/routes/students.py`
- [Grade routes](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/routes/grades.py): HTTP router · `grades-api/routes/grades.py`
- [Student schemas](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/schemas/student.py): API contracts · `grades-api/schemas/student.py`
- [Grade schemas](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/schemas/grade.py): API contracts · Includes grade inputs and response shapes. · `grades-api/schemas/grade.py`
- [Python environment](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/pyproject.toml): dependency management · uv package metadata and locked runtime dependencies. · `grades-api/pyproject.toml`

### Persistence

SQLite and SQLModel data boundary.

- [Database sessions](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/database.py): SQLModel setup · Central SQLite access boundary. · `grades-api/database.py`
- [Student model](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/models/student.py): SQLModel entity · Parent entity for grades. · `grades-api/models/student.py`
- [Grade model](https://github.com/apinto25/claude-code-agents-skills/blob/main/grades-api/models/grade.py): SQLModel entity · Performance record linked to a student. · `grades-api/models/grade.py`
- **Local SQLite**: relational database

### Claude Code Course

Repository guidance outside application runtime.

- [Test runner agent](https://github.com/apinto25/claude-code-agents-skills/blob/main/.claude/agents/test-runner.md): Claude agent guidance · `.claude/agents/test-runner.md`
- [Coverage agent](https://github.com/apinto25/claude-code-agents-skills/blob/main/.claude/agents/test-coverage.md): Claude agent guidance · `.claude/agents/test-coverage.md`
- [Python review skill](https://github.com/apinto25/claude-code-agents-skills/blob/main/.claude/skills/python-review/SKILL.md): Claude skill · `.claude/skills/python-review/SKILL.md`

## Connections

- Uvicorn → FastAPI app: loads main:app
- FastAPI app → Student routes: registers
- FastAPI app → Grade routes: registers
- Student routes → Student schemas: validates and serializes
- Grade routes → Grade schemas: validates and serializes
- Student routes → Database sessions: uses sessions
- Grade routes → Database sessions: uses sessions
- Database sessions → Local SQLite: connects
- Student routes → Student model: queries and persists
- Grade routes → Grade model: queries and persists
- Grade model → Student model: belongs to
- Python environment → FastAPI app: defines runtime dependencies
- Test runner agent → FastAPI app: guides testing · Not imported at runtime.
- Coverage agent → FastAPI app: guides coverage work · Not imported at runtime.
- Python review skill → FastAPI app: guides review · Not imported at runtime.
