dj-lint

dj-lint is a skill for Claude Code from dvf/opinionated-django. It costs 58 tokens per session (459 once invoked), scanned A, original, MIT.

A procedure for running Ruff and Pyrefly on a Django project. Ruff checks Python style and code issues, while Pyrefly checks types, meaning the kinds of values code uses.

In plain words
What is it for?
Use it after Django code changes, before committing, or whenever the project needs linting, formatting checks, or static type checking.
Why use it?
It catches formatting, lint, and type problems before code is committed or released.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it after Django code changes, before committing, or whenever the project needs linting, formatting checks, or static type checking.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dvf/opinionated-django/dj-lint
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 dvf/opinionated-django --skill dj-lint
Clone the repo
git clone --depth 1 https://github.com/dvf/opinionated-django

Made for: Claude Code.

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 dj-lint

README.md
[![agentmods](https://agentmods.dev/badge/skills/dvf/opinionated-django/dj-lint/github.svg)](https://agentmods.dev/skills/dvf/opinionated-django/dj-lint)
Your own site
<a href="https://agentmods.dev/skills/dvf/opinionated-django/dj-lint"><img src="https://agentmods.dev/badge/skills/dvf/opinionated-django/dj-lint/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 dj-lint

Your own site · 80×15
<a href="https://agentmods.dev/skills/dvf/opinionated-django/dj-lint"><img src="https://agentmods.dev/badge/skills/dvf/opinionated-django/dj-lint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 459 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00058 $0.00459
Opus 5 $0.00029 $0.00230
Sonnet 5 $0.00012 $0.00092
Haiku 4.5 $0.00006 $0.00046

Measured 10d ago against content hash 53dac938acb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

dj-lint 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 10d 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.

skills/dj-lint/SKILL.md · 26 lines

What it actually says

Lint and Type-Check

Run the full static-analysis suite on the project and fix any issues found.

  1. uv run ruff check src — lint the code
  2. uv run ruff format --check src — verify formatting
  3. uv run pyrefly check src — static type analysis

Fix every issue reported (re-run until clean) and report a short summary of what changed when done. If a failure is not auto-fixable, explain what needs human judgement rather than silencing it.

Pyrefly + Django gotchas

Pyrefly has built-in Django support (via django-stubs), but a few things aren't covered yet. Recognize these before reaching for # type: ignore:

  • Reverse relations (user.order_set, author.article_set) are not supported. This is a known pyrefly limitation, not a real bug. The right fix is to query the child model directly from its repository (OrderRepository().list_for_user(user_id)) — push the access down into the repo layer rather than suppressing it. Only if that's impossible, narrow it with # type: ignore[attr-defined] at a single call site.
  • ManyRelatedManager is generic over [Parent, Model], not the concrete child. Don't rely on pyrefly to catch a mistyped M2M target — cover it with a test instead.
  • Chained QuerySet methods beyond .all() are thinly typed. Keep chains inside the repository where the return type is an annotated list[SomeDTO]; don't let querysets leak out into services.

See pyrefly.org/en/docs/django for the current support matrix. Pyrefly's Django support is actively evolving — re-check when upgrading.

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. 10d ago First seen · 26 lines · 58 tokens per session scan A 53dac938acb7

Subscribe to this mod's changes

dj-lint is a skill published in the GitHub repository dvf/opinionated-django (110 stars, last pushed 27d ago), licensed MIT. It adds 58 tokens to every session and 459 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

python-code-quality

Code quality checks, linting, formatting, and type checking commands for the Agent Framework Python codebase. Use this when running checks, fixing lint errors, or troubleshooting CI failures.

microsoft/agent-framework · 40 tokens

plugin-architecture-patterns

Design, implement, or diagnose Xberg plugin traits, typed registries, priority collisions, lifecycle, native extractors, and Alef-generated Python plugin bridges. Load for plugin-system work, not ordinary extractor parsing.

xberg-io/xberg · 49 tokens

test-corpus

The testdocuments submodule is a bucket-fetched fixture corpus that is not committed. This skill covers readtestfixture, missing fixtures, valid A/B controls, and submodule push order. Load before running Rust tests on a fresh clone, setting up an A/B control, adding a fixture-backed test, or diagnosing…

xberg-io/xberg · 72 tokens

idapython

IDA Pro Python scripting for reverse engineering. Use when writing IDAPython scripts, analyzing binaries, working with IDA's API for disassembly, decompilation (Hex-Rays), type systems, cross-references, functions, segments, or any IDA database manipulation. Covers ida modules (50+), idautils iterators, and common…

mrexodia/ida-pro-mcp · 77 tokens

stack-trace-python-probe

Internal helper for meta-stack-trace-investigator. Use when a Python traceback needs Python-specific root-cause checks, pytest reproducer guidance, and defensive patch targets.

opensquilla/opensquilla · 40 tokens

python-debug-execution-911f17

Debug Python script execution failures by capturing full tracebacks and verifying working directory.

HKUDS/OpenSpace · 23 tokens