用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill api-endpoint命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | api-endpoint |
| description | | Use when this capability is needed. |
Generate SDK endpoints from OpenAPI specifications following project conventions.
| Component | Location | When |
|---|---|---|
| Endpoint module | src/opengov_api/{resource}.py | Always |
| Response models | src/opengov_api/models/{resource}.py | If typed responses needed |
| Params model | src/opengov_api/models/params.py | If list endpoint has filters |
| Enums | src/opengov_api/models/enums.py | If status/type enums needed |
| Model exports | src/opengov_api/models/__init__.py | When adding models |
| SDK exports | src/opengov_api/__init__.py | Always |
| Tests | tests/test_{resource}.py | Always |
| Common tests | tests/test_common_endpoints.py | Add to parametrized lists |
| OpenAPI | SDK |
|---|---|
GET /{resource} | list_{resource}() returning JSONAPIResponse[{Resource}Resource] |
GET /{resource}/{id} | get_{resource}(id) returning dict[str, Any] |
POST /{resource} | create_{resource}(data) returning dict[str, Any] |
PATCH /{resource}/{id} | update_{resource}(id, data) returning dict[str, Any] |
DELETE /{resource}/{id} | delete_{resource}(id) or archive_{resource}(id) |
Nested GET /{parent}/{id}/{child} | list_{parent}_{child}(parent_id) |
Nested POST /{parent}/{id}/{child} | add_{parent}_{child}(parent_id, data) |
| OpenAPI Parameter | SDK Param Name | Model Field |
|---|---|---|
filter[status] | status | filter_status |
filter[createdAt] | created_at | filter_created_at |
filter[isEnabled] | is_enabled | filter_is_enabled |
page[number] | page_number | page_number |
page[size] | page_size | page_size |
See references/patterns.md for complete code examples including:
Before completing, verify:
Schema Extraction & Validation:
required array)nullable: true → | None)Field(alias=...) with exact casingCode Generation:
@handle_request_errors decoratorwith _get_client() as client: patternJSONAPIResponse[{Resource}Resource]Field(alias="camelCase") for JSON field mappingto_query_params() methodmodel_config = {"populate_by_name": True} present in all attribute modelsIntegration:
__init__.pymodels/__init__.pytests/test_{resource}.pytest_common_endpoints.py parametrized listsVerification:
uv run pytest passesuv run pyright passesConverted and distributed by TomeVault — claim your Tome and manage your conversions.