Skip to content
Back to skills

Project Api Patterns

ASecurity

Use when adding or changing Django REST Framework serializers, viewsets, nested routes, schema docs, or project-scoped endpoints in core/api.py, core/api_urls.py, or core/serializers.py. Trigger phrases include project API, nested route, DRF viewset, serializer validation, project_id endpoint, and drf-spectacular docs.

  • 30 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 8, 2026
ai-agentsgodjangoapifrontend

Works with

  • api

Security analysis

A100/100

Scanned November 8, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill project-api-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Project Api Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Project Api Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-project-api-patterns/badge)](https://www.skillsdirectory.com/skills/majiayu000-project-api-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: project-api-patterns
description: "Use when adding or changing Django REST Framework serializers, viewsets, nested routes, schema docs, or project-scoped endpoints in core/api.py, core/api_urls.py, or core/serializers.py. Trigger phrases include project API, nested route, DRF viewset, serializer validation, project_id endpoint, and drf-spectacular docs."
---

# Project API Patterns Skill

Use this skill when changing the project-scoped REST API.

## Rules

- Treat `Project` as the isolation boundary.
- Top-level project resources live on the base router; most other resources are nested under `/api/v1/projects/{project_id}/...`.
- Reuse `ProjectOwnedQuerysetMixin` in `core/api.py` for nested resources.
- Pass `project` through serializer context and enforce cross-project relationship validation in serializers.
- Keep API field names in `snake_case` to match current serializers and frontend types.
- Update drf-spectacular metadata in `core/api.py` when the endpoint contract changes.

## Implementation Guidance

- Add or update serializers in `core/serializers.py`.
- Add or update viewsets and schema decorators in `core/api.py`.
- Register routes in `core/api_urls.py` using the existing nested router pattern.
- If the frontend consumes the API, update `frontend/src/lib/types.ts` and `frontend/src/lib/api.ts`.
- Add or update focused tests near the changed behavior, usually under `core/tests/`.

## References

- `core/api.py`
- `core/api_urls.py`
- `core/serializers.py`
- `frontend/src/lib/types.ts`
- `frontend/src/lib/api.ts`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.