django-models
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-migrationskill after the model is designed. - Outbox replication plumbing (signal receivers, payload shapes, deletion handlers): invoke the
hybrid-cloud-outboxesskill. - Hybrid cloud RPCs: invoke the
hybrid-cloud-rpcskill.
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.
1. Which silo does this data live in?
Cell silo (@cell_silo_model) is the default. Use control silo (@control_silo_model) 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).
The wrong way to think about it: "this is a user-facing thing, so control." The right way: "what is the smallest silo where this can correctly live, and is that silo the same as everything that mutates it together?" If a cell never reads it, it does not belong in the cell.
2. Does the other silo need to see this data?
More from getsentry/sentry
design-system
Guide for using Sentry's layout and text primitives. Use when implementing UI components, layouts, or typography. Enforces use of core components over styled components.
84sentry-security
Sentry-specific security review based on real vulnerability history. Use when reviewing Sentry endpoints, serializers, or views for security issues. Trigger keywords: "sentry security review", "check for IDOR", "access control review", "org scoping", "cross-org", "security audit endpoint".
67generate-migration
Generate Django database migrations for Sentry. Use when creating migrations, adding/removing columns or tables, adding indexes, or resolving migration conflicts.
67sentry-javascript-bugs
Review Sentry React and TypeScript changes for bug patterns drawn from real production issues. Use when reviewing a frontend diff or PR, checking Warden findings, auditing the current branch, reviewing production-error patterns, or looking for common regressions in `static/`.
61generate-frontend-forms
Guide for creating forms using Sentry's new form system. Use when implementing forms, form fields, validation, or auto-save functionality.
61migrate-frontend-forms
Guide for migrating forms from the legacy JsonForm/FormModel system to the new TanStack-based form system.
57