django-security

django-security is a skill for Claude Code, Codex from Jamkris/everything-gemini-code. It costs 30 tokens per session (3,612 once invoked), scanned A, a copy of django-security, MIT.

A guide to securing Django applications, covering login permissions, request protection, data handling, and safe production settings.

In plain words
What is it for?
Use it to review authentication, authorization, CSRF and XSS protections, SQL injection defenses, cookies, HTTPS, and security headers.
Why use it?
It helps prevent common web vulnerabilities and reduces the risk of deploying insecure Django configurations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

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.

agentmods
npx agentmods add skills/jamkris/everything-gemini-code/django-security
Any agent
npx skills add Jamkris/everything-gemini-code --skill django-security
Clone the repo
git clone --depth 1 https://github.com/Jamkris/everything-gemini-code

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for django-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/django-security.svg)](https://agentmods.dev/skills/jamkris/everything-gemini-code/django-security)
Your own site
<a href="https://agentmods.dev/skills/jamkris/everything-gemini-code/django-security"><img src="https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/django-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.03612
Opus 5 $0.00015 $0.01806
Sonnet 5 $0.00006 $0.00722
Haiku 4.5 $0.00003 $0.00361

Measured 3d ago against content hash 9a9c29150b12, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

django-security 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 3d 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.

Origin

This is a copy

94% identical to django-security — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/django-security/SKILL.md · 593 lines

How it starts

The opening of the file, as written. The whole thing — 593 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Django Security Best Practices

Comprehensive security guidelines for Django applications to protect against common vulnerabilities.

When to Use

  • Setting up Django authentication and authorization
  • Implementing user permissions and roles
  • Configuring production security settings
  • Reviewing Django application for security issues
  • Deploying Django applications to production

Core Security Settings

Production Settings Configuration

# settings/production.py
import os

DEBUG = False  # CRITICAL: Never use True in production

ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '').split(',')

# Security headers
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_HSTS_SECONDS = 31536000  # 1 year
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_HSTS_PRELOAD = True
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
X_FRAME_OPTIONS = 'DENY'

# HTTPS and Cookies
SESSION_COOKIE_HTTPONLY = True
CSRF_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SAMESITE = 'Lax'

# Secret key (must be set via environment variable)
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
if not SECRET_KEY:
    raise ImproperlyConfigured('DJANGO_SECRET_KEY environment variable is required')

# Password validation
AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
        'OPTIONS': {
            'min_length': 12,
        }
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]

Authentication

Custom User Model

# apps/users/models.py
from django.contrib.auth.models import AbstractUser
from django.db import models

class User(AbstractUser):
    """Custom user model for better security."""

    email = models.EmailField(unique=True)
    phone = models.CharField(max_length=20, blank=True)

    USERNAME_FIELD = 'email'  # Use email as username
    REQUIRED_FIELDS = ['username']

    class Meta:
        db_table = 'users'
        verbose_name = 'User'
        verbose_name_plural = 'Users'

    def __str__(self):
        return self.email

# settings/base.py
AUTH_USER_MODEL = 'users.User'

Read the full file on GitHub · 593 lines

Changes

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.

  1. 3d ago First seen · 593 lines · 30 tokens per session scan A 9a9c29150b12

Subscribe to this mod's changes

django-security is a skill published in the GitHub repository Jamkris/everything-gemini-code (87 stars, last pushed 3mo ago), licensed MIT. It adds 30 tokens to every session and 3,612 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to django-security, differing in 11 lines, and is treated as a copy.

Related

Other skills, from other repositories

codeck

Route explicit requests from a host coding agent to one or more locally configured AI executors through Codeck, attach Markdown or other project files, moderate cross-model consultation, expose disagreements, and synthesize traceable results. Use when the user explicitly names Codeck or asks to consult, compare, or…

isdou/codeck · 108 tokens

scan

Scan your AI coding tool ecosystem — Gemini CLI, Claude Code, Antigravity (Desktop, CLI, IDE), Continue, Windsurf, JetBrains AI, OpenCode. Produces a maturity score, advisory recommendations, and optionally generates reusable SKILL.md files from your conversation patterns. Use when the user asks to audit their…

pauldatta/gemini-cli-scanner · 82 tokens

review-work

Post-implementation review orchestrator. Launches 5 parallel background sub-agents: Oracle (goal/constraint verification), Oracle (code quality), Oracle (security), unspecified-high (hands-on QA execution), unspecified-high (context mining from GitHub/git/Slack/Notion). All must pass for review to pass. MUST USE after…

daeryundf2-prog/LAZYANTIGRAVITY · 116 tokens

image-prompt

막연한 요청을 gpt-image-2(Codex $imagegen) 완성 프롬프트로 컴파일하는 스킬. 검증된 규칙 — 티어드 네거티브(기본 전부 긍정형+극소수 화이트리스트 2종), 앞 브래킷 금지·끝 AR 토큰만, 장비는 결과로 환원, HEX 명시, 1행=1컷, 사이즈락 6종, C1C12 플레이북, 화보 Format B(플랫 콤마형), 시네마틱 키아트(C11·그림자서사 shadownarrative), 프레젠테이션/슬라이드 덱(C12), 룩 프리셋 9종(홍대 인디 L9 포함), 홍보판촉물 그래픽 문법 P1P8(타이포-마스크·타이포-환경·오클루전·컬러블로킹 캠페인·메타…

daeryundf2-prog/LAZYANTIGRAVITY · 651 tokens

archify

Create polished, validated architecture, workflow, sequence, data-flow, and lifecycle/state diagrams as explorable standalone HTML with inline SVG, dark/light themes, optional trace motion, and PNG/JPEG/WebP/SVG/WebM export. Accept plain-language requirements or pasted Mermaid flowchart, sequenceDiagram, and…

daeryundf2-prog/LAZYANTIGRAVITY · 0 tokens

visual-qa

Rigorous visual QA for any UI you built or changed, across BOTH web/page UIs and TUI/terminal UIs. MUST USE after building or changing any UI to verify it visually before declaring it done. Captures objective reference evidence with a bundled diff script (image-diff for screenshots, tui-check for terminal captures)…

daeryundf2-prog/LAZYANTIGRAVITY · 212 tokens