@ngriffin_uk/polychat-ai-skills
v0.2.0
Published
Skill retrieval and formatting for Polychat: list, load and read resources from the built-in skills catalogue, and format skill content for model tool responses
Readme
@ngriffin_uk/polychat-ai-skills
Skill retrieval and formatting over the built-in skills catalogue.
import {
formatSkillContent,
getSkill,
getSkillResource,
listSkills,
loadSkill,
} from "@ngriffin_uk/polychat-ai-skills";
const skills = listSkills();
const council = getSkill("council");
const content = loadSkill("artifacts");
const design = getSkillResource("artifacts", "references/design.md");
const promptText = content ? formatSkillContent(content) : "";listSkills/listSkillSummariesdescribe every built-in skill.getSkill,loadSkillandgetSkillResourceread from the catalogue;requireSkillthrows for unknown ids.formatSkillContentandformatSkillResourceproduce the<skill_content>and<skill_resource>XML with HTML escaping.isSkillResourceWithinLoadLimitandMAX_SKILL_RESOURCE_CONTENT_BYTESbound how much a resource may add to a conversation.
Host runtimes that merge user-authored skills can use SkillCatalog from @ngriffin_uk/polychat-library-skills-catalogue directly; persistence and authorisation stay with the host.
