Vite plugin for importing Markdown and Agent Skills from static import attributes.
bun add -D vite-plugin-agent-skillsimport { agentSkills } from "vite-plugin-agent-skills";
export default {
plugins: [agentSkills()],
};import instructions from "./prompts/editor.md" with { type: "markdown" };
import reviewSkill from "./skills/review/SKILL.md" with { type: "skill" };
reviewSkill.body;
reviewSkill.resources;
reviewSkill.fingerprint;- Imports
*.mdfiles as strings withwith { type: "markdown" }. - Imports canonical
SKILL.mdfiles withwith { type: "skill" }. - Packages skill resources from
references/,scripts/,assets/, and other files while respecting.gitignore. - Ships TypeScript module declarations for Markdown and
SKILL.mdimports.
| Path | Purpose |
|---|---|
| packages/vite-plugin-agent-skills | Published npm package, usage docs, config reference, changelog |
| examples/basic | Minimal Vite app that imports Markdown and a SKILL.md skill |
| docs/release-checklist.md | Release validation checklist |
For projects that import Markdown modules, add the package root types:
{
"compilerOptions": {
"types": ["vite/client", "vite-plugin-agent-skills"]
}
}The shipped declarations type *.md imports as string and */SKILL.md
imports as AgentSkill.
This plugin is heavily inspired by Flue and its approach to Vite-powered agent development.
- Vite
^8.0.0 - Node
>=24.10.0 - Bun
>=1.3.2for this repository's development workflow
bun install
bun run build
bun run typecheck
bun run test
bun run lint
bun run format:check