> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frontic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Project Context

When you work against Frontic from your editor, everything Frontic knows about your project can flow into your local setup - **the typed API surface, the rules and skills that guide your agent, and the tools your agent can call on your behalf.** That's your project context in the editor: one cohesive view of the Frontic project your code is being written against.

This page is the concept. The [Frontic CLI](https://docs.frontic.com/ide/frontic-cli.md) and [MCP Tools](https://docs.frontic.com/ide/mcp-tools.md) pages cover the mechanics.

## What flows into the editor

> [card] Typed Client SDK
>
> A generated JavaScript client that matches your project's current API - every block, listing, and page as a typed method. Written to `.frontic/` by `frontic generate`, imported by your frontend code at runtime.

> [card] Rules
>
> **Context Rules**, one file per rule, synced to `.claude/rules/` by `frontic context init`. With `--profile studio` or `--profile designer`, that surface's **Project Rules** land in `.claude/CLAUDE.md` too. See [Choosing a profile](https://docs.frontic.com/ide/frontic-cli.md#choosing-a-profile).

> [card] Skills
>
> Reusable task patterns your team has captured - "build a category page", "wire up a new locale". Your editor agent picks a matching skill when the task shape fits. Synced alongside the rules.

> [card] MCP tools
>
> Live access to your Frontic project - your agent can read configuration, inspect Data Storages, create or update blocks / listings / pages, and query the Frontic docs. Wired via `frontic mcp init`.

## How it fits together

Three commands set everything up, each touching a different surface:

**1. Generate the typed SDK**

`frontic generate` pulls the current API and writes the typed client into `.frontic/`. The client is the contract between your frontend code and the Frontic API at the version you targeted. Regenerate whenever the project's API surface changes.

**2. Sync rules and skills**

`frontic context init` pulls Skills and Context Rules from Frontic and writes them into your repo. Safe to re-run - when nothing changed in Frontic, your rule files are left alone. `--force` overwrites local edits.

**3. Wire up MCP**

`frontic mcp init --client <name>` adds the Frontic project MCP and the Frontic Docs MCP to your editor's MCP config. Your agent can now act on your project live and query the docs as it works.

## Who reads what

* **Your editor agent** (Claude Code, Cursor, any MCP-compatible client) reads the synced rules and skills on every session and calls MCP tools when it needs project state. It writes frontend code using the typed SDK.
* **Your frontend code** imports the typed SDK at runtime - no rules or skills involved, just a contract against the API.

## Staying in sync

Run these commands **locally, not in CI** - the committed output is your stable contract. When the API surface changes (new block, renamed field, adjusted filter), run `frontic generate` against `develop`, typecheck against the regenerated client, and commit it alongside the code that uses it. When Rules or Skills change in the Context Base, run `frontic context init` and commit the updated files. Teammates and CI read what you committed; nothing is regenerated on their side.

## Related

> [card] [Frontic CLI](https://docs.frontic.com/ide/frontic-cli.md)
>
> Install, log in, generate the SDK, sync the Context Base, wire up MCP.

> [card] [MCP Tools](https://docs.frontic.com/ide/mcp-tools.md)
>
> Full configuration for Claude Code, Cursor, and other MCP-compatible clients.

> [card] [Context Base](https://docs.frontic.com/context-base/overview.md)
>
> The source of truth for Rules and Skills that sync into your editor.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.