small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo

Skills extension #

The skills extension discovers instruction files and exposes a session snapshot as context, commands, and Python routes. It requires the python and commands extensions. See skills extension.

Discovery #

catalog.scan_at scans workspace, user, and built-in sources. If a remote workspace mirror is unavailable, it skips project skills and records a diagnostic. Session preparation filters discovered skills through capability preferences and keeps a snapshot for that session. The snapshot supplies <available_skills> metadata and commands. See extension.gleam.

The native scanner checks immediate child directories under these roots in order:

  1. <workspace>/.albedo/skills
  2. <workspace>/.agents/skills
  3. $HOME/.albedo/skills
  4. $HOME/.agents/skills
  5. The installation's priv/skills

Each candidate needs a regular SKILL.md. Its declared name must match the installed directory name. Earlier valid candidates take precedence over later duplicates. Symlinks resolve before the file is read. Root order, filesystem discovery, and selection identity belong to albedo_skills.

frontmatter owns frontmatter extraction and metadata validation for both discovery and selected-skill revalidation. The closing delimiter must fit within 65,536 bytes, including the delimiter lines and their counted newlines. CRLF delimiters are accepted. The shared file.read_prefix reads at most 65,537 bytes and closes its descriptor on success or failure. The native adapter decodes YAML with yamerl's failsafe schema while retaining duplicate keys. Do not move metadata policy into this adapter.

A name uses 1 to 64 lowercase ASCII letters, digits, and single separating hyphens. For compatibility, a single trailing LF is also accepted in a name. An omitted name falls back to the installed directory name, which must pass the same validation. A description is trimmed and must contain 1 to 1,024 Unicode scalars. Duplicate name or description fields are rejected. Other well-formed metadata fields are ignored.

Activation and Python API #

await skills.resources(name) lists resource names. await skills.read(name, resource="SKILL.md", offset=0, limit=16384) reads a bounded page with content, next_offset, and truncated. Failures raise SkillsError. See skills.py and catalog.gleam.

The native reader accepts at most 65,536 bytes per page and rejects resources larger than 16 MiB. After the existing selected-skill identity, path resolution, and regular-file checks, it uses file.read_range for bounded byte I/O. The shared helper does not replace those checks. A read error returns a resource error, and EOF returns empty bytes. The response includes its encoding and total size. See read_selected in albedo_skills.erl.

Each cataloged skill has a slash command. A reserved command name uses /skill:<name>. A user invocation submits an activation as a turn. A model command invocation returns activation data. See command_name in catalog.gleam and skill_command in extension.gleam.

Trust and execution #

The built-in image generation skill describes the imagegen binding and links its prompting guidance, source attribution, and license. Discovering or reading it does not enable a driver or establish that an account is signed in.

Reading or activating a skill does not run its scripts, import modules, fetch links, or grant tools. allowed-tools metadata is descriptive. Resolve relative paths from the installed skill directory. The extension attempts to record loads, but a recording failure does not prevent a load. See instructions, record, and skill_command in extension.gleam and the activation preamble in catalog.gleam.