.cursor/skills/add-api-endpoint/SKILL.md
Add a new API endpoint following project conventions (Zod, route registration, client, tests). Use when creating or extending backend API routes.
npx skillsauth add sedarged/TikTok-AI-Agent add-api-endpointInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when adding a new REST endpoint to TikTok-AI-Agent.
apps/server/src/routes/. Implement the handler (e.g. router.get/post('/...', async (req, res) => { ... })).safeParse() on req.body / req.params. Return 400 with { error, details: parsed.error.flatten() } on failure. For runId, projectId, planVersionId, use z.string().uuid().apps/server/src/index.ts under /api/....apps/web/src/api/client.ts and update api/types.ts if needed.apps/server/tests/ or E2E in apps/web/tests/e2e/.try/catch for DB and external calls; return 5xx JSON on failure.JSON.parse in try/catch. Use .strict() on body schemas.development
Run lint, typecheck, test, and test:render; summarize pass/fail. Complements the validate command. Use when user asks to "validate", "run checks", or "run full validation".
development
Run lint, typecheck, test, and test:render; collect results and produce a short audit report. Use when asked to "audit the repo", "check project health", or "run full validation".
testing
Turn product plan or requirements into a checklist or task list (e.g. for STATUS.md). Use when given a plan fragment, roadmap, or requirements to break down into concrete tasks.
tools
Say hello and list project commands. Use for a quick project intro or when the user asks "what can this project do" or "list commands".