thebushidocollective avatar

Django Rest Framework

This one gives Claude the patterns for building Django REST Framework APIs with proper serializers, viewsets, and routing. You get examples for ModelSerializer configurations with custom fields and validation, nested serializers for complex relationships, and ViewSet implementations with custom actions like publish and recent endpoints. It covers permission classes like IsAuthorOrReadOnly, router setup with DefaultRouter, and practical stuff like handling base64 images and writable nested data. Useful when you're building RESTful APIs and want Claude to follow DRF conventions instead of writing everything from scratch. The examples show real world scenarios like prefetching relations and dynamic serializer selection.

skills.sh installs
263
GitHub stars
200
last updated
Aug 21, 2026

Install

$ npx -y skills add thebushidocollective/han --skill django-rest-framework --agent claude-code

Installs into .claude/skills of the current project.

Files

Django REST Framework

Master Django REST Framework for building robust, scalable RESTful APIs with proper serialization and authentication.

Serializers

Build type-safe data serialization with Django REST Framework serializers.

from rest_framework import serializers
from django.contrib.auth.models import User

class UserSerializer(serializers.ModelSerializer):
    post_count = serializers.IntegerField(read_only=True)
    full_name = serializers.SerializerMethodField()

    class Meta:
        model = User
        fields = ['id', 'email', 'name', 'post_count', 'full_name']
        read_only_fields = ['id', 'created_at']
        extra_kwargs = {
            'email': {'required': True},
            'password': {'write_only': True}
        }

    def get_full_name(self, obj):
        return f"{obj.first_name} {obj.last_name}"

class PostSerializer(serializers.ModelSerializer):
    author = UserSerializer(read_only=True)
    author_id = serializers.IntegerField(write_only=True)

    class Meta:
        model = Post
        fields = '__all__'

Sponsors

Details

Repository
github.com/thebushidocollective/han
Categories
Backend & APIs, Security, Python
First seen
Jun 3, 2026

More from thebushidocollective/han

All 14
1bobmatnyc avatarapi-security-reviewbobmatnyc/claude-mpm-skillsAPI security checklist for reviewing endpoints before deployment. Use when creating or modifying API routes to ensure proper authentication, authorization, and 257skills.sh installs
2davila7 avatarstring-databasedavila7/claude-code-templatesQuery STRING API for protein-protein interactions (59M proteins, 20B interactions). Network analysis, GO/KEGG enrichment, interaction discovery, 5000+ species, 255skills.sh installs
3davila7 avatarclinvar-databasedavila7/claude-code-templatesQuery NCBI ClinVar for variant clinical significance. Search by gene/position, interpret pathogenicity classifications, access via E-utilities API or FTP, annot254skills.sh installs
4cloudai-x avatarconvex-backendcloudai-x/claude-workflow-v2Convex backend development guidelines. Use when writing Convex functions, schemas, queries, mutations, actions, or any backend code in a Convex project. Trigger240skills.sh installs
5davila7 avatarbrenda-databasedavila7/claude-code-templatesAccess BRENDA enzyme database via SOAP API. Retrieve kinetic parameters (Km, kcat), reaction equations, organism data, and substrate-specific enzyme information222skills.sh installs
6davila7 avatarcosmic-databasedavila7/claude-code-templatesAccess COSMIC cancer mutation database. Query somatic mutations, Cancer Gene Census, mutational signatures, gene fusions, for cancer research and precision onco217skills.sh installs