Dust dust-swagger
MANDATORY guideline - Always keep Swagger documentation in sync when modifying API endpoints or schemas.
install
source · Clone the upstream repo
git clone https://github.com/dust-tt/dust
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/dust-tt/dust "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/dust-swagger" ~/.claude/skills/dust-tt-dust-dust-swagger && rm -rf "$T"
manifest:
.claude/skills/dust-swagger/SKILL.mdsource content
Swagger Documentation Sync - Mandatory Rule
MANDATORY: Any change to an API endpoint schema must be reflected in the Swagger documentation. Do not consider an API change complete until Swagger is updated.
When This Rule Applies
Automatically applies whenever you are:
- Modifying files in
orfront/pages/api/**front/app/api/** - Adding, removing, or renaming fields in request/response bodies (at any nesting level)
- Changing field types or optionality in API schemas
- Adding or removing endpoints
What to Update
When modifying API schemas, check and update the following:
— shared schemas for the private APIpages/api/swagger_private_schemas.ts
— shared schemas for the public APIpages/api/v1/w/[wId]/swagger_schemas.ts- The
annotation in the endpoint file itself@swagger
Annotations
- Every endpoint must have either a
annotation (with proper documentation) or@swagger
(for internal/undocumented endpoints). This is enforced by the@ignoreswagger
check.lint:swagger-annotations - TypeScript types annotated with
point to a corresponding swagger schema. When modifying such a type, always update the referenced schema.@swaggerschema
Example:
/** * @swaggerschema PrivateUser (swagger_private_schemas.ts) */ export type UserTypeWithWorkspaces = UserType & { workspaces: WorkspaceType[]; };
Process
- Make the API/type change
- Identify which swagger files reference the modified schema
- Update all relevant
annotations and shared schema files@swagger - Verify
passeslint:swagger-annotations
You don't need to manually invoke this skill - these guidelines should be followed automatically for any API-related work.