MCPcopy
hub / github.com/simstudioai/sim / serializeSkill

Function serializeSkill

apps/sim/lib/copilot/vfs/serializers.ts:694–712  ·  view source on GitHub ↗
(s: {
  id: string
  name: string
  description: string
  content: string
  createdAt: Date
})

Source from the content-addressed store, hash-verified

692 * Serialize a skill for VFS agent/skills/{name}.json
693 */
694export function serializeSkill(s: {
695 id: string
696 name: string
697 description: string
698 content: string
699 createdAt: Date
700}): string {
701 return JSON.stringify(
702 {
703 id: s.id,
704 name: s.name,
705 description: s.description,
706 contentPreview: truncate(s.content, 500),
707 createdAt: s.createdAt.toISOString(),
708 },
709 null,
710 2
711 )
712}
713
714/**
715 * Serialize an integration/tool schema for VFS components/integrations/{service}/{operation}.json

Callers 1

materializeSkillsMethod · 0.90

Calls 1

truncateFunction · 0.90

Tested by

no test coverage detected