Skip to content

Skill reference files: size budget and a token count for every skill file #161

Closed

Description

@kazo0

Summary

Give the skill reference files a size budget, and report every skill file's size, so what an agent reads early stays small. In an agent session every file read stays in context and is re-read on every later model call; references are read during implementation, so each token is paid for hundreds of times.

Evidence

From an internal benchmark run (FieldCheck; harness in unoplatform/private, tools/skill-ab), the agent read four reference files during implementation, about 18k characters re-read on roughly 250 later calls (the run reported about 8.5k tokens for them):

File Characters at the time of the run
uno-themes/references/simple.md 12,087
uno-toolkit/references/command-extensions.md 2,410
uno-toolkit/references/safearea.md 1,928
uno-toolkit/references/chip.md 1,690

The skills' own text (SKILL.md, loaded on each invocation) added another 19k tokens in the same run.

Current state (main, 2026-10-05)

  • The seven SKILL.md files total 71.7k characters (about 18k tokens).
  • 15 of 82 reference files are over 6,000 characters (about 1,500 tokens):
File Characters
uno-themes/references/semantic-colors-brushes.md 17,306
uno-testing/references/ui.md 16,258
uno-themes/references/simple.md 11,659
uno-themes/references/material.md 10,827
uno-navigation/references/shell-responsive-template.md 10,674
uno-navigation/references/shell-navigationview-template.md 9,941
uno-toolkit/references/flexpanel.md 9,330
uno-build-app/references/architecture-baseline.md 8,370
uno-testing/references/VISUAL-TREE-GUIDE.md 8,119
uno-testing/references/assertions.md 8,115
uno-testing/references/INTERACTION-PATTERNS.md 8,013
uno-toolkit/references/card.md 7,739
uno-navigation/references/shell-tabbar-template.md 7,650
uno-build-app/references/design.md 6,959
uno-mvux/references/liststate.md 6,057
  • 58 reference files repeat the same 277-character > **Docs lookup:** note, and most also carry a ## Workflow section of docs-search queries (about 2k characters in simple.md). Five of the seven SKILL.md files already explain how to search the docs.

Proposal

  • A size report in CI (Test-Plugin.ps1 or a step in validate-plugin.yml) that lists every SKILL.md and reference file, so size changes show up in review. Count characters, which needs no API key, and show an estimated token count at a fixed ratio. Calibrate the ratio once against the real tokenizer and state it in the report.
  • A budget per reference file of about 1,500 tokens (about 6,000 characters). Split larger files by task, and give each a short table of contents at the top so an agent can read just the section it needs.
  • Exempt files that should not be split, and require a table of contents in them instead:
    • complete templates (the three uno-navigation/references/shell-*-template.md);
    • lookup tables (uno-themes/references/semantic-colors-brushes.md).
  • First cut: shared boilerplate. Remove the repeated Docs lookup note from reference files, and make sure each hub SKILL.md states it once (uno-testing and uno-build-app don't mention docs search today). Trim the per-file docs-search query tables to the queries that are specific to the file.
  • Then uno-themes/references/simple.md, the largest file read in that run. Most of it is style-key tables, utility brushes and the docs-search workflow; palette and font overrides are one table and one paragraph. Split along those lines (for example: configuration and customization, style keys, utility brushes).

Acceptance criteria

  • Character and estimated token counts for all skill files are visible in CI or a checked-in report.
  • No reference file is over budget unless it is a template or lookup table with a table of contents, or has another stated reason.
  • A FieldCheck re-run reads fewer reference tokens for the same guidance.

Activity

  1. added
    kind/performance
    triage/untriaged
    and removed
    triage/untriaged
    on Sep 29, 2026
  2. added theissue type on Oct 5, 2026
  3. self-assigned this
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/performancetool/Uno Platform Skills

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions