بنقرة واحدة
fix-prep
Fix route mismatches found by `bun run prep`. Run when the OpenAPI spec changes and SDK routes need updating.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Fix route mismatches found by `bun run prep`. Run when the OpenAPI spec changes and SDK routes need updating.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | fix-prep |
| description | Fix route mismatches found by `bun run prep`. Run when the OpenAPI spec changes and SDK routes need updating. |
| disable-model-invocation | false |
| allowed-tools | Bash, Read, Edit, Write, Grep, Glob, Task |
Run bun run prep (or bun run prep:staging if the user passed staging) and parse the output. Identify:
If prep passes with no errors, skip Steps 2–5 and proceed directly to Step 6 (description leak scan). Always run Step 6 regardless of whether prep passed or failed.
For each phantom route:
src/namespaces/holders.ts) to see the current implementationopenapi/polymarket.json) for the correct path, checking if:
src/generated/polymarket.ts for the operation ID and parameter schemaFor each unimplemented route:
/holders/* → holders.ts, /trader/* → trader.ts)src/types/index.ts:
OperationQuery<"operation_id"> and remove manual field definitions that are now covered by the generated typessrc/types/index.ts for any new schemas (e.g. export type NewType = Schemas["NewType"])src/types/index.ts, extending OperationQuery<"operation_id"> for query params and adding path params as explicit fields with address: string patternthis.get<ResponseType>(venue, path, { params: query })Run bun run prep again. It must pass with zero errors (exit code 0). If it fails, repeat from Step 2.
Even when prep passes, OpenAPI description and summary fields can leak internal implementation details. Public SDK consumers should see what an endpoint does, not how it is built.
Scan all files in openapi/ and report any description/summary text that reveals:
TODO, FIXME, HACK, XXX, "deprecated but…", or apologies/explanations aimed at internal readersDo not enumerate the specific forbidden terms in this file — .claude/ is committed to git and naming the project's stack here would itself be the leak. Generate the term list at scan time from your general knowledge of the categories above.
For each spec file, restrict matches to lines containing "description" or "summary" (avoids false positives in schema names) using ripgrep with a case-insensitive regex assembled from the categories above. Iterate over openapi/polymarket.json, openapi/webhooks.json, openapi/ws.json, openapi/ws-alerts.json.
For each match, report:
description/summary stringoperationId or schema key)Group findings by spec file. Do not silently rewrite the spec — these files are auto-fetched by bun run fetch-specs and will be overwritten on next run.
Spec descriptions originate in the backend repo (/Users/quantum/Documents/GitHub/struct-backend). Hand the report to the user and offer to:
bun run fetch-specs once the backend change is deployed to refresh the local specIf no leaks are found, say so explicitly.
src/types/index.tsSchemas["TypeName"] from src/types/helpers.tsasync methodName(params: ParamsType, venue?: Venue): Promise<HttpResponse<ResponseType>>const { pathParam, ...query } = params{ params: { ...params } }encodeURIComponent() for path params in template literals