@midwayjs/skill-midway
v4.2.1
Published
Midway official skill package with knowledge bundle generator and query helpers
Readme
@midwayjs/skill-midway
Midway official skill package.
This package provides three things:
- a bundle builder for Midway docs, API, packages, and changelog data
- a packaged bundle plus lookup commands that query it in structured JSON
- a bundled Midway prompt/skill artifact that can be installed into multiple AI products
Install
Add the package to your project:
pnpm add -D @midwayjs/skill-midwayThen run commands through pnpm exec:
pnpm exec midway-skill --helpBuild The Bundle
Generate the local Midway knowledge bundle from the repository docs and current API data:
pnpm exec midway-skill buildBy default this writes to:
site/.midway-skillIt also syncs the generated bundle into the package-local publish directory:
packages/skill-midway/bundleThat package-local bundle is what gets shipped with the published npm package.
You can override the paths if needed:
pnpm exec midway-skill build \
--repo-root /path/to/midway \
--site-root /path/to/midway/site \
--output /path/to/outputQuery The Bundle
All lookup commands return JSON on stdout so they can be consumed by agents or scripts.
When the package contains a bundled snapshot, lookup commands read that packaged bundle first.
In the Midway source repository, you can still point them at site/.midway-skill explicitly with --bundle-root.
Resolve the requested Midway version first:
pnpm exec midway-skill resolve-version 3.20.12Lookup docs:
pnpm exec midway-skill lookup-docs --query "mcp"
pnpm exec midway-skill lookup-docs --query "configuration" --locale enLookup API symbols:
pnpm exec midway-skill lookup-api --symbol "Configuration"
pnpm exec midway-skill lookup-api --symbol "MidwayMCPFramework" --package "@midwayjs/mcp"Lookup package metadata:
pnpm exec midway-skill lookup-packages --query "mcp"Lookup changelog entries:
pnpm exec midway-skill lookup-changelog --package "@midwayjs/mcp"
pnpm exec midway-skill lookup-changelog --from-version 4.0.0 --to-version 4.0.1Install For AI Products
Install the bundled Midway artifact into the current project for a specific product:
pnpm exec midway-skill install --target codex
pnpm exec midway-skill install --target cursor
pnpm exec midway-skill install --target traeYou can also install all supported targets at once:
pnpm exec midway-skill install --target allBy default installation is project-scoped and writes under the current working directory. Examples:
<project-root>/.codex/skills/midway/SKILL.md
<project-root>/.cursor/commands/opsx-midway.md
<project-root>/.trae/skills/midway/SKILL.mdThis keeps the installed skill version aligned with the project's @midwayjs/skill-midway version.
You can still override the destination directory when needed:
pnpm exec midway-skill install --target codex --dest /path/to/projectTo overwrite an existing installed skill:
pnpm exec midway-skill update --target codex
pnpm exec midway-skill update --target allSupported targets currently include:
amazon-q
antigravity
auggie
claude
cline
codebuddy
codex
continue
costrict
crush
cursor
factory
gemini
github-copilot
iflow
kilocode
kiro
opencode
pi
qoder
qwen
roocode
trae
windsurfVersion Behavior
- current major:
docs + api + changelog - historical majors:
docs + changelog - historical API lookups are not guaranteed and will return empty results when API capability is unavailable
Use resolve-version before answering version-sensitive questions so the caller can see whether the result was exact or a major-version fallback.
