security-first-validator

security-first-validator is a skill for Claude Code from smicolon/ai-kit. It costs 56 tokens per session (2,585 once invoked), scanned A, original, MIT.

A security checklist for building Django REST Framework web APIs, which let applications exchange data over the web.

In plain words
What is it for?
Use it when creating an API endpoint, view, viewset, or serializer in Django REST Framework, including authentication, permissions, and rate-limit requirements.
Why use it?
It helps prevent endpoints and related code from being added without required access checks and protections.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the django plugin — 8 skills shipped together

Good fit Use it when creating an API endpoint, view, viewset, or serializer in Django REST Framework, including authentication, permissions, and rate-limit requirements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smicolon/ai-kit/security-first-validator
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 smicolon/ai-kit --skill security-first-validator
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

Or install django, the plugin that ships this one along with the rest of its 8 skills.

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 security-first-validator

README.md
[![agentmods](https://agentmods.dev/badge/skills/smicolon/ai-kit/security-first-validator/github.svg)](https://agentmods.dev/skills/smicolon/ai-kit/security-first-validator)
Your own site
<a href="https://agentmods.dev/skills/smicolon/ai-kit/security-first-validator"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/security-first-validator/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 security-first-validator

Your own site · 80×15
<a href="https://agentmods.dev/skills/smicolon/ai-kit/security-first-validator"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/security-first-validator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,585 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.00056 $0.02585
Opus 5.5 $0.00022 $0.01034
Sonnet 5.5 $0.00011 $0.00517
Haiku 4.5 $0.00006 $0.00259

Measured 1mo ago against content hash 670f9e285dfc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-first-validator 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 1mo 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.

packs/django/skills/security-first-validator/SKILL.md · 436 lines

How it starts

The opening of the file, as written. The whole thing — 436 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security-First Validator

Enforces security requirements for all Django REST Framework API endpoints.

Activation Triggers

This skill activates when:

  • Creating API views or viewsets
  • Creating serializers
  • Mentioning "endpoint", "API", "view", "route"
  • Writing DRF classes (APIView, ViewSet, Serializer)
  • Creating URL patterns for APIs
  • Discussing authentication or permissions

Security Requirements (MANDATORY)

Every API endpoint MUST have:

1. Permission Classes (REQUIRED)

from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticated

class UserViewSet(viewsets.ModelViewSet):
    permission_classes = [IsAuthenticated]  # ✅ REQUIRED
    # ...

2. Serializer Validation (REQUIRED)

from rest_framework import serializers

class UserSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = ['id', 'email', 'first_name']
        # NO sensitive fields exposed ✅

    def validate_email(self, value):
        # Custom validation ✅
        if not value.endswith('@company.com'):
            raise serializers.ValidationError("Must use company email")
        return value

3. No Raw SQL (REQUIRED)

# ❌ DANGEROUS
User.objects.raw(f"SELECT * FROM users WHERE id = {user_id}")

# ✅ SAFE
User.objects.filter(id=user_id)

4. Rate Limiting (REQUIRED for sensitive endpoints)

from rest_framework.throttling import UserRateThrottle

class LoginView(APIView):
    throttle_classes = [UserRateThrottle]  # ✅ REQUIRED for auth
    # ...

Validation Process

Step 1: Detect New API Endpoint

When API code is being written:

class UserViewSet(viewsets.ModelViewSet):
    queryset = User.objects.all()
    serializer_class = UserSerializer
    # Missing security! ❌

Step 2: Run Security Checklist

Verify:

  1. ✅ Permission classes defined
  2. ✅ Serializer has proper validation
  3. ✅ No raw SQL queries
  4. ✅ Rate limiting on sensitive endpoints
  5. ✅ No password/token fields in serializer
  6. ✅ Proper CORS configuration

Read the full file on GitHub · 436 lines

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. 1mo ago First seen · 436 lines · 56 tokens per session scan A 670f9e285dfc

Subscribe to this mod's changes

security-first-validator is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 2,585 once invoked, about $0.0002 per session on Opus 5.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-31.