|
| 1 | +--- |
| 2 | +title: Claude Code |
| 3 | +category: Integrations |
| 4 | +order: 7 |
| 5 | +--- |
| 6 | + |
| 7 | +import Link from "../../../../components/Link.jsx"; |
| 8 | + |
| 9 | +# Claude Code |
| 10 | + |
| 11 | +[Claude Code](https://docs.anthropic.com/en/docs/claude-code) is Anthropic's official CLI tool for AI-assisted coding. `@lazarv/react-server` provides an installable Claude Code skill that gives Claude deep knowledge of the runtime's APIs, conventions, and patterns — so you can build react-server applications using agentic coding. |
| 12 | + |
| 13 | +<Link name="install-skill"> |
| 14 | +## Install the skill |
| 15 | +</Link> |
| 16 | + |
| 17 | +Install the skill into your project using `npx skills`: |
| 18 | + |
| 19 | +```sh |
| 20 | +npx skills add lazarv/react-server |
| 21 | +``` |
| 22 | + |
| 23 | +This installs the `react-server` skill from the repository's `skills/` directory into your project's `.claude/skills/` folder. Once installed, the `/react-server` slash command becomes available in Claude Code. |
| 24 | + |
| 25 | +To install it globally so it's available across all your projects: |
| 26 | + |
| 27 | +```sh |
| 28 | +npx skills add lazarv/react-server --global |
| 29 | +``` |
| 30 | + |
| 31 | +<Link name="usage"> |
| 32 | +## Usage |
| 33 | +</Link> |
| 34 | + |
| 35 | +Start Claude Code in your project directory and use the `/react-server` slash command to give Claude the full context of the runtime. You can pass additional instructions as arguments: |
| 36 | + |
| 37 | +```sh |
| 38 | +# General react-server context |
| 39 | +/react-server |
| 40 | + |
| 41 | +# With specific instructions |
| 42 | +/react-server add a new /api/users route that returns a list of users from the database |
| 43 | + |
| 44 | +# Scaffold a new feature |
| 45 | +/react-server create a live component that streams stock prices |
| 46 | +``` |
| 47 | + |
| 48 | +The skill loads all core patterns, file-system router conventions, use directives, import paths, and component patterns into Claude's context automatically. |
| 49 | + |
| 50 | +<Link name="docs-as-context"> |
| 51 | +## Using docs as context |
| 52 | +</Link> |
| 53 | + |
| 54 | +Every page on this documentation site is also available as plain markdown. You can paste these URLs directly in a Claude Code conversation for detailed, up-to-date reference on specific features: |
| 55 | + |
| 56 | +| Topic | URL | |
| 57 | +|---|---| |
| 58 | +| Server Components | `https://react-server.dev/guide/server-components.md` | |
| 59 | +| Client Components | `https://react-server.dev/guide/client-components.md` | |
| 60 | +| Server Functions | `https://react-server.dev/guide/server-functions.md` | |
| 61 | +| File Router | `https://react-server.dev/router/file-router.md` | |
| 62 | +| Configuration | `https://react-server.dev/features/configuration.md` | |
| 63 | +| Caching | `https://react-server.dev/features/caching.md` | |
| 64 | +| HTTP | `https://react-server.dev/features/http.md` | |
| 65 | +| Live Components | `https://react-server.dev/features/live-components.md` | |
| 66 | +| Workers | `https://react-server.dev/features/workers.md` | |
| 67 | +| MCP | `https://react-server.dev/features/mcp.md` | |
| 68 | +| Error Handling | `https://react-server.dev/features/error-handling.md` | |
| 69 | +| API Routes | `https://react-server.dev/router/api-routes.md` | |
| 70 | +| Middlewares | `https://react-server.dev/router/middlewares.md` | |
| 71 | +| Outlets | `https://react-server.dev/router/outlets.md` | |
| 72 | +| CLI | `https://react-server.dev/features/cli.md` | |
| 73 | + |
| 74 | +<Link name="whats-included"> |
| 75 | +## What's included |
| 76 | +</Link> |
| 77 | + |
| 78 | +The skill provides Claude Code with comprehensive knowledge of: |
| 79 | + |
| 80 | +- **Use directives** — `"use client"`, `"use server"`, `"use live"`, `"use worker"`, `"use cache"`, `"use dynamic"`, `"use static"` and their semantics including inline (lexically scoped) usage |
| 81 | +- **File-system router** — page, layout, dynamic route, catch-all, outlet, middleware, API route, and MCP endpoint conventions |
| 82 | +- **Import paths** — all `@lazarv/react-server/*` subpath exports and their key APIs |
| 83 | +- **Component patterns** — server components, client components, server functions, live components, workers, and lexically scoped RSC with arbitrary server/client nesting |
| 84 | +- **HTTP hooks** — `useUrl`, `usePathname`, `headers`, `cookie`, `redirect`, `rewrite`, `status`, `after`, and more |
| 85 | +- **Caching** — response cache, in-memory cache, cache directive with TTL/tags/profiles, revalidation |
| 86 | +- **Configuration** — `defineConfig`, extension configs, mode-specific configs, JSON schema, env variables |
| 87 | +- **Navigation** — `Link`, `Refresh`, `ReactServerComponent`, programmatic navigation via `useClient` |
| 88 | +- **Error handling** — `ErrorBoundary` component and file-router error/loading conventions |
| 89 | +- **Deployment** — all 11 adapter targets (Vercel, Netlify, Cloudflare, AWS, Azure, Bun, Deno, Docker, Firebase, etc.) |
| 90 | +- **Advanced features** — micro-frontends with `RemoteComponent`, MCP server with `createServer`/`createTool`/`createResource`/`createPrompt`, MDX support |
| 91 | + |
| 92 | +<Link name="updating"> |
| 93 | +## Updating the skill |
| 94 | +</Link> |
| 95 | + |
| 96 | +To update to the latest version of the skill: |
| 97 | + |
| 98 | +```sh |
| 99 | +npx skills add lazarv/react-server |
| 100 | +``` |
| 101 | + |
| 102 | +The skill is maintained alongside the documentation and updated with each release. |
0 commit comments