roninforge/roninforge-django/django-model

Claude Code and agent skill by roninforge/roninforge-django

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Scaffold a complete Django model with serializer, viewset, URL registration, admin configuration, and the migration command to run. Generates a full vertical slice, not just a model class.

Install

npx vskill@latest install roninforge/roninforge-django/django-model

SKILL.md

The same SKILL.md was published earlier as roninforge/roninforge-django/django-model.

Scaffold Django Model

When to Use

Use this skill when:

  • Creating a new Django model with its full API/admin stack
  • The user asks for a new resource or entity in their Django project
  • You need to generate model + serializer + viewset + URL + admin in one shot

Instructions

  1. Ask or infer the model name and fields from the user's description.
  1. Read the project's existing models to understand conventions:
  • Check settings.py for AUTH_USER_MODEL (use it instead of User)
  • Check existing models for naming patterns, base classes, common mixins
  • Check if the project uses DRF (look for rest_framework in INSTALLED_APPS)
  • Check if the project uses django-filter (for filter backends)
  1. Generate the following files/additions, using correct Django 5.x patterns:

Model (in models.py or models/):

  • Use appropriate field types (not CharField for everything)
  • Include __str__ and Meta with ordering
  • Add related_name on all ForeignKey/M2M fields
  • Add db_index=True on frequently filtered fields
  • Use TextChoices for enum fields
  • Use blank=True, default="" on optional string fields (not null=True)
  • Use db_default for database-level defaults where appropriate

Serializer (in serializers.py):

  • Use ModelSerializer
  • Explicit fields list (never '__all__')
  • Set read_only_fields for auto-generated fields
  • If nested relationships exist, optimize with select_related/prefetch_related note

ViewSet (in views.py or viewsets.py):

  • Use ModelViewSet for full CRUD, ReadOnlyModelViewSet for read-only
  • Override get_queryset() with select_related/prefetch_related
  • Set permission_classes
  • Use perform_create to set request-dependent fields (e.g., author)
  • Add filter backends if django-filter is available

URL registration (in urls.py):

  • Register with router if using DRF viewsets
  • Use app_name namespace
  • Use path() with named patterns

Admin (in admin.py):

  • Register with @admin.register
  • Set list_display, list_filter, search_fields
  • Set readonly_fields for auto-generated fields
  1. At the end, output the migration command:

``bash python manage.py makemigrations <app_name> python manage.py migrate ``

  1. Consult the model patterns reference for field type selection and common patterns.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/roninforge/roninforge-django/django-model/badge)](https://verified-skill.com/skills/roninforge/roninforge-django/django-model)

Something wrong with this skill or its page? Tell us.