django-app-scaffold
Skill0 starsChanged 5 days agoMITView on GitHub
The skill scaffolds Django and Django REST Framework apps with models, serializers, viewsets, URLs, permissions, tests and migration commands; use it when adding a resource or generating a complete Django backend slice.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-design-reviewSkill
- codebase-reviewSkill
- commit-and-dcoSkill
- dockerfile-auditSkill
- exhaustive-prompt-specSkill
- incident-postmortemSkill
- log-triageSkill
- pr-review-tableSkill
- react-component-specSkill
- readme-writerSkill
- repo-polishSkill
- runbook-writerSkill
- security-reviewSkill
- spring-boot-endpointSkill
- test-plan-writerSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this skill when asked to scaffold a Django app, add a REST resource, implement a Django REST Framework endpoint, or generate a backend …
- Very specific: line 27
Read references/conventions.md and follow the current naming and import style.
- Distinctive: line 29
Create serializers that expose only intended fields and validate cross-field rules.
- Distinctive: line 31
Add router URLs and include them in the project URL configuration only when the existing configuration requires it.
- Distinctive: line 32
Add tests for valid requests, field validation, unauthorized access, object ownership, filtering, not-found behavior and pagination.
- Distinctive: line 34
Run Django system checks, migrations check and the test suite using repository-provided commands.
- Distinctive: line 45
Ask for the existing user model if the relationship target is not established.
- Distinctive: line 47
Do not expose internal or ownership fields in serializers by default.
- Distinctive: line 53
Do not omit object-level authorization.
- Distinctive: line 54
Do not create a second router convention in the same project.
- Distinctive: line 55
Do not claim a migration is valid without checking the model and migration history.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Generate a complete Django app slice with models, serializers, viewsets, URLs, permissions, tests and explicit migration commands.
When to use
Use this skill when asked to scaffold a Django app, add a REST resource, implement a Django REST Framework endpoint, or generate a backend module with migrations and tests.
Inputs needed
- App and resource names.
- Fields, types, validation and relationships.
- Authentication and object-level permission rules.
- Existing Django and Django REST Framework versions and project URL conventions.
Step-by-step procedure
- Inspect Django settings, installed apps, URL configuration, existing app patterns and migration history.
- Read
references/conventions.mdand follow the current naming and import style. - Define the model with explicit constraints, indexes, relationships and deletion behavior.
- Create serializers that expose only intended fields and validate cross-field rules.
- Implement viewsets with explicit queryset scoping and permission classes.
- Add router URLs and include them in the project URL configuration only when the existing configuration requires it.
- Add tests for valid requests, field validation, unauthorized access, object ownership, filtering, not-found behavior and pagination.
- State the exact migration generation and application commands in order.
- Run Django system checks, migrations check and the test suite using repository-provided commands.
- Return all files in full and record actual command results.
Exact output format
Return sections: Assumptions, File tree, Complete files, Migration commands, Tests and verification. Under Migration commands, show python manage.py makemigrations APP_NAME followed by python manage.py migrate using the supplied app name in place of APP_NAME, then any project-specific check command evidenced by the repository.
Edge cases
- Ask for the existing user model if the relationship target is not established.
- Specify
on_deletebehavior rather than using an unexplained default. - Do not expose internal or ownership fields in serializers by default.
- A migration must reflect the actual model state and must not be fabricated without the existing migration history.
Do not
- Do not omit object-level authorization.
- Do not create a second router convention in the same project.
- Do not claim a migration is valid without checking the model and migration history.
Worked example summary
A workshops app exposes published workshop records. The serializer rejects an end date before the start date, the viewset scopes writes to authenticated organizers, and tests cover filtering, ownership and invalid date ranges.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

