Official agent skill

Improving Drf Endpoints

by PostHog in PostHog/posthog

A skill your agent uses when editing, reviewing, or auditing DRF viewsets and serializers in PostHog.

OfficialCustom licenceAuto-check passedBackend & APIs

Install Improving Drf Endpoints

skills CLI
$ npx skills add PostHog/posthog --skill improving-drf-endpoints -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PostHog/posthog improving-drf-endpoints --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PostHog/posthog.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/improving-drf-endpoints .claude/skills/improving-drf-endpoints && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
improving-drf-endpoints
GitHub stars
40k
Token cost
~2.9k tokens
SKILL.md length
1,131 words
Files
5 (incl. references)
Skills in repo
252
Repo updated
First seen
Licence
Custom licence

At a glance

A skill your agent uses when editing, reviewing, or auditing DRF viewsets and serializers in PostHog.

  • Works in 8 steps: Every field has help_text — describes… → No bare ListField() or DictField() —… → No bare JSONField() — create a custom… → …
  • Auditing DRF viewsets and serializers in PostHog
  • SKILL.md covers Overview, When to use, Audit checklist and Decision flowchart, plus 3 more sections
  • Calls python

What it does

Improving Drf Endpoints is an agent skill from PostHog/posthog, published by the product's own GitHub organization. Use when editing, reviewing, or auditing DRF viewsets and serializers in PostHog. Triggers on files in posthog/api/, products//backend/api/, products//backend/presentation/, or any file importing restframework. Covers field typing, schema annotations, enum collision fixes, and OpenAPI spec quality — everything that flows downstream into generated TypeScript types and MCP tools.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/common-anti-patterns.md`, `references/quick-reference-table.md` and `references/serializer-fields.md`).

It sits in Backend & APIs, covering OpenAPI specifications, Type safety and MCP servers. It works with PostHog and OpenAPI. The repository describes itself as: :hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error…

When your agent uses it

  • Auditing DRF viewsets and serializers in PostHog
  • Files in posthog/api/
  • Products//backend/api/
  • Products//backend/presentation/

Example prompts

  • “/improving-drf-endpoints”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Every field has help_text — describes purpose, format, constraints, valid values
  2. No bare ListField() or DictField() — always specify child= with a typed serializer or field
  3. No bare JSONField() — create a custom field class with @extend_schema_field(TypedSchema)
  4. SerializerMethodField has @extend_schema_field on its get_* method
  5. ChoiceField has explicit choices= with all valid values listed
  6. Define choices as a class — models.TextChoices in a product's internal modules, LabeledStrEnum or LabeledIntEnum from posthog/enums.py in…
  7. Read vs write serializers are separate when input shape differs from output
  8. Every success response is backed by a serializer — returning raw dicts or untyped lists means no generated types downstream

What it can do on your machine

Read from SKILL.md and the folder at commit 10f9ad7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Improving Drf Endpoints loads about 2.9k tokens when it runs, and up to ~9.4k if it reads all its reference files. Until then it costs about 102 tokens; SKILL.md has 1,131 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,131 words (~2,903 tokens).

“Before you propose a contract test against the generated OpenAPI schema, check things already tried. Six PRs took that idea, and none merged.”

— opening of SKILL.md by PostHog, Custom licence
name
improving-drf-endpoints

Read the full SKILL.md on GitHub

Files

SKILL.md and 4 other files (references) in .agents/skills/improving-drf-endpoints of PostHog/posthog.

  • SKILL.md
  • references/common-anti-patterns.md
  • references/quick-reference-table.md
  • references/serializer-fields.md
  • references/viewset-annotations.md

Open the folder on GitHubat commit 10f9ad7

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in PostHog/posthog, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Improving Drf Endpoints next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Improving Drf Endpoints compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Improving Drf Endpoints this skillPostHog/posthog40k—~2.9kAutomated safety check: PassCustom licence
Land TS MonoUKGovernmentBEIS/inspect_ai3k—~3kAutomated safety check: PassMIT
Kingdee MCP DevWaHaiLong/KingdeeMCP103—~853Automated safety check: PassMIT
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Zodjasonjgardner/blockbench-mcp-plugin4913 repos~1.4kAutomated safety check: PassGPL-3.0
API Endpoint Contracttrycompai/comp2k—~2.7kAutomated safety check: PassAGPL-3.0

Similar skills

  • Land TS Mono

    UKGovernmentBEIS/inspect_ai

    Land a PR that requires a coordinated ts-mono submodule change.

    3k GitHub stars~3k tokensUpdated today
    Backend & APIsAuto-check passed
  • Kingdee MCP Dev

    WaHaiLong/KingdeeMCP

    Knowledge base for the Kingdee MCP Dev Squad. An agent skill from WaHaiLong/KingdeeMCP.

    103 GitHub stars~853 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Zod

    jasonjgardner/blockbench-mcp-plugin

    Zod schema validation best practices for type safety, parsing, and error handling.

    491 GitHub starsUsed in 3 repos~1.4k tokens
    DevelopmentAuto-check passed
  • API Endpoint Contract

    trycompai/comp

    The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.

    2k GitHub stars~2.7k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Archestra Dev Backend

    archestra-ai/archestra

    A skill your agent uses when adding or changing Archestra backend routes, models, services, API request/response schemas, endpoint permissions, or OpenAPI/codegen for the generated API client.

    4.4k GitHub stars~1.5k tokensUpdated today
    Backend & APIsAuto-check passed

More from PostHog/posthog

All 252 skills in this repo
  • Authoring Log Alerts

    PostHog/posthog

    Official

    Author useful, low-noise log alerts on services in a PostHog project.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Official

    Operating procedure for the conflict-autoresolver agent: sweep open PostHog/posthog PRs that conflict with master, resolve the trivial conflicts (generated artifacts deterministically, source…

    40k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM).

    40k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Exploring Apm Traces

    PostHog/posthog

    Official

    Investigates distributed application performance using PostHog APM (OpenTelemetry span) data via MCP.

    40k GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Exploring LLM Traces

    PostHog/posthog

    Official

    Debug and inspect LLM/AI agent traces using PostHog's MCP tools.

    40k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Investigate Metric

    PostHog/posthog

    Official

    Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.

    40k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Questions about Improving Drf Endpoints

What does Improving Drf Endpoints do?

A skill your agent uses when editing, reviewing, or auditing DRF viewsets and serializers in PostHog. Improving Drf Endpoints is an agent skill from PostHog/posthog, published by the product's own GitHub organization. Use when editing, reviewing, or auditing DRF viewsets and serializers in PostHog.

When should I use Improving Drf Endpoints?

Improving Drf Endpoints fits situations like: auditing DRF viewsets and serializers in PostHog; files in posthog/api/; products//backend/api/; products//backend/presentation/.

How do I install Improving Drf Endpoints in Claude Code?

Run `npx skills add PostHog/posthog --skill improving-drf-endpoints -a claude-code`. Or copy the skill folder (.agents/skills/improving-drf-endpoints in PostHog/posthog) into .claude/skills/improving-drf-endpoints in your project. Claude Code loads it when a task matches its description.

How do I install Improving Drf Endpoints in Codex?

Run `npx skills add PostHog/posthog --skill improving-drf-endpoints -a codex`. Or copy the skill folder (.agents/skills/improving-drf-endpoints in PostHog/posthog) into .agents/skills/improving-drf-endpoints in your project. Codex loads it when a task matches its description.

Can I use Improving Drf Endpoints in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/posthog --skill improving-drf-endpoints -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/improving-drf-endpoints, .gemini/skills/improving-drf-endpoints, .github/skills/improving-drf-endpoints and .opencode/skills/improving-drf-endpoints in your project.

What does Improving Drf Endpoints need to run?

Going by SKILL.md and its folder, Improving Drf Endpoints needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Improving Drf Endpoints access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Improving Drf Endpoints safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Improving Drf Endpoints use?

Improving Drf Endpoints has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Improving Drf Endpoints use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.5k tokens, read only when the agent opens those files.

What are the alternatives to Improving Drf Endpoints?

Skills that share tags, products or a category with Improving Drf Endpoints: Land TS Mono (UKGovernmentBEIS/inspect_ai, 3k stars), Kingdee MCP Dev (WaHaiLong/KingdeeMCP, 103 stars), OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars) and Zod (jasonjgardner/blockbench-mcp-plugin, 491 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Improving Drf Endpoints?

PostHog (a GitHub organization, an official publisher) maintains it in PostHog/posthog, which has 40,182 GitHub stars. The repository holds 252 skills in this directory. The repository was last updated on October 8, 2026.

Source: PostHog/posthog on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.