From a6f90d5cf98265b8cc480219eecc52e69ae36abb Mon Sep 17 00:00:00 2001 From: Ayush7614 Date: Sat, 5 Sep 2026 15:37:27 +0530 Subject: [PATCH] fix(skills): reject whitespace-only title and instructions in POST /skills --- server/src/plugins/routes.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/plugins/routes.ts b/server/src/plugins/routes.ts index 8e9e22c89..c91d99c71 100644 --- a/server/src/plugins/routes.ts +++ b/server/src/plugins/routes.ts @@ -574,7 +574,7 @@ export function createPluginRoutes( global?: boolean; tools?: unknown; } | null; - if (!body?.slug || !body.title || !body.instructions) { + if (!body?.slug || !body?.title?.trim() || !body?.instructions?.trim()) { return context.json( { error: "A slug, a title and instructions are required." }, 400, @@ -617,9 +617,9 @@ export function createPluginRoutes( try { await store.installSkill({ slug: body.slug, - title: body.title, + title: body.title.trim(), summary: body.summary ?? "", - instructions: body.instructions, + instructions: body.instructions.trim(), ownerUserId: body.global ? null : actor.id, ...(tools === undefined ? {} : { tools }), by: actorEmail(context),