redesign skills library (#8868)
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
This commit is contained in:
@@ -75,18 +75,28 @@ export const MOCK_PROJECTS = [
|
||||
];
|
||||
|
||||
export const MOCK_SKILLS = [
|
||||
{
|
||||
name: "layout",
|
||||
description: "Improves layout, spacing, and visual hierarchy",
|
||||
instructions:
|
||||
"When asked to improve a UI layout, tighten spacing, strengthen hierarchy, and refine composition.",
|
||||
path: "/mock/.agents/skills/layout/SKILL.md",
|
||||
global: true,
|
||||
},
|
||||
{
|
||||
name: "code-review",
|
||||
description: "Reviews code for quality and best practices",
|
||||
instructions:
|
||||
"When asked to review code, analyze the diff and provide feedback on code quality, potential bugs, and best practices.",
|
||||
path: "/mock/.agents/skills/code-review/SKILL.md",
|
||||
global: true,
|
||||
},
|
||||
{
|
||||
name: "test-writer",
|
||||
description: "Generates unit tests for given code",
|
||||
instructions:
|
||||
"When asked to write tests, generate comprehensive unit tests covering edge cases, happy paths, and error scenarios.",
|
||||
path: "/mock/.agents/skills/test-writer/SKILL.md",
|
||||
path: "/tmp/alpha/.goose/skills/test-writer/SKILL.md",
|
||||
global: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -95,7 +95,7 @@ export function buildInitScript(options?: {
|
||||
description: s.description,
|
||||
content: s.instructions ?? s.content ?? "",
|
||||
directory: (s.path ?? ("/mock/.agents/skills/" + s.name + "/SKILL.md")).replace(/\\/SKILL\\.md$/, ""),
|
||||
global: true,
|
||||
global: s.global ?? true,
|
||||
supportingFiles: [],
|
||||
});
|
||||
|
||||
@@ -196,10 +196,10 @@ export function buildInitScript(options?: {
|
||||
content: message.params?.content ?? "",
|
||||
directory: "/mock/.agents/skills/" + (message.params?.name ?? "new-skill"),
|
||||
global: message.params?.global ?? true,
|
||||
supportingFiles: [],
|
||||
},
|
||||
});
|
||||
case "_goose/sources/update": {
|
||||
case "_goose/sources/update":
|
||||
case "goose/sources/update": {
|
||||
const path = message.params?.path ?? "/mock/.agents/skills/updated-skill";
|
||||
const nextName = message.params?.name;
|
||||
const name =
|
||||
@@ -218,14 +218,16 @@ export function buildInitScript(options?: {
|
||||
description: message.params?.description ?? "",
|
||||
content: message.params?.content ?? "",
|
||||
directory,
|
||||
global: true,
|
||||
global: message.params?.global ?? true,
|
||||
supportingFiles: [],
|
||||
},
|
||||
});
|
||||
}
|
||||
case "_goose/sources/delete":
|
||||
case "goose/sources/delete":
|
||||
return jsonRpcResult(message.id, {});
|
||||
case "_goose/sources/export": {
|
||||
case "_goose/sources/export":
|
||||
case "goose/sources/export": {
|
||||
const path = message.params?.path ?? "/mock/.agents/skills/skill";
|
||||
const name = String(path).split("/").filter(Boolean).at(-1) ?? "skill";
|
||||
return jsonRpcResult(message.id, {
|
||||
|
||||
Reference in New Issue
Block a user