Install
$ agentstack add skill-gnsubrahmanyam-agentic-skills-django ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Django Development Best Practices
Comprehensive performance and development optimization guide for Django applications, containing 60+ rules across 9 categories, prioritized by impact to guide automated development and code generation.
When to Apply
Reference these guidelines when:
- Building new Django applications or features
- Writing models, views, templates, or forms
- Implementing authentication and security
- Optimizing database queries and performance
- Setting up testing and deployment
- Reviewing Django code for best practices
- Customizing admin interfaces and URL configurations
- Implementing caching strategies and middleware
- Working with static files and media uploads
- Understanding Django signals and advanced patterns
Rule Categories by Priority
| Priority | Category | Impact | Prefix | | --- | --- | --- | --- | | 1 | Security & Authentication | CRITICAL | security- | | 2 | Database & Models | CRITICAL | db- | | 3 | Views & URLs | HIGH | views- | | 4 | Forms | HIGH | forms- | | 5 | Templates | MEDIUM-HIGH | templates- | | 6 | Authentication & Authorization | MEDIUM-HIGH | auth- | | 7 | APIs | MEDIUM-HIGH | api- | | 8 | URLs & Admin | MEDIUM-HIGH | urls- / admin- | | 9 | Email & Tasks | MEDIUM-HIGH | email- / background- | | 10 | Testing | MEDIUM-HIGH | testing- | | 11 | Performance & Caching | MEDIUM | perf- / caching- | | 12 | Deployment | MEDIUM | deploy- | | 13 | Advanced Patterns | LOW | advanced- |
Quick Reference
1. Security & Authentication (CRITICAL)
security-csrf-protection: Always enable CSRF protection for formssecurity-sql-injection: Use parameterized queries and ORM methodssecurity-xss-prevention: Escape user input in templatessecurity-https-only: Force HTTPS in productionsecurity-password-hashing: Use Django's password hashingsecurity-session-security: Secure session configurationsigning-cryptography: Secure data signing for integrity and tamper prevention
2. Database & Models (CRITICAL)
db-migration-safety: Never modify migrations manuallydb-indexes-strategy: Add indexes for frequently queried fieldsdb-foreign-key-protection: Use on_delete appropriatelydb-n-plus-one-queries: Use selectrelated and prefetchrelateddb-constraints-validation: Use model and database constraintsdb-transaction-management: Wrap related operations in transactions
3. Views & URLs (HIGH)
views-function-vs-class: Choose appropriate view typeviews-http-methods: Handle HTTP methods correctlyviews-error-handling: Implement proper error responsesviews-pagination: Use Django's pagination for large datasetsviews-caching-strategy: Implement appropriate caching layersviews-api-serialization: Use proper serialization for APIsexceptions-error-handling: Proper exception handling and error viewshttp-request-response: Handling HttpRequest and HttpResponse objects
4. Forms (HIGH)
forms-modelform-usage: Prefer ModelForm for model-backed formsforms-validation-logic: Implement custom validation methodsforms-security-cleaning: Always clean and validate form dataforms-error-display: Provide clear error messages to usersforms-file-handling: Handle file uploads securelyforms-formsets-usage: Use formsets for multiple related formsvalidators: Built-in and custom validators for data validation
5. Templates (MEDIUM-HIGH)
templates-inheritance-pattern: Use template inheritance for DRY templatestemplates-context-data: Keep templates simple, logic in viewstemplates-filters-security: Use safe filters carefullytemplates-static-files: Manage static files properlytemplates-internationalization: Implement i18n supporttemplates-performance: Minimize template rendering overhead
6. Authentication & Authorization (MEDIUM-HIGH)
auth-user-management: Implement secure user authenticationauth-permissions-groups: Use Django's permission systemauth-custom-user-model: Extend user model when neededauth-session-security: Secure session handlingauth-password-security: Password management best practicesauth-social-auth: Third-party authentication integration
7. URLs & Admin (MEDIUM-HIGH)
urls-configuration-patterns: Organize URL patterns effectivelyurls-reverse-urls: Use reverse() for URL generationurls-namespaces: Implement URL namespaces and app namesadmin-customization: Customize Django admin interfaceadmin-actions-filters: Add custom admin actions and filtersadmin-security: Secure admin interface access
6. Testing (MEDIUM-HIGH)
testing-unit-vs-integration: Write appropriate test typestesting-fixtures-usage: Use fixtures for test datatesting-mocking-strategy: Mock external dependenciestesting-coverage-goals: Maintain high test coveragetesting-django-testcase: Use Django's TestCase subclassestesting-factory-pattern: Use factories for complex test data
7. Performance (MEDIUM)
perf-query-optimization: Optimize database queriesperf-caching-strategy: Implement multiple caching layersperf-static-file-optimization: Optimize static file servingperf-database-indexing: Use appropriate database indexesperf-middleware-optimization: Order middleware efficientlyperf-async-support: Use async views where appropriateasync-views-tasks: Asynchronous operations and background tasksfiles-media-handling: File uploads and storage management
8. Deployment (MEDIUM)
deploy-environment-separation: Separate development and productiondeploy-secret-management: Securely manage secrets and keysdeploy-static-files-serving: Configure static file servingdeploy-database-configuration: Optimize database settingsdeploy-monitoring-setup: Implement logging and monitoringdeploy-backup-strategy: Implement data backup proceduressettings-management: Django settings configuration and environment variables
9. Advanced Patterns (LOW)
advanced-signals-usage: Use signals appropriatelyadvanced-middleware-custom: Implement custom middlewareadvanced-model-managers: Create custom model managersadvanced-generic-views: Extend generic views properlyadvanced-admin-customization: Customize admin interfaceadvanced-internationalization: Implement advanced i18n featuresmiddleware-basics: Middleware concepts and custom middleware creationunicode-text-handling: Encoding and text processing for international apps
How to Use
Read individual rule files for detailed explanations and code examples:
rules/security-csrf-protection.md
rules/db-migration-safety.md
rules/views-function-vs-class.md
rules/auth-user-management.md
rules/admin-customization.md
rules/caching-strategy.md
Each rule file contains:
- Impact level and category
- Problem description
- Solution with code examples
- Common mistakes to avoid
- When to apply the rule
Reference Documentation
Detailed guides for complex topics:
references/workflows.md # Development workflow patterns
references/middleware-signals.md # Middleware and signals implementation
references/deployment-static.md # Static files, media, and deployment
Full Compiled Document
For the complete Django best practices guide with all rules expanded: AGENTS.md
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: GNSubrahmanyam
- Source: GNSubrahmanyam/agentic-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.