# Use with AI

> Give coding assistants the current Laravel Rest Api docs with the Laravel Boost skill, llms.txt, Markdown copies of every page, GitMCP and Context7.

Laravel Rest Api 3 changed most of the API of 2.x: typed fields, new payload keys, new endpoints. A coding assistant that learned from older code can write 2.x classes or payloads. The sources on this page give it the current documentation.

## Laravel Boost skill

The package ships a skill for [Laravel Boost](https://laravel.com/docs/boost): a `SKILL.md` file that a coding agent loads when it works on your resources, controllers, actions and metrics, or writes client payloads for the endpoints.

### Installing the skill

The skill is named `laravel-rest-api`. It lives in the package at `resources/boost/skills/laravel-rest-api/SKILL.md`, so Laravel Boost finds it in `vendor/lomkit/laravel-rest-api` once both packages are installed:

```bash
composer require laravel/boost --dev
php artisan boost:install
```

Select the skill during the installation. After an update of the package, run `php artisan boost:update` so that the agent reads the skill of the installed version. See the [Laravel Boost documentation](https://laravel.com/docs/boost) for its commands and for replacing a package skill with your own.

### What the skill covers

The skill applies when a task touches the `Lomkit\Rest\` namespace, the `Rest` facade, the `rest:*` commands, or the `app/Rest/Resources` and `app/Rest/Controllers` directories. It describes:

- the resource, the controller and `Rest::resource()`, with the routes of each endpoint;
- the payloads of `details`, `search`, `mutate`, actions and metrics, with their limits and the exact form of their entries;
- typed fields, relations, scopes, instructions, the text search and the search engines;
- the authorization model: the checks before validation, the row checks, gates and the decision cache;
- the OpenAPI document, Precognition and the Artisan commands;
- the conventions to keep: declare what you expose, and prefer an action or an instruction to a custom controller method.

## llms.txt and Markdown pages

The site publishes its pages in formats that assistants read directly:

<table>
<thead>
  <tr>
    <th>
      URL
    </th>
    
    <th>
      Content
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a href="https://laravel-rest-api.lomkit.com/llms.txt" rel="nofollow">
        <code>
          /llms.txt
        </code>
      </a>
    </td>
    
    <td>
      The list of every 3.x page, with a description and a link to its Markdown copy
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://laravel-rest-api.lomkit.com/llms-full.txt" rel="nofollow">
        <code>
          /llms-full.txt
        </code>
      </a>
    </td>
    
    <td>
      Every 3.x page in one Markdown file
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        /raw/<page>.md
      </code>
    </td>
    
    <td>
      The Markdown copy of one page, such as <a href="https://laravel-rest-api.lomkit.com/raw/search/filters.md" rel="nofollow">
        <code>
          /raw/search/filters.md
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

Neither file includes the 2.x pages. Give an assistant `llms.txt` and let it open the pages it needs, or give it `llms-full.txt` when it can read a long file.

The **Copy page** button at the top of each page copies its Markdown. Its menu copies the link to the Markdown copy, opens it, or opens ChatGPT or Claude with a prompt that points to it.

## GitMCP

[GitMCP](https://gitmcp.io) serves a GitHub project as a remote MCP server. Its address for this site, `https://lomkit.gitmcp.io/laravel-rest-api-doc`, reads the `llms.txt` of the site, and its tools let the assistant fetch the Markdown copy of any page. Add the server to your assistant:

<code-group>

```bash [Claude Code]
claude mcp add --transport http laravel-rest-api https://lomkit.gitmcp.io/laravel-rest-api-doc
```

```json [Cursor: .cursor/mcp.json]
{
  "mcpServers": {
    "laravel-rest-api": {
      "url": "https://lomkit.gitmcp.io/laravel-rest-api-doc"
    }
  }
}
```

```json [VS Code: .vscode/mcp.json]
{
  "servers": {
    "laravel-rest-api": {
      "type": "http",
      "url": "https://lomkit.gitmcp.io/laravel-rest-api-doc"
    }
  }
}
```

</code-group>

The server offers these tools: `fetch_laravel_rest_docs`, `search_laravel_rest_docs`, `search_laravel_rest_code` and `fetch_generic_url_content`. The last one opens the links of `llms.txt`, such as the Markdown copy of each page.

## Context7

[Context7](https://context7.com) indexes the documentation of libraries and serves it to coding assistants through its MCP server and its `ctx7` command. Laravel Rest Api is listed as [`/lomkit/laravel-rest-api-doc`](https://context7.com/lomkit/laravel-rest-api-doc), which indexes the 3.x pages of this site. Set it up with `npx ctx7 setup`, then name the library in your prompt:

```txt
Add a search filter on the category of a product. use library /lomkit/laravel-rest-api-doc
```

<style>

html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}

</style>

---

- [Laravel Boost](https://laravel.com/docs/boost)
