Agent Skillssupabase/supabase › api-types

api-types

GitHub

维护 Supabase API 类型声明,处理 OpenAPI 模式变更及部署漂移。指导通过代码生成和验证生产环境一致性,确保类型文件与生产规格同步。

.agents/skills/api-types/SKILL.md supabase/supabase

Trigger Scenarios

修改生成的 API 类型声明 更新 OpenAPI 模式 调查 API 类型部署漂移

Install

npx skills add supabase/supabase --skill api-types -g -y
More Options

Non-standard path

npx skills add https://github.com/supabase/supabase/tree/master/.agents/skills/api-types -g -y

Use without installing

npx skills use supabase/supabase@api-types

指定 Agent (Claude Code)

npx skills add supabase/supabase --skill api-types -a claude-code -g -y

安装 repo 全部 skill

npx skills add supabase/supabase --all -g -y

预览 repo 内 skill

npx skills add supabase/supabase --list

SKILL.md

Frontmatter
{
    "name": "api-types",
    "description": "Maintain Supabase API types. Use when changing generated API type declarations, OpenAPI schemas, or investigating API type deployment drift."
}

API types

The generated API contract has three specs: API v1, API v2, and Platform. Their committed outputs are packages/api-types/types/api-v1.d.ts, packages/api-types/types/api-v2.d.ts, and packages/api-types/types/platform.d.ts.

Update types

  1. Make the API/schema change and ensure it is deployed to production before relying on a type PR. Production is the merge-gate source of truth.
  2. Run pnpm api:codegen against a running local API environment. It fetches all three local OpenAPI specs and updates the committed files.
  3. Inspect and commit only the intended generated type changes.
  4. Run pnpm api:verify-types. It fetches the three production OpenAPI specs, regenerates types with the repository tooling, and compares them with the committed files.

Complete the update only when pnpm api:verify-types passes after the production deployment is available.

Interpret verification

  • A pass means the committed generated declarations match all three production specs at the time of the check.
  • A mismatch means production and the committed files differ. If the API is not deployed, deploy it and rerun the check. If production is correct, regenerate and review the changed files.
  • A fetch failure means the production schema endpoint could not be read; fix or retry the endpoint before treating the result as a type mismatch.

Pull requests

The Verify production API types CI job runs when packages/api-types/types/** changes and performs the same production comparison. It is currently observational, not a required merge check. The api-deploy-required label is informational only. Still run the local verifier before requesting review and treat a failed CI verification as production drift that must be resolved.

Version History

  • 59e2122 Current 2026-09-23 10:28

Same Skill Collection

.agents/skills/copywriting/SKILL.md
.agents/skills/dev-toolbar-review/SKILL.md
.agents/skills/edit-the-docs/SKILL.md
.agents/skills/review-the-docs/SKILL.md
.agents/skills/studio-e2e-tests/SKILL.md
.agents/skills/studio-error-handling/SKILL.md
.agents/skills/studio-mock-api-tests/SKILL.md
.agents/skills/studio-queries/SKILL.md
.agents/skills/studio-shortcuts/SKILL.md
.agents/skills/studio-testing/SKILL.md
.agents/skills/studio-ui-patterns/SKILL.md
.agents/skills/telemetry-standards/SKILL.md
.agents/skills/test-the-docs/SKILL.md
.agents/skills/vercel-composition-patterns/SKILL.md
.agents/skills/vitest/SKILL.md
.agents/skills/write-the-docs/SKILL.md
.claude/skills/copywriting/SKILL.md
.claude/skills/dev-toolbar-review/SKILL.md
.claude/skills/docs-content/SKILL.md
.claude/skills/studio-e2e-tests/SKILL.md
.claude/skills/studio-error-handling/SKILL.md
.claude/skills/studio-mock-api-tests/SKILL.md
.claude/skills/studio-queries/SKILL.md
.claude/skills/studio-testing/SKILL.md
.claude/skills/studio-ui-patterns/SKILL.md
.claude/skills/telemetry-standards/SKILL.md
.claude/skills/vercel-composition-patterns/SKILL.md
apps/studio/.claude/skills/explorer/SKILL.md
.agents/skills/ask-the-docs/SKILL.md
.agents/skills/clickhouse-logs-queries/SKILL.md
.agents/skills/pm-the-docs/SKILL.md
.agents/skills/react-hook-form/SKILL.md
.agents/skills/safe-sql-execution/SKILL.md
.claude/skills/clickhouse-logs-queries/SKILL.md
.claude/skills/react-hook-form/SKILL.md
.claude/skills/safe-sql-execution/SKILL.md

Metadata

Files
0
Version
59e2122
Hash
22104f1b
Indexed
2026-09-23 10:28

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 12:09
浙ICP备14020137号-1