@enteros/skill-core
v0.1.3
Published
Core runtime for authoring EnterOS skills: define a skill module, its config slice, and conformance rules, then compose and load skill families with reserved-name and write-discipline guards enforced from the contract SSOT.
Downloads
527
Maintainers
Readme
@enteros/skill-core
Core runtime for authoring EnterOS skills — the building blocks a skill
author uses to declare a skill module (its tools, CLIs, config slice, and skill
doc), validate it at definition time, and compose and load skill families. Wire
naming, reserved-name guards, and write-discipline rules are enforced from the
@enteros/contracts SSOT.
Install
npm install @enteros/skill-coreBuild a skill module
defineModule() validates the module shape at definition time and returns a
frozen module. Each tool declares an inputSchema and outputSchema (JSON
Schema 2020-12) and a handler.
import { defineModule } from "@enteros/skill-core";
export default defineModule({
id: "hello",
version: "0.1.0",
contractVersion: 1,
skillDoc: "./SKILL.md",
configSlice: "./config.slice.json",
tools: [
{
id: "greet",
description: "Return a friendly greeting for the given name.",
inputSchema: {
type: "object",
properties: { name: { type: "string" } },
required: ["name"],
additionalProperties: false,
},
outputSchema: {
type: "object",
properties: { message: { type: "string" } },
required: ["message"],
additionalProperties: false,
},
async handler({ name }: { name: string }) {
return { message: `Hello, ${name}!` };
},
},
],
clis: [],
});Check a skill against the full framework contract with the ./conformance
export:
import { assertConformant } from "@enteros/skill-core/conformance";
import mod from "./index.ts";
await assertConformant(mod, { dir: import.meta.dirname });Serve your skills over MCP with @enteros/skill-mcp
and persist work with @enteros/skill-ledger.
License
MIT © Molecule AI
