Skip to main content

Function: exportToolAsSkill()

exportToolAsSkill(tool): string

Defined in: packages/agentos/src/emergent/SkillExporter.ts:149

Converts an EmergentTool into a SKILL.md markdown string.

The generated SKILL.md follows the standard format used by the curated skills in packages/agentos-skills-registry/registry/curated/. It includes YAML frontmatter, a purpose section, usage guidance, a parameter table, and implementation notes.

Sandbox tools receive a redaction notice instead of exposed source code — the SKILL.md documents the tool's interface without leaking runtime code.

Parameters

tool

EmergentTool

The emergent tool to export.

Returns

string

Complete SKILL.md content as a string.

Example

import { exportToolAsSkill } from '@framers/agentos/emergent/SkillExporter';

const markdown = exportToolAsSkill(myEmergentTool);
console.log(markdown);
// ---
// name: fetch-data
// version: '1.0.0'
// ...
// ---
// # Fetch Data
// ...