haops_bulk_publish_skills
Atomically publish multiple skills in a single transaction with optional cascade re-wiring of all consumers. If any skill fails validation, the entire batch rolls back.
Instructions
Atomically publish multiple skills in a single DB transaction (POST /api/skills/bulk-publish). All version bumps happen in one round-trip; when cascade=true, consumer re-wiring (role templates, skill packs, project protocols) runs ONCE at the end — significantly cheaper than N sequential haops_update_skill calls during mass refactors.
Partial-failure semantics: if ANY entry fails validation (unknown skill name, bad scope+projectSlug combo, duplicate entry), the server rolls back the ENTIRE transaction and returns a 400 with a per-entry error list. No skills are published unless ALL entries are valid. Check totalFailed in the response — 0 means full success.
Admin-only, requires ENABLE_COMPOSED_PROTOCOLS=true. Returns 404 when the feature flag is off (the route looks absent by design).
WARNING: cascade=true re-wires ALL consumers of EVERY updated skill in one transaction. Use haops_preview_skill_cascade on high-impact skills before running to estimate blast radius.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cascade | No | When true, atomically re-wires ALL consumers of the updated skills (role templates containing them in defaultSkills, skill packs containing their IDs, project protocols with them in enabledSkillIds) to the NEW UUIDs, all in the same transaction. Recommended for mass refactors. Default: false. | |
| entries | Yes | List of skills to publish. Each entry must have name + scope. Only supply the fields you want to change; unchanged fields carry forward (no-op entries return the current row without bumping version). | |
| verbose | No | If true, include full skill JSON for each entry in the result output. Default: false. |