# django-models

> Claude/Codex skill by [@getsentry](https://omgskills.com/library/getsentry/index.md) · 45k stars · Updated 2026-08-31

Design Django ORM models for Sentry following architectural conventions for silos, replication, relocation, and foreign keys. Use when adding a new Django model, designing a model for a feature, deciding where data should live, picking a foreign key type, or refactoring an existing model's silo placement. Trigger on "add a Django model", "create a model", "design a model for X", "new database table", "store this data in the DB", "I need to track Y", "model for \[feature\]". Not for Pydantic models, dataclasses, ML models, or Protobuf — this is specifically for Django ORM models in the Sentry codebase.

Tags: apm, crash-reporting, crash-reports, csp-report, devops, django, error-logging, error-monitoring, fair-source, hacktoberfest, monitor, monitoring, python, sentry, tag-production

## Install

```sh
git clone https://github.com/getsentry/sentry /tmp/sentry && ln -s /tmp/sentry/.agents/skills/django-models ~/.claude/skills/django-models
```

## From README

Sentry Model Conventions This skill captures the architectural decisions that go into a Sentry model. It does not cover Django syntax, import order, or migration generation — for those: Migrations: invoke the generate-migration skill after the model is designed. Outbox replication plumbing (signal receivers, payload shapes, deletion handlers): invoke the hybrid-cloud-outboxes skill. Hybrid cloud RPCs: invoke the hybrid-cloud-rpc skill. The four decisions that define a Sentry model Before writing any fields, decide all four. They are coupled — getting one wrong forces a follow-up migration to fix the others. Which silo does this data live in? Cell silo (@cellsilomodel) is the default. Use control silo (@controlsilomodel) only when the data is shared across organizations or has to be strongly consistent with other control-silo resources (auth, integration installs, API tokens, slug reservations).

## Links

- HTML page: https://omgskills.com/skills/getsentry/sentry/django-models/
- GitHub: https://github.com/getsentry/sentry
- Author: [@getsentry](https://omgskills.com/library/getsentry/index.md)

## More from this repo

- [design-system](https://omgskills.com/skills/getsentry/sentry/design-system/index.md) — Guide for using Sentry's layout and text primitives.
   - [@getsentry](https://omgskills.com/library/getsentry/index.md) · 45k stars
- [cell-architecture](https://omgskills.com/skills/getsentry/sentry/cell-architecture/index.md) — Reference and active migration guide for Sentry's cell architecture.
   - [@getsentry](https://omgskills.com/library/getsentry/index.md) · 45k stars
- [cmdk-actions](https://omgskills.com/skills/getsentry/sentry/cmdk-actions/index.md) — Guide for adding new actions to Sentry's Command+K palette.
   - [@getsentry](https://omgskills.com/library/getsentry/index.md) · 45k stars
