agentleFS
AaqibhafeezkhanAaqibhafeezkhan/skillself/skills/django-app-scaffold/SKILL.md

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.

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
  1. Distinctive:

    Use this skill when asked to scaffold a Django app, add a REST resource, implement a Django REST Framework endpoint, or generate a backend …

    line 13
  2. Very specific:

    Read references/conventions.md and follow the current naming and import style.

    line 27
  3. Distinctive:

    Create serializers that expose only intended fields and validate cross-field rules.

    line 29
  4. Distinctive:

    Add router URLs and include them in the project URL configuration only when the existing configuration requires it.

    line 31
  5. Distinctive:

    Add tests for valid requests, field validation, unauthorized access, object ownership, filtering, not-found behavior and pagination.

    line 32
  6. Distinctive:

    Run Django system checks, migrations check and the test suite using repository-provided commands.

    line 34
  7. Distinctive:

    Ask for the existing user model if the relationship target is not established.

    line 45
  8. Distinctive:

    Do not expose internal or ownership fields in serializers by default.

    line 47
  9. Distinctive:

    Do not omit object-level authorization.

    line 53
  10. Distinctive:

    Do not create a second router convention in the same project.

    line 54
  11. Distinctive:

    Do not claim a migration is valid without checking the model and migration history.

    line 55

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Inspect Django settings, installed apps, URL configuration, existing app patterns and migration history.
  2. Read references/conventions.md and follow the current naming and import style.
  3. Define the model with explicit constraints, indexes, relationships and deletion behavior.
  4. Create serializers that expose only intended fields and validate cross-field rules.
  5. Implement viewsets with explicit queryset scoping and permission classes.
  6. Add router URLs and include them in the project URL configuration only when the existing configuration requires it.
  7. Add tests for valid requests, field validation, unauthorized access, object ownership, filtering, not-found behavior and pagination.
  8. State the exact migration generation and application commands in order.
  9. Run Django system checks, migrations check and the test suite using repository-provided commands.
  10. 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_delete behavior 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.