Skip to main content

Annotations

Skills are described using @skill:* comment annotations. The lmsk generate tool reads them and produces dispatch code.

Annotation format by language

Each language uses its own comment syntax:

Crate-level annotations use JSDoc comments (/** */) before the first export. Method annotations use // comments directly above the function.

assembly/skill.ts
/**
* @skill:id ai.luminarys.as.my-skill
* @skill:name "My Skill"
* @skill:version 1.0.0
* @skill:desc "Skill description."
*/

import { Context } from "@luminarys/sdk-as";

// @skill:method greet "Greet by name."
// @skill:param name required "User name"
// @skill:result "Greeting text"
export function greet(_ctx: Context, name: string): string {
return "Hello, " + name + "!";
}

Skill identity

AnnotationRequiredDescription
@skill:idYesReverse-domain format, at least 3 segments (e.g. ai.luminarys.rust.echo)
@skill:nameYesDisplay name (quoted string)
@skill:versionYesSemver: X.Y.Z
@skill:descNoDescription shown in tool listings

ID format rules

  • At least 3 dot-separated segments: ai.luminarys.echo (valid), echo-skill (invalid)
  • Each segment: lowercase letters, digits, hyphens
  • No leading/trailing hyphens, no empty segments

Methods

@skill:method <name> "<description>"
@skill:param <name> [required] "<description>"
@skill:result "<description>"
  • Method name: snake_case — letters, digits, underscores
  • Parameter name: must match the function argument name
  • required makes the parameter mandatory — omitting it returns an error
  • @skill:result is documentation only (does not affect behavior)

Supported parameter types

TypeGoRustAssemblyScript
stringstringStringstring
integerint64i64i64
floatfloat64f64f64
booleanboolboolbool
bytes[]byteVec<u8>Uint8Array

Modifiers

@skill:internal

Hides the method from tool listings. Still callable by other skills via inter-skill invocation.

@skill:callback

Marks a method as a private callback. Hidden from tool listings, only callable by the owning skill (used for TCP/WebSocket push callbacks).

Permission requirements

@skill:require fs /data/shared rw
@skill:require http https://api.example.com/**
@skill:require shell go **
@skill:require tcp *:5432
@skill:require env API_KEY

Requirements are embedded in the skill package and validated at load time. If the deployment manifest doesn't satisfy a requirement, the skill won't load.

This ensures that a skill always declares what it needs — and the operator explicitly grants it in the manifest.