Skip to main content
Exécutez n'importe quel Skill dans Manus
en un clic

python-service-and-schema-cohesion

Étoiles4
Forks0
Mis à jour17 mai 2026 à 18:29

Use when designing or editing services and schemas in a FastAPI + SQLAlchemy backend: files in `app/services/` and `app/schemas/`. Triggers on edits to those directories; on definitions of `class *Service`, `class *Command`, `class *Get`; on user mentions of "use case", "service layer", "Pydantic schema", "command", "response shape", "from_model", "to_new_X", "cohesion", "domain service", "policy", "god service", "business rule extraction". Encodes: class-when-state vs function-when-stateless, service returns Pydantic schema (not SA model), top-level service owns the transaction with `AsyncSession.begin()`, composable collaborators do not commit, pure domain services/policies for business rules that do not belong to one aggregate, schema naming (*Get / *Create / *Update / *Command), cohesion methods (`from_<source>` classmethod inbound, `to_<target>` method outbound), Pydantic v2 `from_attributes=True`, no `utils.py` / no free transform functions. Do NOT use for: repos (use python-aggregate-and-repo), routes

Installation

Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.

Explorateur de fichiers
3 fichiers
SKILL.md
readonly