Skip to content

Commit 06ded64

Browse files
royangerclaude
andcommitted
refactor(shared): recommend the Clerk plugin in AGENTS.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent e484e38 commit 06ded64

20 files changed

Lines changed: 208 additions & 211 deletions

File tree

‎.changeset/ship-sdk-agents-md.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
'@clerk/vue': patch
1717
---
1818

19-
Ship an `AGENTS.md` file in the package. It lists the current APIs for this version and how to use the Clerk MCP server, so AI coding agents can read it from `node_modules` instead of relying on outdated training data.
19+
Ship an `AGENTS.md` file in the package. It lists the current APIs for this version and recommends the Clerk plugin, so AI coding agents can read it from `node_modules` instead of relying on outdated training data.

‎.changeset/write-agents-md-in-dev.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
'@clerk/tanstack-react-start': minor
77
---
88

9-
When your app runs in development under an AI coding agent (such as Claude Code, Cursor, or GitHub Copilot), Clerk now adds a Clerk section to the project's root `AGENTS.md`, creating the file if needed, plus a `CLAUDE.md` that imports it when none exists. The section tells the agent to read `node_modules/@clerk/<sdk>/AGENTS.md` before writing auth code and points it to the Clerk MCP server. Nothing is written in production or CI. The section is written by the Astro and Nuxt dev servers, the Expo config plugin, the first `auth()` call in Next.js, and TanStack React Start's `clerkMiddleware()`.
9+
When your app runs in development under an AI coding agent (such as Claude Code, Cursor, or GitHub Copilot), Clerk now adds a Clerk section to the project's root `AGENTS.md`, creating the file if needed, plus a `CLAUDE.md` that imports it when none exists. The section tells the agent to read `node_modules/@clerk/<sdk>/AGENTS.md` before writing auth code and recommends the Clerk plugin (`npx plugins add clerk/skills`). Nothing is written in production or CI. The section is written by the Astro and Nuxt dev servers, the Expo config plugin, the first `auth()` call in Next.js, and TanStack React Start's `clerkMiddleware()`.

‎packages/astro/AGENTS.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ Read the installed `@clerk/astro` types before changing auth code. If a symbol i
1212
- The `as` prop was removed from `<SignInButton>`, `<SignUpButton>`, and `<SignOutButton>`. Use `asChild` with a child element.
1313
- Clerk Elements is removed. Never use it.
1414

15-
<!-- BEGIN:clerk-mcp -->
15+
<!-- BEGIN:clerk-plugin -->
1616

17-
### Clerk MCP server
17+
### Clerk plugin
1818

19-
Use this section when a `clerk` MCP server (`https://mcp.clerk.com/mcp`) is connected. If it is not connected, tell the user they can add it:
20-
https://clerk.com/docs/guides/ai/mcp/clerk-mcp-server
19+
The Clerk plugin gives agents Clerk's skills and MCP server. If it is not installed, tell the user they can install it. Do not run the command yourself:
2120

22-
The server lists its own tools and describes what each one does. Follow these rules on top of those descriptions:
21+
```sh
22+
npx plugins add clerk/skills
23+
```
2324

24-
- Get Clerk code from the SDK snippet tools (`list_clerk_sdk_snippets`, `clerk_sdk_snippet`) instead of writing it from memory.
25-
- Check every import in a snippet against the installed `@clerk/astro` types. If they disagree, the installed types win.
26-
- Read the current application and instance config before you change anything.
27-
- Ask the user before calling any Clerk MCP tool that creates or changes something in their Clerk account. Run config changes as a dry run first and show the user the result.
28-
- The server never returns secret keys. Do not ask the user to paste one into chat. Point them to https://dashboard.clerk.com/~/api-keys.
25+
Install steps for each tool: https://clerk.com/docs/guides/ai/overview
26+
Source: https://github.com/clerk/skills
27+
28+
Ask the user before calling any Clerk tool that creates or changes something in their Clerk account.
2929

3030
### Docs
3131

3232
Start at https://clerk.com/docs/llms.txt. Add `.md` to any docs URL to get Markdown.
3333

34-
<!-- END:clerk-mcp -->
34+
<!-- END:clerk-plugin -->

‎packages/backend/AGENTS.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ Read the installed `@clerk/backend` types before changing auth code. If a symbol
1010
- Verify webhooks with `verifyWebhook(request)` from `@clerk/backend/webhooks`. It reads `CLERK_WEBHOOK_SIGNING_SECRET` by default.
1111
- Clerk Elements is removed. Never use it.
1212

13-
<!-- BEGIN:clerk-mcp -->
13+
<!-- BEGIN:clerk-plugin -->
1414

15-
### Clerk MCP server
15+
### Clerk plugin
1616

17-
Use this section when a `clerk` MCP server (`https://mcp.clerk.com/mcp`) is connected. If it is not connected, tell the user they can add it:
18-
https://clerk.com/docs/guides/ai/mcp/clerk-mcp-server
17+
The Clerk plugin gives agents Clerk's skills and MCP server. If it is not installed, tell the user they can install it. Do not run the command yourself:
1918

20-
The server lists its own tools and describes what each one does. Follow these rules on top of those descriptions:
19+
```sh
20+
npx plugins add clerk/skills
21+
```
2122

22-
- Get Clerk code from the SDK snippet tools (`list_clerk_sdk_snippets`, `clerk_sdk_snippet`) instead of writing it from memory.
23-
- Check every import in a snippet against the installed `@clerk/backend` types. If they disagree, the installed types win.
24-
- Read the current application and instance config before you change anything.
25-
- Ask the user before calling any Clerk MCP tool that creates or changes something in their Clerk account. Run config changes as a dry run first and show the user the result.
26-
- The server never returns secret keys. Do not ask the user to paste one into chat. Point them to https://dashboard.clerk.com/~/api-keys.
23+
Install steps for each tool: https://clerk.com/docs/guides/ai/overview
24+
Source: https://github.com/clerk/skills
25+
26+
Ask the user before calling any Clerk tool that creates or changes something in their Clerk account.
2727

2828
### Docs
2929

3030
Start at https://clerk.com/docs/llms.txt. Add `.md` to any docs URL to get Markdown.
3131

32-
<!-- END:clerk-mcp -->
32+
<!-- END:clerk-plugin -->

‎packages/chrome-extension/AGENTS.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ Read the installed `@clerk/chrome-extension` types before changing auth code. If
1111
- The root `useSignIn()` and `useSignUp()` are the Core 3 hooks. The old `isLoaded`-style hooks are in `@clerk/chrome-extension/legacy`.
1212
- Clerk Elements is removed. Never use it.
1313

14-
<!-- BEGIN:clerk-mcp -->
14+
<!-- BEGIN:clerk-plugin -->
1515

16-
### Clerk MCP server
16+
### Clerk plugin
1717

18-
Use this section when a `clerk` MCP server (`https://mcp.clerk.com/mcp`) is connected. If it is not connected, tell the user they can add it:
19-
https://clerk.com/docs/guides/ai/mcp/clerk-mcp-server
18+
The Clerk plugin gives agents Clerk's skills and MCP server. If it is not installed, tell the user they can install it. Do not run the command yourself:
2019

21-
The server lists its own tools and describes what each one does. Follow these rules on top of those descriptions:
20+
```sh
21+
npx plugins add clerk/skills
22+
```
2223

23-
- Get Clerk code from the SDK snippet tools (`list_clerk_sdk_snippets`, `clerk_sdk_snippet`) instead of writing it from memory.
24-
- Check every import in a snippet against the installed `@clerk/chrome-extension` types. If they disagree, the installed types win.
25-
- Read the current application and instance config before you change anything.
26-
- Ask the user before calling any Clerk MCP tool that creates or changes something in their Clerk account. Run config changes as a dry run first and show the user the result.
27-
- The server never returns secret keys. Do not ask the user to paste one into chat. Point them to https://dashboard.clerk.com/~/api-keys.
24+
Install steps for each tool: https://clerk.com/docs/guides/ai/overview
25+
Source: https://github.com/clerk/skills
26+
27+
Ask the user before calling any Clerk tool that creates or changes something in their Clerk account.
2828

2929
### Docs
3030

3131
Start at https://clerk.com/docs/llms.txt. Add `.md` to any docs URL to get Markdown.
3232

33-
<!-- END:clerk-mcp -->
33+
<!-- END:clerk-plugin -->

‎packages/clerk-js/AGENTS.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ Read the installed `@clerk/clerk-js` types before changing auth code. If a symbo
1111
- `session.getToken()` throws `ClerkOfflineError` when offline. It no longer returns `null`.
1212
- Clerk Elements is removed. Never use it.
1313

14-
<!-- BEGIN:clerk-mcp -->
14+
<!-- BEGIN:clerk-plugin -->
1515

16-
### Clerk MCP server
16+
### Clerk plugin
1717

18-
Use this section when a `clerk` MCP server (`https://mcp.clerk.com/mcp`) is connected. If it is not connected, tell the user they can add it:
19-
https://clerk.com/docs/guides/ai/mcp/clerk-mcp-server
18+
The Clerk plugin gives agents Clerk's skills and MCP server. If it is not installed, tell the user they can install it. Do not run the command yourself:
2019

21-
The server lists its own tools and describes what each one does. Follow these rules on top of those descriptions:
20+
```sh
21+
npx plugins add clerk/skills
22+
```
2223

23-
- Get Clerk code from the SDK snippet tools (`list_clerk_sdk_snippets`, `clerk_sdk_snippet`) instead of writing it from memory.
24-
- Check every import in a snippet against the installed `@clerk/clerk-js` types. If they disagree, the installed types win.
25-
- Read the current application and instance config before you change anything.
26-
- Ask the user before calling any Clerk MCP tool that creates or changes something in their Clerk account. Run config changes as a dry run first and show the user the result.
27-
- The server never returns secret keys. Do not ask the user to paste one into chat. Point them to https://dashboard.clerk.com/~/api-keys.
24+
Install steps for each tool: https://clerk.com/docs/guides/ai/overview
25+
Source: https://github.com/clerk/skills
26+
27+
Ask the user before calling any Clerk tool that creates or changes something in their Clerk account.
2828

2929
### Docs
3030

3131
Start at https://clerk.com/docs/llms.txt. Add `.md` to any docs URL to get Markdown.
3232

33-
<!-- END:clerk-mcp -->
33+
<!-- END:clerk-plugin -->

‎packages/electron/AGENTS.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ Read the installed `@clerk/electron` types before changing auth code. If a symbo
1111
- For passkeys, pass `passkeys` from `@clerk/electron/passkeys` to `ClerkProvider`.
1212
- Clerk Elements is removed. Never use it.
1313

14-
<!-- BEGIN:clerk-mcp -->
14+
<!-- BEGIN:clerk-plugin -->
1515

16-
### Clerk MCP server
16+
### Clerk plugin
1717

18-
Use this section when a `clerk` MCP server (`https://mcp.clerk.com/mcp`) is connected. If it is not connected, tell the user they can add it:
19-
https://clerk.com/docs/guides/ai/mcp/clerk-mcp-server
18+
The Clerk plugin gives agents Clerk's skills and MCP server. If it is not installed, tell the user they can install it. Do not run the command yourself:
2019

21-
The server lists its own tools and describes what each one does. Follow these rules on top of those descriptions:
20+
```sh
21+
npx plugins add clerk/skills
22+
```
2223

23-
- Get Clerk code from the SDK snippet tools (`list_clerk_sdk_snippets`, `clerk_sdk_snippet`) instead of writing it from memory.
24-
- Check every import in a snippet against the installed `@clerk/electron` types. If they disagree, the installed types win.
25-
- Read the current application and instance config before you change anything.
26-
- Ask the user before calling any Clerk MCP tool that creates or changes something in their Clerk account. Run config changes as a dry run first and show the user the result.
27-
- The server never returns secret keys. Do not ask the user to paste one into chat. Point them to https://dashboard.clerk.com/~/api-keys.
24+
Install steps for each tool: https://clerk.com/docs/guides/ai/overview
25+
Source: https://github.com/clerk/skills
26+
27+
Ask the user before calling any Clerk tool that creates or changes something in their Clerk account.
2828

2929
### Docs
3030

3131
Start at https://clerk.com/docs/llms.txt. Add `.md` to any docs URL to get Markdown.
3232

33-
<!-- END:clerk-mcp -->
33+
<!-- END:clerk-plugin -->

‎packages/expo/AGENTS.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ Read the installed `@clerk/expo` types before changing auth code. If a symbol is
1212
- `<SignedIn>`, `<SignedOut>`, and `<Protect>` were removed. Use `<Show when="signed-in">` or `<Show when="signed-out">`.
1313
- Clerk Elements is removed. Never use it.
1414

15-
<!-- BEGIN:clerk-mcp -->
15+
<!-- BEGIN:clerk-plugin -->
1616

17-
### Clerk MCP server
17+
### Clerk plugin
1818

19-
Use this section when a `clerk` MCP server (`https://mcp.clerk.com/mcp`) is connected. If it is not connected, tell the user they can add it:
20-
https://clerk.com/docs/guides/ai/mcp/clerk-mcp-server
19+
The Clerk plugin gives agents Clerk's skills and MCP server. If it is not installed, tell the user they can install it. Do not run the command yourself:
2120

22-
The server lists its own tools and describes what each one does. Follow these rules on top of those descriptions:
21+
```sh
22+
npx plugins add clerk/skills
23+
```
2324

24-
- Get Clerk code from the SDK snippet tools (`list_clerk_sdk_snippets`, `clerk_sdk_snippet`) instead of writing it from memory.
25-
- Check every import in a snippet against the installed `@clerk/expo` types. If they disagree, the installed types win.
26-
- Read the current application and instance config before you change anything.
27-
- Ask the user before calling any Clerk MCP tool that creates or changes something in their Clerk account. Run config changes as a dry run first and show the user the result.
28-
- The server never returns secret keys. Do not ask the user to paste one into chat. Point them to https://dashboard.clerk.com/~/api-keys.
25+
Install steps for each tool: https://clerk.com/docs/guides/ai/overview
26+
Source: https://github.com/clerk/skills
27+
28+
Ask the user before calling any Clerk tool that creates or changes something in their Clerk account.
2929

3030
### Docs
3131

3232
Start at https://clerk.com/docs/llms.txt. Add `.md` to any docs URL to get Markdown.
3333

34-
<!-- END:clerk-mcp -->
34+
<!-- END:clerk-plugin -->
3535

3636
## Contributing to @clerk/expo
3737

‎packages/express/AGENTS.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ Read the installed `@clerk/express` types before changing auth code. If a symbol
1212
- Verify webhooks with `verifyWebhook(req)` from `@clerk/express/webhooks`.
1313
- Clerk Elements is removed. Never use it.
1414

15-
<!-- BEGIN:clerk-mcp -->
15+
<!-- BEGIN:clerk-plugin -->
1616

17-
### Clerk MCP server
17+
### Clerk plugin
1818

19-
Use this section when a `clerk` MCP server (`https://mcp.clerk.com/mcp`) is connected. If it is not connected, tell the user they can add it:
20-
https://clerk.com/docs/guides/ai/mcp/clerk-mcp-server
19+
The Clerk plugin gives agents Clerk's skills and MCP server. If it is not installed, tell the user they can install it. Do not run the command yourself:
2120

22-
The server lists its own tools and describes what each one does. Follow these rules on top of those descriptions:
21+
```sh
22+
npx plugins add clerk/skills
23+
```
2324

24-
- Get Clerk code from the SDK snippet tools (`list_clerk_sdk_snippets`, `clerk_sdk_snippet`) instead of writing it from memory.
25-
- Check every import in a snippet against the installed `@clerk/express` types. If they disagree, the installed types win.
26-
- Read the current application and instance config before you change anything.
27-
- Ask the user before calling any Clerk MCP tool that creates or changes something in their Clerk account. Run config changes as a dry run first and show the user the result.
28-
- The server never returns secret keys. Do not ask the user to paste one into chat. Point them to https://dashboard.clerk.com/~/api-keys.
25+
Install steps for each tool: https://clerk.com/docs/guides/ai/overview
26+
Source: https://github.com/clerk/skills
27+
28+
Ask the user before calling any Clerk tool that creates or changes something in their Clerk account.
2929

3030
### Docs
3131

3232
Start at https://clerk.com/docs/llms.txt. Add `.md` to any docs URL to get Markdown.
3333

34-
<!-- END:clerk-mcp -->
34+
<!-- END:clerk-plugin -->

‎packages/fastify/AGENTS.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ Read the installed `@clerk/fastify` types before changing auth code. If a symbol
1111
- Verify webhooks with `verifyWebhook(req)` from `@clerk/fastify/webhooks`.
1212
- Clerk Elements is removed. Never use it.
1313

14-
<!-- BEGIN:clerk-mcp -->
14+
<!-- BEGIN:clerk-plugin -->
1515

16-
### Clerk MCP server
16+
### Clerk plugin
1717

18-
Use this section when a `clerk` MCP server (`https://mcp.clerk.com/mcp`) is connected. If it is not connected, tell the user they can add it:
19-
https://clerk.com/docs/guides/ai/mcp/clerk-mcp-server
18+
The Clerk plugin gives agents Clerk's skills and MCP server. If it is not installed, tell the user they can install it. Do not run the command yourself:
2019

21-
The server lists its own tools and describes what each one does. Follow these rules on top of those descriptions:
20+
```sh
21+
npx plugins add clerk/skills
22+
```
2223

23-
- Get Clerk code from the SDK snippet tools (`list_clerk_sdk_snippets`, `clerk_sdk_snippet`) instead of writing it from memory.
24-
- Check every import in a snippet against the installed `@clerk/fastify` types. If they disagree, the installed types win.
25-
- Read the current application and instance config before you change anything.
26-
- Ask the user before calling any Clerk MCP tool that creates or changes something in their Clerk account. Run config changes as a dry run first and show the user the result.
27-
- The server never returns secret keys. Do not ask the user to paste one into chat. Point them to https://dashboard.clerk.com/~/api-keys.
24+
Install steps for each tool: https://clerk.com/docs/guides/ai/overview
25+
Source: https://github.com/clerk/skills
26+
27+
Ask the user before calling any Clerk tool that creates or changes something in their Clerk account.
2828

2929
### Docs
3030

3131
Start at https://clerk.com/docs/llms.txt. Add `.md` to any docs URL to get Markdown.
3232

33-
<!-- END:clerk-mcp -->
33+
<!-- END:clerk-plugin -->

0 commit comments

Comments
 (0)