Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

improving-drf-endpoints

Skill by PostHog

Improving DRF Endpoints is a skill for auditing and editing Django REST Framework viewsets and serializers in PostHog. It helps keep the OpenAPI spec, generated TypeScript types and MCP tools accurate.

  • Score 84
  • 41k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install improving-drf-endpoints

Built from the published package, never by AI.

git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/.agents/skills/improving-drf-endpoints ~/.claude/skills/improving-drf-endpoints

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install improving-drf-endpoints in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill gives an AI assistant a checklist for DRF viewsets and serializers in the PostHog codebase. It explains that serializer fields feed drf-spectacular, then OpenAPI JSON, Orval, Zod schemas and MCP tools. The checklist covers field typing, help_text, ChoiceField choices, enum naming, @extend_schema and @validated_request usage, and pagination.

It is meant for developers and reviewers who edit or audit files under posthog/api/, products/*/backend/api/ and products/*/backend/presentation/, or any file importing rest_framework. It starts with a triage step that checks the committed generated types before editing Python. Reference files cover serializer fields, viewset annotations, URL routing and common anti-patterns.

Written from the project's SKILL.md and checked against it.

What it can do

  • Serializer field auditChecks help_text, typed ListField and DictField children, JSONField typing and explicit ChoiceField choices.
  • Viewset annotation checksConfirms custom actions and plain ViewSet methods have schema annotations such as @extend_schema or @validated_request.
  • Enum naming guidanceExplains how class-backed choices avoid OpenAPI enum name collisions in generated types.
  • Triage of generated outputPoints to api.schemas.ts and api.ts files to find unknown types and missing operations before editing Python.
  • URL routing guidanceExplains where to register new team-nested endpoints under routers.projects in product routes.py files.
  • Facade product guidanceCovers DataclassSerializer endpoints that wrap frozen dataclasses from contracts.py.

What you need

  • A PostHog repository checkout
  • Python with the Django and Django REST Framework codebase
  • The hogli build:openapi command to regenerate the OpenAPI spec

Try asking

  • Audit this PostHog serializer for missing help_text and untyped fields
  • Check this viewset for missing @extend_schema annotations
  • Review my DRF endpoint changes before I open a PostHog pull request

Good to know

  • Written for PostHog's codebase, file layout and tooling.
  • Relies on hogli build:openapi to verify generated MCP tool schemas.
  • Does not run checks itself. It guides review and edits.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/improving-drf-endpoints/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md13 KB
  • references/common-anti-patterns.md7 KB
  • references/quick-reference-table.md4 KB
  • references/serializer-fields.md6 KB
  • references/viewset-annotations.md9 KB

Alternatives to improving-drf-endpoints

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

improving-drf-endpoints: common questions

What does improving-drf-endpoints check in PostHog?

It checks serializer fields, viewset annotations and OpenAPI spec quality in DRF code. The source says these choices flow into generated TypeScript types and MCP tools.

Which files does this skill apply to?

It applies to files in posthog/api/, products/*/backend/api/, products/*/backend/presentation/, or any file importing rest_framework.

Why does a missing help_text matter?

The source says a missing help_text means an agent is guessing at parameters, since help_text flows into generated types and descriptions.

How do I install improving-drf-endpoints?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is improving-drf-endpoints free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is improving-drf-endpoints safe to use?

It scores 84 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to improving-drf-endpoints?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

improving-drf-endpoints Install

Add to stack

Loading.