docs-translate-webhooklisted
Install: claude install-skill Docsbook-io/docs-skills
# docs-translate-webhook — Wire an external translation pipeline via webhook
## Workflow
1. **Verify the connection** — probe that the platform is reachable. If it fails, print the MCP connection command and exit gracefully.
2. **Validate plan and inputs** — resolve which workspace you are operating on and read its current configuration, including its plan. If the plan is below PRO+, stop and print an upgrade prompt. Validate that the webhook URL is `https://` (reject `http://` and non-URLs). Confirm the runtime flavor (`vercel` or `express`; default `vercel`).
3. **Switch translation mode** — call `set_translation_mode` with `mode: external`. This stops Docsbook's built-in translator and causes it to emit `translation.requested` events instead.
4. **Register the webhook** — generate a fresh HMAC secret and call `register_webhook_translation_requested` with the provided URL. Capture the `callback_url` from the response for use in the handler. Surface the HMAC secret to the user once.
5. **Scaffold the handler** — produce a handler file for the selected runtime that verifies the HMAC signature, invokes the user's translation logic (as a TODO placeholder), and POSTs results back to the callback URL.
6. **Write the handler file** — place it at the configured output path (default `api/docsbook-translate.ts` for Vercel, `src/routes/docsbook-translate.ts` for Express). Create parent directories if needed. Overwrite if the file already exists.
7. **Report** — print the webhook URL