Modern.js For AI
Modern.js provides a toolkit for AI agents that makes your project agent-ready out of the box, helping you use AI to develop, upgrade, and migrate Modern.js applications more accurately and efficiently.
Bundled docs
Modern.js ships the English docs that match your installed version together with @modern-js/app-tools. After you install or upgrade, they live at node_modules/@modern-js/app-tools/docs/, available offline with no extra setup.
AI agents use them to get APIs, config, and conventions that exactly match your framework version, rather than relying on potentially outdated training data.
AGENTS.md
AGENTS.md gives AI coding agents project-level guidance — telling them to read the bundled docs before making changes and to follow Modern.js conventions. A CLAUDE.md is generated alongside it, reusing the same guidance for Claude Code via the @AGENTS.md import.
- New projects:
npx @modern-js/creategenerates both files by default; pass--no-agents-mdto skip them. - Existing projects: run
npx @modern-js/create agents-mdat the project root to create or update them. Re-run it any time; your own additions are preserved.
Modern.js only maintains the content inside the <!-- BEGIN:modernjs-agent-rules --> markers in AGENTS.md; anything you write outside them is left untouched.
llms.txt
llms.txt is an online documentation index following the llms.txt specification, auto-generated by @rspress/plugin-llms for AI tools to retrieve the full docs online:
- Index:
https://modernjs.dev/llms.txt - Full text:
https://modernjs.dev/llms-full.txt(large — fetch on demand)
Use it when you need content beyond the bundled docs — just let your agent retrieve it on demand, no need to copy docs into your project. Typical cases: looking up another framework version, a section not included in the bundle, or getting Modern.js information outside of a project (for example before a project exists, or when researching on its own).
Skills
Skills are on-demand AI capabilities following the Agent Skills open standard. User-facing Skills:
Skills are not force-installed or implicitly installed — you install them explicitly. RSC and micro-frontend setups are configuration or architecture decisions, not one-click
modernjs-feature-enableactions.
Installing Skills
Modern.js user-facing Skills live in the repo's root skills/ directory and follow the Agent Skills open standard. The recommended way is the standard skills CLI, installing straight from GitHub:
It installs the entire Skill directory (SKILL.md + scripts/ + references/) into the corresponding agent directory, ready to trigger there.
To pin a specific version, append
#<ref>(a tag, branch, or commit) to the repo — it installs the Skill as of that ref (replace<tag>with a release tag that contains this Skill):