Skip to content

Skills: expose frontmatter metadata to clients and reconcile the skill page with the latest prototypes #2301

Open

Description

@kantord

Parent: #1736. Follow-up to #1853, #2155, and #2192.

Outcome

A client can see all of a skill's definition, not only its name and description, and Studio's skill page is reconciled with the latest design prototypes for what to show.

Background

A skill's SKILL.md starts with a frontmatter block (name, description, allowed-tools, license, and other metadata), followed by the instructions. The daemon parses the frontmatter at discovery and keeps the instructions as the skill's "body". Clients see only part of it today:

  • ListSkills returns name and description (plus lifecycle fields for learned skills). allowed-tools, license, and the other frontmatter fields are parsed by the daemon but are not exposed by any client RPC, so neither Studio nor the SDK can show them.
  • ListSkillFiles and ReadSkillFile (added in feat(skills): read a skill's files through the client API #2192) list the instruction body, without its frontmatter, under the name SKILL.md. For tech-writer that entry is 8,140 bytes, while the file on disk is 8,702. SkillFileInfo.instructions marks it, and the field comments say it is not the raw file.
  • The raw file cannot be read through the client API. tool.SkillSource has SkillBody (the text after the frontmatter) and asset reads, but no raw-file accessor, so for configured skills the frontmatter split is done by the existing skill discovery code (engine/adapter/skillfs), not by the files API.
  • The method docs say less than the fields do. The RPC comments, ReadSkillFileResponse.content, and the SDK docs for skills.listFiles and skills.readFile (published in 0.5.0) describe SKILL.md as a file and do not say it is the body without frontmatter.
  • Studio does not use SkillFileInfo.instructions. Its Files section shows that entry as SKILL.md, which reads as the real file.

The skill Files component in the open knowledge prototype (mecatl-prototypes #46) is still the "metadata-only" note, and the skill data in the prototypes carries no allowed-tools, license, or other frontmatter fields. The prototype work is still moving (#46 and #40 are open), so what the skill page should show is not settled by a design.

Scope

  • Decide, with design, which frontmatter fields belong on the skill page (for example allowed tools and license) and where. Reconcile Studio's skill page with the latest prototypes at the same time, and record any difference as a deliberate deviation on this issue.
  • Expose the chosen fields to clients. The smallest change is extra fields on SkillInfo (additive, announced through a compatibility feature), or a raw-file read if the full definition is wanted. Pick one and state why.
  • Make the files API honest about SKILL.md: say "instruction body, without frontmatter" on both RPCs, on ReadSkillFileResponse.content, and in the SDK method docs (Studio already labels that entry from SkillFileInfo.instructions since feat(studio): show a skill's files on its page #2155). If a raw-file read is added, decide whether SKILL.md then becomes the real file.
  • Re-decide ListSkills' access class. It is KindSharedInfrastructure today, although its view now adds the caller's own learned skills; feat(skills): read a skill's files through the client API #2192 only corrected the rationale text in classification.go. This issue touches ListSkills and SkillInfo anyway, so decide it here.
  • Decide how the skill page loads file text, together with the response shape above, so lazy loading, a raw-file read, and the metadata are designed once. Today the page loads every file up front (at most 32 files, so at most 33 daemon calls per view); feat(studio): show a skill's files on its page #2155 bounds that, but a design for large skills does not exist yet.
  • Add the matching BFF contract, page changes, and tests.

Acceptance

  • Every field the design decides to show is visible on the skill page for configured and learned skills, and missing metadata renders as absent, not as an error.
  • The SDK and RPC docs state what SKILL.md contains, and the Studio Files entry says so.
  • Any new RPC field or RPC passes the access classification, error-code, and SDK parity checks, and ships in an SDK release before Studio uses it (unless Studio builds against the checked-out SDK at that point).
  • The reconciliation with the prototypes is recorded.

Delivery

Likely two changes: a daemon and SDK slice (fields or raw-file read, docs, release), then a Studio slice that uses it. The Studio label and wording change can ship first without the daemon slice.

Not in scope: editing skills or their metadata (#2184 and #2185).

Fully or partially written by an AI agent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    WebUIbackend-service-gapenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions