Official agent skill

Document API Endpoint

by getsentry in getsentry/skills

Document and type a Sentry API endpoint. An agent skill from getsentry/skills.

OfficialApache-2.0Auto-check passedBackend & APIs

Install Document API Endpoint

skills CLI
$ npx skills add getsentry/skills --skill document-api-endpoint -a claude-code

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

GitHub CLI
$ gh skill install getsentry/skills document-api-endpoint --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/getsentry/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/document-api-endpoint .claude/skills/document-api-endpoint && 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
document-api-endpoint
GitHub stars
1k
Token cost
~1.1k tokens
SKILL.md length
473 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
Apache-2.0

At a glance

Document and type a Sentry API endpoint. An agent skill from getsentry/skills.

  • Works in 4 steps: Carefully compare what the code does vs… → Reuse the canonical response type → Infer the type. Avoid cast and # type:… → …
  • Asked to document an endpoint
  • SKILL.md covers Workflow, Lessons, Promoting to PUBLIC and Validate
  • Calls curl, jq and make; reaches us.sentry.io

What it does

Document API Endpoint is an agent skill from getsentry/skills, published by the product's own GitHub organization. Document and type a Sentry API endpoint. Write or fix @extendschema decorators, specify response TypedDicts, type request parameters, correct type drift between the declared schema and the runtime response, and validate the generated spec. Use when asked to "document an endpoint", "add OpenAPI docs", "add/fix @extendschema", "type an endpoint response", "fix the response type", "fix type drift", "reuse a response type", "split an overloaded endpoint", "specify the response schema", "add a TypedDict response"…

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering REST APIs, OpenAPI specifications and Technical documentation. It works with Sentry and OpenAPI. The repository describes itself as: Agent Skills used by the Sentry team for development. The licence is Apache-2.0.

When your agent uses it

  • Asked to document an endpoint
  • Add OpenAPI docs
  • Add/fix @extendschema
  • Type an endpoint response

Example prompts

  • “document an endpoint”
  • “add OpenAPI docs”
  • “add/fix @extendschema”
  • “/document-api-endpoint”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Carefully compare what the code does vs declared types
  2. Reuse the canonical response type
  3. Infer the type. Avoid cast and # type: ignore
  4. Legacy doc migration is all-or-nothing per path

What it can do on your machine

Read from SKILL.md and the folder at commit d18b7aa. 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:

    • curl
    • jq
    • make
    • pnpm
    • pytest

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • us.sentry.io

    Also links to:

    • develop.sentry.dev

    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

Document API Endpoint loads about 1.1k tokens when it runs. Until then it costs about 171 tokens; SKILL.md has 473 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~171
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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

The full file from getsentry/skills at commit d18b7aa, republished under its Apache-2.0 licence (© getsentry). 473 words, ~1,116 tokens.

Download SKILL.mdSave it as .claude/skills/document-api-endpoint/SKILL.md (or your agent's skills folder).
name
document-api-endpoint
description
Document and type a Sentry API endpoint. Write or fix @extend_schema decorators, specify response TypedDicts, type request parameters, correct type drift between the declared schema and the runtime response, and validate the generated spec. Use when asked to "document an endpoint", "add OpenAPI docs", "add/fix @extend_schema", "type an endpoint response", "fix the response type", "fix type drift", "reuse a response type", "split an overloaded endpoint", "specify the response schema", "add a TypedDict response", "migrate a legacy api-docs path", "fix a parameter type", or "make an endpoint public" / "promote an endpoint" (promotion is one section here).

Document & Type a Sentry API Endpoint

Add or fix OpenAPI docs for a Sentry endpoint with drf-spectacular. Full reference is at https://develop.sentry.dev/backend/api/public/, the most useful section to you will be https://develop.sentry.dev/backend/api/public/#5-method-decorator. This skill captures the non-obvious lessons on top of it. Most of the work is making the declared schema match what the endpoint actually returns. Before documenting, identify which endpoint class serves the route and what it does; the MCP tool that calls it is usually the fastest way to confirm its behavior. Promoting a PRIVATE/EXPERIMENTAL endpoint to PUBLIC is one application (see below).

Workflow

  1. Class-level @extend_schema(tags=[...]) — use the closest existing OPENAPI_TAGS entry.
  2. Method-level @extend_schema(operation_id=..., parameters=[...], responses={...}, examples=...).
  3. Reuse src/sentry/apidocs/parameters.py and examples/*.py; ensure owner = ApiOwner.<TEAM> is set.
  4. If a legacy api-docs/paths/**/*.json covers the path, remove it (see lesson 4).
  5. Validate, then verify against the live endpoint (lesson 1).

Lessons

1. Carefully compare what the code does vs declared types

Ideally, hit the live endpoint with a real token and diff the keys and types against your TypedDict. Serializers are sometimes inaccurate. Look out for counts coming back as floats instead of integers, IDs declared int emitted as strings, nested types declaring the wrong number of fields. Correct the declared type to match runtime.

bash
curl -s -H "Authorization: Bearer $TOKEN" "https://us.sentry.io/api/0/<endpoint>" | jq 'keys'
2. Reuse the canonical response type

Match the codebase's XxxResponseOptional(TypedDict, total=False) mixin (main class declares required fields). Nullable-vs-absent: T | None = key always present, value may be null; NotRequired[T] = key only set under a condition (e.g. an expand query param). Reuse the existing canonical type instead of re-declaring a second or third copy in a *_types.py. If there's no clean canonical type to reuse (e.g. a payload proxied from another service like vroom/profiling), type it dict[str, Any] rather than inventing a new mirror, and confirm the shape from the owning service's repo, not just the serializer.

Show full SKILL.md (169 more words)Show less
3. Infer the type. Avoid cast and # type: ignore

When a serializer returns a base type plus extra fields, refactor the producing code so the response type is inferred rather than forced.

4. Legacy doc migration is all-or-nothing per path

Delete the api-docs/paths/**/*.json file AND its $ref in api-docs/openapi.json. drf-spectacular's APPEND_PATHS does not merge HTTP methods, so once any method on a path uses @extend_schema, all legacy methods on that path vanish — migrate every method on the path in one commit.

Promoting to PUBLIC

Do the workflow above, then on the concrete endpoint only (leave siblings PRIVATE):

  • Bump publish_status[<METHOD>] → PUBLIC and set owner = ApiOwner.<TEAM>.
  • Remove the method from API_OWNERSHIP_ALLOWLIST_DONT_MODIFY in the same change as the flip.
  • If the endpoint is redundant or being renamed, delete or deprecate the old version in its own change first, then stack the publish on top.
  • Note in the PR if scopes widen (event:read → event:{admin,read,write}) — that's drf-spectacular regenerating from permission_classes, documentation-only.

The change reaches the @sentry/api SDK / MCP only after sentry-api-schema regenerates downstream.

Validate

bash
make build-api-docs
pnpm run validate-api-examples
.venv/bin/pytest -q --reuse-db tests/apidocs/endpoints/<area>/test_<name>.py
.venv/bin/prek run -q --files <changed paths>

© getsentry, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/document-api-endpoint of getsentry/skills.

Open the folder on GitHubat commit d18b7aa

Compare with similar skills

Document API Endpoint 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.

Document API Endpoint compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Document API Endpoint this skillgetsentry/skills1k—~1.1kAutomated safety check: PassApache-2.0
OpenAPI Spec Generationwshobson/agents40k9 repos~511Automated safety check: PassMIT
Inngest APIAsymmetric-al/core382—~1.5kAutomated safety check: PassAGPL-3.0
REST API Expertcin12211/orca-q223—~3.2kAutomated safety check: PassMIT
REST API Designcuriositech/some_claude_skills2431 repos~3.1kAutomated safety check: PassMIT
API Reference Documentationsecondsky/claude-skills2271 repos~561Automated safety check: PassMIT

Similar skills

  • Create, validate and maintain OpenAPI 3.1 specs for REST APIs, whether designed first or generated from existing code, and use them for docs and client SDKs.

    40k GitHub starsUsed in 9 repos~511 tokens
    Backend & APIsAuto-check passed
  • Inngest API

    Asymmetric-al/core

    A skill your agent uses when the user explicitly asks for the Inngest REST API v2, raw HTTP, OpenAPI, API docs, API authentication, or an endpoint that the Inngest CLI does not expose.

    382 GitHub stars~1.5k tokensUpdated today
    Backend & APIsAuto-check passed
  • REST API Expert

    cin12211/orca-q

    REST API design and development expert specializing in endpoint design, HTTP semantics, versioning, error handling, pagination, and OpenAPI documentation.

    223 GitHub stars~3.2k tokensUpdated 16 days ago
    Backend & APIsAuto-check passed
  • REST API Design

    curiositech/some_claude_skills

    Design REST API endpoints with Zod validation and OpenAPI documentation.

    243 GitHub starsUsed in 1 repo~3.1k tokens
    Backend & APIsAuto-check passed
  • API Reference Documentation

    secondsky/claude-skills

    Creates professional API documentation using OpenAPI specifications with endpoints, authentication, and interactive examples.

    227 GitHub starsUsed in 1 repo~561 tokens
    Backend & APIsAuto-check passed
  • API Design Assistant

    majiayu000/claude-skill-registry

    Design and review APIs with suggestions for endpoints, parameters, return types, and best practices.

    666 GitHub starsUsed in 1 repo~2.7k tokens
    Backend & APIsAuto-check passed

More from getsentry/skills

All 27 skills in this repo
  • Skill Scanner

    getsentry/skills

    Official

    Scan agent skills for security issues. An agent skill from getsentry/skills.

    1k GitHub starsUsed in 4 repos~2.5k tokens
    Auto-check: warnings
  • Gh Review Requests

    getsentry/skills

    Official

    Fetch unread GitHub notifications for open PRs where review is requested from a specified team or opened by a team member.

    1k GitHub starsUsed in 3 repos~621 tokens
    Auto-check: notes
  • Security Review

    getsentry/skills

    Official

    Security code review for vulnerabilities. An agent skill from getsentry/skills.

    1k GitHub starsUsed in 4 repos~2.9k tokens
    Auto-check: notes
  • Skill Writer

    getsentry/skills

    Official

    Create, synthesize, and iteratively improve agent skills following the Agent Skills specification.

    1k GitHub stars~2.5k tokensUpdated 4 days ago
    Auto-check passed
  • Django Access Review

    getsentry/skills

    Official

    Django access control and IDOR security review. An agent skill from getsentry/skills.

    1k GitHub starsUsed in 3 repos~2.6k tokens
    Auto-check: notes
  • Gha Security Review

    getsentry/skills

    Official

    GitHub Actions security review for workflow exploitation vulnerabilities.

    1k GitHub starsUsed in 3 repos~2.2k tokens
    Auto-check: notes

Works with

Categories

Questions about Document API Endpoint

What does Document API Endpoint do?

Document and type a Sentry API endpoint. An agent skill from getsentry/skills. Document API Endpoint is an agent skill from getsentry/skills, published by the product's own GitHub organization. Document and type a Sentry API endpoint.

When should I use Document API Endpoint?

Document API Endpoint fits situations like: asked to document an endpoint; add OpenAPI docs; add/fix @extendschema; type an endpoint response.

How do I install Document API Endpoint in Claude Code?

Run `npx skills add getsentry/skills --skill document-api-endpoint -a claude-code`. Or copy the skill folder (skills/document-api-endpoint in getsentry/skills) into .claude/skills/document-api-endpoint in your project. Claude Code loads it when a task matches its description.

How do I install Document API Endpoint in Codex?

Run `npx skills add getsentry/skills --skill document-api-endpoint -a codex`. Or copy the skill folder (skills/document-api-endpoint in getsentry/skills) into .agents/skills/document-api-endpoint in your project. Codex loads it when a task matches its description.

Can I use Document API Endpoint 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 getsentry/skills --skill document-api-endpoint -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/document-api-endpoint, .gemini/skills/document-api-endpoint, .github/skills/document-api-endpoint and .opencode/skills/document-api-endpoint in your project.

What does Document API Endpoint need to run?

Going by SKILL.md and its folder, Document API Endpoint needs the command-line tools its instructions call (curl, jq, make, pnpm and pytest).

Does Document API Endpoint access the network?

SKILL.md names 2 domains. In commands or code: us.sentry.io; the agent is likely to contact it when it follows the instructions. As links in the text: develop.sentry.dev. This is read from the text; nothing was executed.

Is Document API Endpoint 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 Document API Endpoint use?

Document API Endpoint is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Document API Endpoint use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Document API Endpoint?

Skills that share tags, products or a category with Document API Endpoint: OpenAPI Spec Generation (wshobson/agents, 40k stars), Inngest API (Asymmetric-al/core, 382 stars), REST API Expert (cin12211/orca-q, 223 stars) and REST API Design (curiositech/some_claude_skills, 243 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Document API Endpoint?

getsentry (a GitHub organization, an official publisher) maintains it in getsentry/skills, which has 1,037 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 2, 2026.

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