cli: nothing checks the shipped agent skill's code blocks, so they drift silently
problem
nothing in CI compiles or formats the code blocks in packages/cli/plugin/skills/assistant-ui/SKILL.md, so they drift from the APIs and from the scaffold the skill itself tells an agent to install, and the drift is only found when a user reports it.
#7486 is the visible instance: the skill shipped toDataStreamResponse(), useChatRuntime({ api }), tool({ parameters }) and UI messages passed straight into streamText long after the repo moved to AI SDK 7, and every check stayed green the whole time. #7492 fixes the content and pins the route and component snippets byte-equal to apps/registry/app/api/chat/route.ts and apps/registry/app/ai-sdk/assistant.tsx, but nothing keeps them that way.
two smaller gaps the same check would have caught, both still present on main after #7492:
- the toolkit renderer block and the
Register the toolkitfragment are not oxfmt shaped; oxfmt rewraps the renderer's JSX. - the skill's route deliberately omits
export const maxDuration = 30;because neither the registry route nortemplates/minimalships it, whileapps/docs/content/docs/runtimes/ai-sdk/v7.mdxdoes. worth settling in one place.
proposal
extract every ts/tsx block from the shipped skill and check it the way the docs already check their previews. apps/docs/scripts/preview-code-extract.ts is the nearest prior art: it reads oxfmt formatted sources, so the same shape works here.
two assertions are enough:
- the extracted blocks compile against the pinned AI SDK with the repo's strictness, with
@/aliased topackages/ui. - the blocks the registry also ships stay byte-equal to their registry source, so a registry change fails the skill rather than silently outdating it.
oxfmt --check over the extracted blocks is a cheap third.
notes
the same argument applies to the other shipped skills under packages/cli/plugin/skills/, so the check should take a directory rather than one file.
Source: assistant-ui/assistant-ui