From 3b8c22f88e0f1086fe3ff96bf68199a9f9131424 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Wed, 7 Oct 2026 13:55:50 +1100 Subject: [PATCH 1/3] feat(registry): add Skill context checks beside token usage --- .../registry/app/components/SkillDetail.vue | 12 +++- .../app/components/_SkillContextChecks.vue | 31 ++++++++++ .../app/utils/skill-context-checks.ts | 59 +++++++++++++++++++ test/unit/skill-context-checks.test.ts | 37 ++++++++++++ 4 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 layers/registry/app/components/_SkillContextChecks.vue create mode 100644 layers/registry/app/utils/skill-context-checks.ts create mode 100644 test/unit/skill-context-checks.test.ts diff --git a/layers/registry/app/components/SkillDetail.vue b/layers/registry/app/components/SkillDetail.vue index d684cc69..e98a266f 100644 --- a/layers/registry/app/components/SkillDetail.vue +++ b/layers/registry/app/components/SkillDetail.vue @@ -12,6 +12,7 @@ import { avatarProxyUrl, githubAvatarProxyUrl } from '#shared/image-proxy' import { skillPageUrl as exactSkillPageUrl, skillInstallCmd, skillRunCmd, skillRunPrompt } from '#shared/skill-commands' import { headlineTrendingAward, trendingAwardBadgeLabel, trendingAwardLabel, trendingAwardPath } from '#shared/trending-award' import { behaviorIcon } from '../utils/skill-behaviors' +import { resolveSkillContextChecks } from '../utils/skill-context-checks' import { formatByteSize, formatTokenCount, resolveSkillContextCost, resolveSkillFileContext } from '../utils/skill-context-cost' import { fileIcon, highlightLangFromPath } from '../utils/skill-file-tree' import { partitionMetadataEntries } from '../utils/skill-metadata' @@ -537,6 +538,11 @@ const contextCost = computed(() => data.value }) : null) +const contextChecks = computed(() => resolveSkillContextChecks({ + raw: data.value?.raw ?? null, + frontmatter: data.value?.frontmatter ?? null, +})) + const audits = computed(() => liveSkill.value?.audits ?? []) const auditOverview = computed(() => resolveSkillAuditOverview(audits.value)) @@ -2142,7 +2148,7 @@ useHead(computed(() => ({ aria-hidden="true" /> - {{ formatTokenCount(viewerContext.cost.tokens.metadata) }} tokens always: the name and description. + {{ formatTokenCount(viewerContext.cost.tokens.metadata) }} tokens for metadata: the name and description. {{ formatTokenCount(viewerContext.cost.tokens.instructions) }} when used: this file.