django-security

django-security is a skill for Claude Code, Codex from sjarmak/coding-agent-workflows. It costs 30 tokens per session (3,673 once invoked), scanned A, a copy of django-security, MIT.

Security guidance for Django applications, covering login and permissions, request protection, injection attacks, unsafe browser content, and production settings.

In plain words
What is it for?
Use it to review authentication and authorization, configure secure deployment settings, and check defenses against CSRF, SQL injection, and XSS.
Why use it?
It helps prevent common vulnerabilities and configuration mistakes that could expose accounts, data, or application behavior.

Skill for Claude CodeCodex

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

Good fit Use it to review authentication and authorization, configure secure deployment settings, and check defenses against CSRF, SQL injection, and XSS.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sjarmak/coding-agent-workflows/django-security
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.

Any agent
npx skills add sjarmak/coding-agent-workflows --skill django-security
Clone the repo
git clone --depth 1 https://github.com/sjarmak/coding-agent-workflows

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/sjarmak/coding-agent-workflows/django-security/github.svg)](https://agentmods.dev/skills/sjarmak/coding-agent-workflows/django-security)
Your own site
<a href="https://agentmods.dev/skills/sjarmak/coding-agent-workflows/django-security"><img src="https://agentmods.dev/badge/skills/sjarmak/coding-agent-workflows/django-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for django-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/sjarmak/coding-agent-workflows/django-security"><img src="https://agentmods.dev/badge/skills/sjarmak/coding-agent-workflows/django-security.svg" alt="Reviewed on agentmods" width="80" 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,673 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% 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.03673
Opus 5.5 $0.00012 $0.01469
Sonnet 5.5 $0.00006 $0.00735
Haiku 4.5 $0.00003 $0.00367

Measured 1mo ago against content hash 613379efa0de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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

86% identical to django-security — 18 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.

source/skills/django-security/SKILL.md · 599 lines

How it starts

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

Django Security Best Practices

Use the project's installed version and conventions. Verify version-sensitive APIs, security settings, and deployment support with documentation-lookup before applying examples; these patterns are reference guidance, not a tested guarantee for every current release. Do not replace an existing toolchain solely to match an example.

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

When to Activate

  • 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',
    },
]

Read the full file on GitHub · 599 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. 1mo ago First seen · 599 lines · 30 tokens per session scan A 613379efa0de

Subscribe to this mod's changes

django-security is a skill published in the GitHub repository sjarmak/coding-agent-workflows (7 stars, last pushed 2d ago), licensed MIT. It adds 30 tokens to every session and 3,673 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to django-security, differing in 18 lines, and is treated as a copy.

Related

django-security compared with skills from other repositories

django-security next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
django-securitysjarmak/coding-agent-workflowsSkill72d agoMITA30Claude Code, Codex
reverse-engineer-anythingmxyhi/ok-skillsSkill5189d agoApache-2.0A83Claude Code, Codex
browser-tracemxyhi/ok-skillsSkill5189d agoApache-2.0A88Claude Code
planning-with-filesmxyhi/ok-skillsSkill5189d agoApache-2.0A117Claude Code
bopomofo-rescuemxyhi/ok-skillsSkill5189d agoApache-2.0A332Claude Code
ai-elementsmxyhi/ok-skillsSkill5189d agoApache-2.0A46Claude Code, Codex
exa-searchmxyhi/ok-skillsSkill5189d agoApache-2.0A33Claude Code, Codex