dj-lint

Automates ruff linting, pyrefly typing checks, and Django code formatting fixes.

109|6|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/dvf/opinionated-django --skill dj-lint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dj-lint
Source: https://github.com/dvf/opinionated-django/tree/main/skills/dj-lint
Command: npx skills add https://github.com/dvf/opinionated-django --skill dj-lint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually running linting, formatting, and type checks on Django projects is time-consuming, and Django-specific typing quirks with tools like pyrefly often lead to confusing errors or unnecessary type ignore comments that hide real issues.

Core Features & Use Cases

  • Full Static Analysis Suite: Runs ruff linting, ruff formatting checks, and pyrefly static type analysis in one unified workflow.
  • Auto-Fix & Re-Verification: Automatically resolves all fixable issues and re-runs checks until the codebase is completely clean.
  • Django-Specific Guidance: Provides clear, actionable advice for common pyrefly Django edge cases like reverse relations and many-to-many manager typing, avoiding blanket type ignores.
  • Use Case: After making changes to a Django service or model, use this skill to validate code quality before committing, ensuring no lint, formatting, or type errors make it into your codebase.

Quick Start

Use the dj-lint skill to run the full static analysis suite on your Django project and fix all reported issues.

Frequently Asked Questions about dj-lint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Django linting, formatting, and type checking in one workflow?

You can automate Django linting, formatting, and type checking by running ruff and pyrefly together in a unified static analysis suite. This workflow automatically resolves fixable issues and re-runs checks until your codebase is completely clean.

Why does pyrefly throw confusing typing errors on Django reverse relations and many-to-many managers?

Pyrefly throws typing errors on Django reverse relations and many-to-many managers due to framework-specific typing quirks. Instead of using blanket type ignores, you can apply targeted guidance to resolve these specific edge cases correctly.

What is the best way to run static analysis on a Django project before committing?

The best way to run static analysis before committing is to validate code quality using an automated suite. This runs ruff linting, formatting checks, and pyrefly type analysis to ensure no errors make it into your codebase.

Can I use ruff to auto-fix linting and formatting issues and then re-verify the code?

Yes, you can use ruff to auto-fix linting and formatting issues. The workflow automatically resolves all fixable issues and re-runs the static analysis checks until the codebase is completely clean.

Does pyrefly work with Django models for static type checking?

Yes, pyrefly works with Django models for static type checking. It provides actionable advice for common Django edge cases like reverse relations and many-to-many manager typing to help you avoid unnecessary type ignore comments.