@classflow-api/skill-sdk
v0.1.1
Published
Official ClassFlow Skill SDK — define schedule-aware AI skills with manifest validation and MCP / OpenAI / Anthropic tool adapters.
Readme
Install
npm install @classflow-api/skill-sdkDefining a skill
import { defineSkill } from '@classflow-api/skill-sdk';
export const announcementManifest = defineSkill({
name: 'announcement',
version: '0.1.0',
displayName: { 'en-US': 'Announcements', 'zh-CN': '校园公告' },
description: { 'en-US': 'School-wide and class-targeted broadcasts' },
plan: 'base',
allowNonScheduleContext: { tools: ['list', 'get'], reason: 'org-scoped browse paths' },
tools: [
{
name: 'list',
description: { 'en-US': 'List announcements for the current org.' },
params: { type: 'object' },
riskTier: 'T0',
schedulingContext: 'none',
consumers: ['internal-ai', 'mcp', 'sdk', 'ui'],
handler: 'list',
},
],
});Calling the orchestrator
import { createHttpSkillClient } from '@classflow-api/skill-sdk';
const skills = createHttpSkillClient({
baseUrl: 'https://api.classflow.example',
sessionToken: 'eyJ...',
organizationId: 'org_123',
});
const all = await skills.skills.list();
const result = await skills.skills.invoke({
orgId: 'org_123',
actorAccountId: 'acc_xyz',
via: 'sdk',
skill: 'announcement',
tool: 'list',
args: {},
});