Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/aratkruglik/claude-sdlc/django-orm-patternsnpx skills add AratKruglik/claude-sdlc --skill django-orm-patternsgit clone --depth 1 https://github.com/AratKruglik/claude-sdlcWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/aratkruglik/claude-sdlc/django-orm-patterns)<a href="https://agentmods.dev/skills/aratkruglik/claude-sdlc/django-orm-patterns"><img src="https://agentmods.dev/badge/skills/aratkruglik/claude-sdlc/django-orm-patterns.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00202 | $0.02218 |
| Opus 5 | $0.00101 | $0.01109 |
| Sonnet 5 | $0.00040 | $0.00444 |
| Haiku 4.5 | $0.00020 | $0.00222 |
Grade A, and why
django-orm-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Django ORM Patterns
This skill covers Django ORM model definitions, query patterns, and database-level options. Apply alongside django-plugin:django-conventions when implementing features.
Role split:
django-architectuses this skill for model definitions — fields,__str__, choices,class Metaordering, custom managers, and query patterns.django-migrations-specialistuses this skill for field finalization — settingmax_digits,on_delete,db_index,Meta.indexes,Meta.constraints— before runningmakemigrations.
1. Detection
Check the Django version in requirements.txt or pyproject.toml before writing constraint code — Meta.constraints using CheckConstraint uses condition= in Django 5.1+ and check= in Django 4.x. When uncertain, check the installed version with python manage.py --version or read the pinned version from the dependency file.
2. Model definition patterns
Use TextChoices for string-typed status/type fields. Write a meaningful __str__. Always specify class Meta ordering.
from django.db import models
from django.contrib.auth import get_user_model
User = get_user_model()
class Order(models.Model):
class Status(models.TextChoices):
PENDING = 'pending', 'Pending'
PROCESSING = 'processing', 'Processing'
SHIPPED = 'shipped', 'Shipped'
CANCELLED = 'cancelled', 'Cancelled'
user = models.ForeignKey(User, on_delete=models.PROTECT, related_name='orders')
product = models.CharField(max_length=255)
qty = models.PositiveIntegerField()
unit_price = models.DecimalField(max_digits=10, decimal_places=2)
status = models.CharField(max_length=20, choices=Status.choices, default=Status.PENDING)
notes = models.TextField(blank=True, default='')
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
class Meta:
ordering = ['-created_at']
indexes = [
models.Index(fields=['status', 'created_at']),
]
constraints = [
models.UniqueConstraint(fields=['user', 'reference'], name='unique_user_reference'),
# Django 5.1+: condition=; Django 4.x: check=
models.CheckConstraint(condition=models.Q(qty__gt=0), name='orders_order_qty_positive'),
]
def __str__(self) -> str:
return f'Order #{self.pk} — {self.product} ({self.get_status_display()})'
@property
def is_cancellable(self) -> bool:
return self.status in (self.Status.PENDING, self.Status.PROCESSING)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 270 lines · 202 tokens per session scan A bb208677996d
django-orm-patterns is a skill published in the GitHub repository AratKruglik/claude-sdlc (32 stars, last pushed yesterday), licensed MIT. It adds 202 tokens to every session and 2,218 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
django-models
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…
adding-personhog-rpc
Guide for adding a new RPC to personhog-replica and personhog-router. Covers eligibility checks, proto definition, code generation for Python and Node.js clients, Rust implementation (storage trait, postgres queries, service handler, router wiring), and index compatibility validation. Use when adding a new gRPC…
azure-cosmos-db-py
Build Azure Cosmos DB NoSQL services with Python/FastAPI following production-grade patterns. Use when implementing database client setup with dual auth (DefaultAzureCredential + emulator), service...
azure-cosmos-py
Client library for Azure Cosmos DB NoSQL API — globally distributed, multi-model database.
azure-data-tables-py
NoSQL key-value store for structured data (Azure Storage Tables or Cosmos DB Table API).
alembic
Manage database migrations with Alembic. Use when a user asks to version database schemas, create migration scripts, handle schema changes in production, or manage SQLAlchemy model migrations.