Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mknichel
left a comment
There was a problem hiding this comment.
Nice!
What AI SDK does is have a top level skills/ directory in the repository so that when users call npx skills add vercel/microfrontends, it will get auto-discovered from there. https://github.com/vercel/ai/blob/main/skills/use-ai-sdk/SKILL.md
Inside the skill, it tells the agent to look for the docs packaged inside the npm package if it exists:
Before searching docs, check if node_modules/ai/docs/ exists. If not, install only the ai package using the project's package manager (e.g., pnpm add ai).
The docs are copied from https://github.com/vercel/ai/tree/main/content/docs. In our case, I think we could also fetch the docs from the vercel.com/docs/microfrontends and embed them in the NPM package.
What do you think of this organization?
mknichel
left a comment
There was a problem hiding this comment.
You probably also want the references in the skill with the same content. Embedding the docs in the npm package would be nice when there's a lot of version differences, but in our case it probably doesn't matter. Putting this under skills/vercel-microfrontends would make sense to me though to be similar to how other packages do it.
I think you probably want to cut down on the content in SKILL.md so it uses less tokens initially. For everything else, you want to instruct the agent to search/grep over the references so it doesn't consume context unless you need to.
Add microfrontends skill with core guide (SKILL.md), covering setup, configuration, best practices, and CLI usage, plus reference docs for path routing, configuration schema, local development, managing microfrontends, and troubleshooting.