MCPcopy Index your code
hub / github.com/simstudioai/sim / getSkillById

Function getSkillById

apps/sim/lib/workflows/skills/operations.ts:65–75  ·  view source on GitHub ↗
(params: { skillId: string; workspaceId: string })

Source from the content-addressed store, hash-verified

63 * not exist or belongs to a different workspace.
64 */
65export async function getSkillById(params: { skillId: string; workspaceId: string }) {
66 const builtin = getBuiltinSkillById(params.skillId)
67 if (builtin) return builtinSkillRow(params.workspaceId, builtin)
68
69 const rows = await db
70 .select()
71 .from(skill)
72 .where(and(eq(skill.id, params.skillId), eq(skill.workspaceId, params.workspaceId)))
73 .limit(1)
74 return rows[0] ?? null
75}
76
77/**
78 * Delete a skill by ID within a workspace.

Callers 2

processSkillFromDbFunction · 0.90

Calls 3

getBuiltinSkillByIdFunction · 0.90
builtinSkillRowFunction · 0.85
eqFunction · 0.50

Tested by

no test coverage detected