
Django security
Gives your agent Django security guidance for auth, CSRF, XSS, SQL injection
Django security is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 66
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Django security
This skill is a reference guide for hardening Django projects. It walks through production settings such as HTTPS enforcement, secure cookies, HSTS, secret key handling and password validators, then covers custom user models, password hashers and session configuration. Authorization patterns include model permissions, class-based view mixins, custom DRF permission classes and a simple role-based approach.
The remaining sections cover injection and output-escaping risks: safe ORM and raw() query usage, template escaping, careful use of mark_safe, CSRF handling for forms and AJAX, and csrf_exempt for webhooks. It also includes file upload validation using magic bytes, API throttling and authentication defaults, Content Security Policy middleware, environment-based secrets and security logging. The skill contains no scripts; it is made of code examples and a closing checklist.
Using it assumes a Django project, and some examples depend on third-party packages such as python-magic or filetype, djangorestframework, django-environ and django-csp-style settings. The examples are Python and HTML templates with JavaScript for the CSRF fetch sample.
When your agent uses it
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations. Use when reviewing Django authentication, authorization, input handling, or deployment settings.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (17 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the rea-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafathOr copy only this skill to ~/.claude/skills/django-security:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/django-security &&
cp -R "$tmp/.agents/skills/django-security" ~/.claude/skills/django-security &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/django-security inside it instead.
Copy the skill folder to ~/.agents/skills/django-security to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/django-security &&
cp -R "$tmp/.agents/skills/django-security" ~/.agents/skills/django-security &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/django-security inside it instead.
Copy the skill folder to ~/.cursor/skills/django-security to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/django-security &&
cp -R "$tmp/.agents/skills/django-security" ~/.cursor/skills/django-security &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/django-security inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/django-securityOr copy the folder to ~/.gemini/skills/django-security yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/django-security:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/django-security &&
cp -R "$tmp/.agents/skills/django-security" ~/.copilot/skills/django-security &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/django-security inside it instead.
Get the folder:
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.gitThen copy REA_Skill/.agents/skills/django-security into your agent's skills folder as django-security. Agents that support SKILL.md read one folder per skill.
What it does
- Production settings hardening
- Covers HTTPS redirects, secure cookies, HSTS, frame and content-type headers, and required secret keys.
- Authentication setup
- Shows custom user models, password hasher ordering, password validators and session lifetime options.
- Authorization patterns
- Explains model permissions, permission mixins, object-level checks and role-based access helpers.
- Injection and XSS defenses
- Demonstrates safe ORM queries, parameterized raw SQL, template escaping and safe HTML handling.
- CSRF and upload checks
- Describes CSRF usage for forms and AJAX and validates uploads by content type and size.
Good for
- Review a Django app's login and permission logic for weaknesses
- Check production settings before deploying a Django site
- Find unsafe raw SQL or unescaped template output in a codebase
- Add file upload validation to a Django model
- Set up CSRF handling for a JavaScript frontend calling Django views
Django security FAQ
What does Django security need to be installed?
It is a plain SKILL.md folder with no scripts. The examples rely on Django and some optional packages such as djangorestframework, python-magic or filetype, and django-environ, depending on the code you adopt.
Does Django security change my Django project automatically?
No. It gives the agent reference patterns and checklists to follow when a task matches, such as reviewing authentication or deployment settings.
When does the agent use Django security?
When the task involves reviewing Django authentication, authorization, input handling or deployment settings, as described in its SKILL.md.
Does Django security include scripts or automated checks?
No scripts are included. The guidance is delivered as code examples and a quick security checklist.
How do I install Django security in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/django-security to use it in all your projects, or to .claude/skills/django-security in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.
Does Django security run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Django security?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Django security?
The closest alternatives to Django security are Django patterns, Django access review, Security review, Spring security and Django TDD.
Where this comes from
- Description: from the skill's own SKILL.md.
More from smartworldarafath/REA_Skill

Guides building and auditing UI to WCAG 2.2 AA across web, iOS and Android
- Open source
- 66 GitHub stars
- Developer tools

Diagnoses agent and LLM stacks for hidden failures and ranks the fixes by severity
- Open source
- 66 GitHub stars
- Developer tools

Compare coding agents head-to-head on your own tasks by pass rate, cost and time
- Open source
- 66 GitHub stars
- Developer tools

Guides an agent to design tool sets, observations and error recovery for better completion
- Open source
- 66 GitHub stars
- Developer tools

Gives an agent a structured capture-diagnose-recover loop for failing runs
- Open source
- 66 GitHub stars
- Developer tools

Lets an AI agent make x402 payments within per-task budgets and spending policies
- Open source
- 66 GitHub stars
- Finance and payments



