---
title: "Agent files"
description: "The files init writes for coding agents: the AGENTS.md section between its markers, the developer MCP server in .mcp.json, and the skill copies in .agents/skills. How each merges into what you have, the flags that skip or refresh them, and Convex's own agent tooling."
canonical_url: "https://nuxt-backend.dev/docs/develop/agents/agent-files"
---
# Agent files

> The files init writes for coding agents: the AGENTS.md section between its markers, the developer MCP server in .mcp.json, and the skill copies in .agents/skills. How each merges into what you have, the flags that skip or refresh them, and Convex's own agent tooling.

Version: nuxt-backend 0.6.x · Tab: Develop · Kind: reference · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

- [Source](https://github.com/qruto/nuxt-backend/blob/main/src/agents.ts)

`npx nuxt-backend init` writes three things for coding agents next to the scaffold, and the [starter template](https://nuxt-backend.dev/docs/start/templates) ships them. Each one points an agent at guidance and tools for the version the app installed, and none of them overwrites what you wrote yourself.

<table>
<thead>
  <tr>
    <th>
      File
    </th>
    
    <th>
      What it holds
    </th>
    
    <th>
      Read by
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        AGENTS.md
      </code>
    </td>
    
    <td>
      A <code>
        nuxt-backend
      </code>
      
       section: the installed version, where its skills are, the rules, the commands, the env and where the docs are
    </td>
    
    <td>
      Codex, Cursor, Copilot and most agents; Claude Code through <code>
        @AGENTS.md
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        .mcp.json
      </code>
    </td>
    
    <td>
      One server, the <a href="https://nuxt-backend.dev/docs/develop/agents/developer-mcp">
        developer MCP server
      </a>
      
      : <code>
        npx nuxt-backend mcp
      </code>
      
      , for your project's state, the docs and your providers' consoles, Convex's included
    </td>
    
    <td>
      Claude Code, and any agent that reads the project's MCP servers
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        .agents/skills/
      </code>
    </td>
    
    <td>
      A copy of every skill the installed version ships, linked from <code>
        .claude/skills/
      </code>
      
       in a project that uses Claude Code
    </td>
    
    <td>
      The skills CLI's layout, which most agents read
    </td>
  </tr>
</tbody>
</table>

## What `init` writes

- **AGENTS.md**: a short `nuxt-backend` section between `<!-- nuxt-backend-start -->` and `<!-- nuxt-backend-end -->` markers. It names the installed version, points at the skills in `node_modules`, the core first, and covers the rules, the commands, the env and where the docs are. The starter template ships it without a version, since it installs the latest.

  - A missing file is created.
  - An existing one without the markers gets the section appended, and nothing else changes.
  - Once the markers exist, `init` leaves the file alone. `init --force` replaces only what sits between them.
- **.mcp.json**: a `nuxt-backend` server that runs `npx nuxt-backend mcp`.

  - The server runs on `@modelcontextprotocol/sdk`, an optional peer. If your `package.json` doesn't list it, `init` adds it to `devDependencies`, and `npm install` links it.
  - A missing file is created.
  - An existing one gains the `nuxt-backend` server only when it has none, keeping its indentation and every other server.
  - A `convex` server an earlier version wrote stays, and `init` says you can remove it: the developer server passes Convex's tools through.
  - A file that is not valid JSON is left alone with a warning.
- **.agents/skills/**: a copy of every skill the installed version ships, where the skills CLI installs skills and most agents look for them. In a project that uses Claude Code (a `.claude/` folder or a `CLAUDE.md`), each skill is linked from `.claude/skills/` too, as the skills CLI links it.

  - A missing skill is copied.
  - A copy another version wrote, or one of a skill the installed version no longer ships, is left alone with a note: `init --agents`, or `init --force`, replaces it whole or removes it.
  - A skill the project's `skills-lock.json` lists came from the skills CLI, and `init` leaves it to that CLI, which restores and updates it.
  - Commit the copies or ignore them, as you do your other agent files.
  - pnpm 12 links the skills a dependency ships once you approve them. nuxt-backend's are these same skills, and an approval shows your agent each one twice, so under pnpm 12.11 or later `init` denies them: it adds `skills: false` for nuxt-backend under `permissions` in `pnpm-workspace.yaml`, as `pnpm approve '!nuxt-backend'` would.

What `init` writes in `.mcp.json`:

```json [.mcp.json]
{
  "mcpServers": {
    "nuxt-backend": {
      "command": "npx",
      "args": ["nuxt-backend", "mcp"]
    }
  }
}
```

Claude Code reads `CLAUDE.md` and follows `AGENTS.md` only when `CLAUDE.md` imports it. When your `CLAUDE.md` does not mention `AGENTS.md`, `init` says to add an `@AGENTS.md` line. It never edits that file.

A file whose markers don't pair up is left alone, by `init` and `init --agents` alike: fix the markers by hand. `init` says so and exits with `1`.

## Flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      What it does to the agent files
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      none
    </td>
    
    <td>
      Writes what is missing, as above, and leaves the rest
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --no-agents
      </code>
    </td>
    
    <td>
      Writes none of them
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --agents
      </code>
    </td>
    
    <td>
      Rewrites only these three, for the installed version: the section of <code>
        AGENTS.md
      </code>
      
       is replaced and the text around it stays, the <code>
        nuxt-backend
      </code>
      
       server in <code>
        .mcp.json
      </code>
      
       and the skill copies become the installed version's, the MCP SDK joins <code>
        devDependencies
      </code>
      
       when it is missing, and nothing else is scaffolded
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --force
      </code>
    </td>
    
    <td>
      Overwrites the scaffold files too, and for the agent files replaces the section between its markers and the skill copies another version wrote, as <code>
        --agents
      </code>
      
       does
    </td>
  </tr>
</tbody>
</table>

Run `init --agents` after [`nuxt-backend upgrade`](https://nuxt-backend.dev/docs/reference/cli#upgrade), which reads the version the section names (its `next` lists `init --agents`). `init --json` lists, under `skills`, the ones it `installed`, `refreshed` and `removed`, and the `stale` ones it left. Every flag is in the [CLI reference](https://nuxt-backend.dev/docs/reference/cli#init).

## Checked by `doctor`

`doctor` reports an [`agent-files`](https://nuxt-backend.dev/docs/reference/cli/diagnostics#agent-files) warning while the section is missing or was written for another version, and while a skill copy differs from the installed version's or is one it no longer ships. Skills the project lacks don't warn: agents find every one in `node_modules`.

## Convex's own tooling

Inside `backend/`, the rules are Convex's. `npx convex ai-files install` writes Convex's guidelines for agents, which the developer server's Convex tools work alongside.

## Related

- [Build with a coding agent](https://nuxt-backend.dev/docs/develop/agents): the skills these files point at, and keeping them current.
- [Developer MCP server](https://nuxt-backend.dev/docs/develop/agents/developer-mcp): what the server in `.mcp.json` does.
- [Project files](https://nuxt-backend.dev/docs/reference/configuration/project-files): every file `init` writes, agent files included.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
