django-models
Skill by getsentry
Guides the design of Django ORM models in the Sentry codebase. It covers silo placement, replication, relocation scope, and foreign key choice for new or refactored models.
Install django-models
Built from the published package, never by AI.
git clone --depth 1 https://github.com/getsentry/sentry /tmp/sentry && mkdir -p ~/.claude/skills && cp -r /tmp/sentry/.agents/skills/django-models ~/.claude/skills/django-modelsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/getsentry/sentry /tmp/sentry && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sentry/.agents/skills/django-models ~/.gemini/antigravity-cli/skills/django-modelsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
django-models is an agent skill from getsentry that captures the architectural decisions behind a Sentry Django ORM model. It walks through four choices to make before writing fields: which silo the data lives in, whether the other silo needs to see it, its relocation scope, and which foreign key type to use. It also sets norms for base classes, timestamps, field types, constraints, indexes, and file placement.
The skill includes a minimal cell-silo model skeleton and points to other skills for migrations, outbox replication, and hybrid cloud RPCs. It is aimed at developers adding or changing models in the Sentry codebase. It does not cover Django syntax, import order, or migration generation, and it is not meant for Pydantic models, dataclasses, ML models, or Protobuf.
Written from the project's SKILL.md and checked against it.
What it can do
- Silo placementDecides whether a model should be cell silo or control silo, using the silo decorators.
- Replication choicePicks the base class for data that the other silo must see without an RPC.
- Relocation scopeSets RelocationScope.Organization or RelocationScope.Excluded for organization exports.
- Foreign key selectionChooses FlexibleForeignKey for same-silo targets and HybridCloudForeignKey for cross-silo targets.
- Field and base class normsRecommends DefaultFieldsModel, bounded integer fields, CharField sizing, and JSONField defaults.
- Constraint and index guidanceAdvises UniqueConstraint over unique_together and indexes that match query order.
- Model skeletonProvides a starting scaffold for a cell-silo model with a unique constraint and repr.
- Follow-up skill routingPoints to generate-migration, hybrid-cloud-outboxes, and hybrid-cloud-rpc for next steps.
What you need
- The Sentry codebase
- Django ORM models in Sentry
Try asking
- Design a Django model for storing alert rule audit history in Sentry
- Which silo should a new API token model live in, and why?
- Pick the right foreign key type for a model that references a User
Good to know
- Does not cover Django syntax, import order, or migration generation
- Not for Pydantic models, dataclasses, ML models, or Protobuf
- Specific to Django ORM models in the Sentry codebase
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/django-models/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB
Alternatives to django-models
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
django-models: common questions
Does this skill write migrations?
No. The source says migrations are handled by the generate-migration skill, which should be invoked after the model is designed.
When should a model use HybridCloudForeignKey?
The source says to use HybridCloudForeignKey when the foreign key target lives in the opposite silo. It has no database constraint and cascades through outbox tombstones.
What is the difference between DefaultFieldsModel and DefaultFieldsModelExisting?
DefaultFieldsModel adds date_added and date_updated and is recommended for new models. DefaultFieldsModelExisting is legacy only and should not be used on new models.
How do I install django-models?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is django-models free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is django-models safe to use?
It scores 83 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to django-models?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
