Agent skill

Django Idioms

by irahardianto in irahardianto/awesome-agv

Django and Django REST Framework (DRF) patterns: ORM queries, model managers, class-based views, serializers, migrations, and pytest-django testing.

MITAuto-check passedBackend & APIs

Install Django Idioms

skills CLI
$ npx skills add irahardianto/awesome-agv --skill django-idioms -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install irahardianto/awesome-agv django-idioms --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/django-idioms .claude/skills/django-idioms && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
django-idioms
GitHub stars
156
Token cost
~786 tokens
SKILL.md length
202 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Django and Django REST Framework (DRF) patterns: ORM queries, model managers, class-based views, serializers, migrations, and pytest-django testing.

  • Works in 3 steps: Fat models, thin views — business logic… → Custom managers for common queries → Meta class for ordering, constraints,…
  • Maintaining Django backend applications
  • Calls ruff and mypy
  • Tasks that involve Backend development

What it does

Django Idioms is an agent skill from irahardianto/awesome-agv. Django and Django REST Framework (DRF) patterns: ORM queries, model managers, class-based views, serializers, migrations, and pytest-django testing. Use when building or maintaining Django backend applications. Pair with python-idioms.

Its SKILL.md is about 790 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Backend development, ORMs and data access and Unit testing. It works with Django, Python, pytest and Ruff. The repository describes itself as: Comprehensive sets of standards and practices designed to elevate the capabilities of AI coding agents. The licence is MIT.

When your agent uses it

  • Maintaining Django backend applications
  • Tasks that involve Backend development
  • Tasks that involve ORMs and data access

Example prompts

  • “/django-idioms”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Fat models, thin views — business logic in models/managers, not views.
  2. Custom managers for common queries
  3. Meta class for ordering, constraints, indexes.

What it can do on your machine

Read from SKILL.md and the folder at commit 9e997ba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ruff
    • mypy

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Django Idioms loads about 786 tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 202 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~786

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from irahardianto/awesome-agv at commit 9e997ba, republished under its MIT licence (© irahardianto). 202 words, ~786 tokens.

Download SKILL.mdSave it as .claude/skills/django-idioms/SKILL.md (or your agent's skills folder).
name
django-idioms
description
Django and Django REST Framework (DRF) patterns: ORM queries, model managers, class-based views, serializers, migrations, and pytest-django testing. Use when building or maintaining Django backend applications. Pair with python-idioms.

Django Idioms and Patterns

Django rewards convention, the ORM, and "batteries included" design. Idiomatic Django = DRY, model-centric, well-tested.

Scope: Django-specific patterns. For Python: @.agents/skills/python-idioms/SKILL.md.

Models
  1. Fat models, thin views — business logic in models/managers, not views.

  2. Custom managers for common queries:

    python
    class TaskManager(models.Manager):
        def active(self):
            return self.filter(status='active')
    
    class Task(models.Model):
        objects = TaskManager()
  3. Meta class for ordering, constraints, indexes.

Views
  1. Class-based views for CRUD, function-based for simple/custom:

    python
    class TaskListView(LoginRequiredMixin, ListView):
        model = Task
        queryset = Task.objects.active()
        paginate_by = 25
  2. DRF serializers for API boundaries:

    python
    class TaskSerializer(serializers.ModelSerializer):
        class Meta:
            model = Task
            fields = ['id', 'title', 'priority', 'created_at']
            read_only_fields = ['id', 'created_at']
ORM
  1. select_related/prefetch_related to avoid N+1 queries.
  2. F() and Q() expressions for complex queries.
  3. Never raw SQL unless ORM can't express it (and then use parameterized queries).
Migrations
  1. One migration per logical change. Squash when history grows.
  2. Data migrations in separate migration files from schema changes.
  3. RunPython with reverse_code for reversibility.
Testing

For universal testing principles, see .agents/rules/testing-strategy.md. Below: language-specific patterns only.

  1. pytest-django over unittest.TestCase:

    python
    @pytest.mark.django_db
    def test_create_task():
        task = Task.objects.create(title='Test', priority='high')
        assert task.title == 'Test'
  2. Factory Boy for test data (not fixtures).

Formatting and Static Analysis
ToolPurposeCommand
ruffFormatting + lintingruff format . && ruff check .
mypy + django-stubsType checkingmypy .
banditSecuritybandit -r .
  • Code Idioms and Conventions @.agents/rules/code-idioms-and-conventions.md
  • Python Idioms @.agents/skills/python-idioms/SKILL.md
  • Security Principles @.agents/rules/security-principles.md
  • Architectural Patterns @.agents/rules/architectural-pattern.md
  • Database Design Principles @.agents/rules/database-design-principles.md
  • Error Handling Principles @.agents/rules/error-handling-principles.md
  • Testing Strategy @.agents/rules/testing-strategy.md
  • Logging and Observability Mandate @.agents/rules/logging-and-observability-mandate.md
  • Logging and Observability Principles @.agents/skills/logging-implementation/SKILL.md

© irahardianto, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/django-idioms of irahardianto/awesome-agv.

Open the folder on GitHubat commit 9e997ba

Compare with similar skills

Django Idioms next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Django Idioms compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Django Idioms this skillirahardianto/awesome-agv156—~786Automated safety check: PassMIT
Python Rulessoftspark/ai-toolkit179—~2.9kAutomated safety check: PassApache-2.0
Run And Verifyaropan/clist439—~461Automated safety check: PassApache-2.0
Python Devdoccker/cc-use-exp1.1k—~790Automated safety check: PassCustom licence
Pythonericrisco/rsc-harness180—~3.8kAutomated safety check: PassMIT
PythonMadAppGang/claude-code285—~2.8kAutomated safety check: NotesMIT

Similar skills

  • Python Rules

    softspark/ai-toolkit

    Python coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~2.9k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Run And Verify

    aropan/clist

    Choose and run focused checks after changing CLIST Python code: Django tests, standalone pytest tests, offline parser fixtures, Ruff, or a relevant management-command check.

    439 GitHub stars~461 tokensUpdated 6 days ago
    Backend & APIsAuto-check passed
  • Python Dev

    doccker/cc-use-exp

    Python 开发规范。当用户操作 .py、pyproject.toml、requirements.txt、setup.py 文件, 或涉及 FastAPI、Django、Flask、pytest、asyncio 开发时触发。

    1.1k GitHub stars~790 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Python

    ericrisco/rsc-harness

    A skill your agent uses when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms…

    180 GitHub stars~3.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Python

    MadAppGang/claude-code

    A skill your agent uses when building FastAPI applications, implementing async endpoints, setting up Pydantic schemas, working with SQLAlchemy, or writing pytest tests for Python backend services.

    285 GitHub stars~2.8k tokensUpdated 7 mo ago
    Backend & APIsAuto-check: notes
  • Mastering Python Skill

    SpillwaveSolutions/agent-brain

    Modern Python coaching covering language foundations through advanced production patterns.

    119 GitHub stars~1.4k tokensUpdated 21 days ago
    DevelopmentAuto-check: notes

More from irahardianto/awesome-agv

All 34 skills in this repo
  • Distinctive Frontend Design Builder

    irahardianto/awesome-agv

    Commits to one bold aesthetic direction, sets up a CSS token system for it, then builds the interface in Vue or plain HTML using those tokens.

    156 GitHub stars~2.4k tokensUpdated 6 days ago
    Auto-check passed
  • Perf Optimization

    irahardianto/awesome-agv

    Profile-driven performance optimization protocol. An agent skill from irahardianto/awesome-agv.

    156 GitHub stars~4.3k tokensUpdated 6 days ago
    Auto-check passed
  • Angular Idioms and Patterns

    irahardianto/awesome-agv

    Coding conventions for Angular 19 and later: standalone components, signals, OnPush change detection, lazy routes and where RxJS still belongs.

    156 GitHub stars~3.8k tokensUpdated 6 days ago
    Auto-check passed
  • CI/CD Pipeline Principles

    irahardianto/awesome-agv

    Rules for designing CI/CD pipelines in layers: universal lint, test and scan stages, container builds with SBOM attestation, and GitOps for orchestrated deployments.

    156 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check: notes
  • Hono Idioms

    irahardianto/awesome-agv

    Hono lightweight web framework patterns: type-safe route handlers, middleware composition, Zod validation, and RPC clients for Cloudflare Workers, Node, or Bun.

    156 GitHub stars~3k tokensUpdated 6 days ago
    Auto-check passed
  • Mobile Testing

    irahardianto/awesome-agv

    Mobile E2E testing patterns — Flutter integrationtest, Patrol, Maestro, golden testing, device matrix, and test data management.

    156 GitHub stars~1.8k tokensUpdated 6 days ago
    Auto-check: notes

Categories

Questions about Django Idioms

What does Django Idioms do?

Django and Django REST Framework (DRF) patterns: ORM queries, model managers, class-based views, serializers, migrations, and pytest-django testing. Django Idioms is an agent skill from irahardianto/awesome-agv. Django and Django REST Framework (DRF) patterns: ORM queries, model managers, class-based views, serializers, migrations, and pytest-django testing.

When should I use Django Idioms?

Django Idioms fits situations like: maintaining Django backend applications; tasks that involve Backend development; tasks that involve ORMs and data access.

How do I install Django Idioms in Claude Code?

Run `npx skills add irahardianto/awesome-agv --skill django-idioms -a claude-code`. Or copy the skill folder (.agents/skills/django-idioms in irahardianto/awesome-agv) into .claude/skills/django-idioms in your project. Claude Code loads it when a task matches its description.

How do I install Django Idioms in Codex?

Run `npx skills add irahardianto/awesome-agv --skill django-idioms -a codex`. Or copy the skill folder (.agents/skills/django-idioms in irahardianto/awesome-agv) into .agents/skills/django-idioms in your project. Codex loads it when a task matches its description.

Can I use Django Idioms in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add irahardianto/awesome-agv --skill django-idioms -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/django-idioms, .gemini/skills/django-idioms, .github/skills/django-idioms and .opencode/skills/django-idioms in your project.

What does Django Idioms need to run?

Going by SKILL.md and its folder, Django Idioms needs the command-line tools its instructions call (ruff and mypy). Our summary lists: Python 3.

Does Django Idioms access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Django Idioms safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Django Idioms use?

Django Idioms is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Django Idioms use?

About 786 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Django Idioms?

Skills that share tags, products or a category with Django Idioms: Python Rules (softspark/ai-toolkit, 179 stars), Run And Verify (aropan/clist, 439 stars), Python Dev (doccker/cc-use-exp, 1.1k stars) and Python (ericrisco/rsc-harness, 180 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Django Idioms?

irahardianto (a GitHub user) maintains it in irahardianto/awesome-agv, which has 156 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 5, 2026.

Source: irahardianto/awesome-agv on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.