---
title: Scaffolding & agents
description: npm create @tmonier/effract drops effract into an existing app — framework-detected, idempotent, and it teaches your coding agent.
group: Start
order: 2
---

The fastest way into effract — and the one that also **teaches your coding agent** — is the scaffolder,
`@tmonier/create-effract`. It is non-interactive and idempotent, so it is safe to run (and re-run) in an
existing project.

```bash
npm create @tmonier/effract
# or, non-interactively in CI or from an agent:
npx @tmonier/create-effract --yes
```

## What it does

1. **Detects your framework** — Vite, Next, or TanStack Start — from your `package.json`, and tailors the
   scaffold to it.
2. **Drops an `AGENTS.md` fragment** between `<!-- BEGIN:effract -->` / `<!-- END:effract -->` markers
   (creating `AGENTS.md`, or appending to yours). The fragment points your agent at the version-matched
   docs bundled in the package and states the REC rules it would otherwise get wrong — chiefly that
   **a REC is not a JSX element** (`{yield* Child}`, never `<Child />`).
3. **Writes a first example** — a service + REC + `mount` in `src/effract-example.tsx` — but only if one
   isn't there yet.

Re-running is a **no-op by construction**: the `AGENTS.md` fragment is rewritten in place between its
markers (your other content is untouched), and the example is never duplicated.

Flags: `--yes` / `-y` (assume yes), `--dir <path>` (target a directory other than the cwd).

## Why an `AGENTS.md` fragment

Your coding agent's training data predates effract, so left alone it will reach for its React priors and
write `<Dashboard />` for a REC — a compile error. The fragment is a small, marker-delimited block that
redirects the agent to the **bundled, version-matched docs** (`node_modules/@tmonier/effract/docs/` —
start with `patterns.md`) so the reference it codes against always matches the installed version. See
[Built for agents](/docs/built-for-agents/) for the whole agent-readiness story.

## The installable skill

Beyond the scaffold, effract ships an [agentskills.io](https://agentskills.io) **skill** — scaffold a
service + REC, decide client-island-vs-server, migrate a `useState`/`useEffect` component, and fix
effract's compile errors, each as a copy-pasteable recipe. Install it into your agent with:

```bash
npx skills add get-tmonier/effract
```

Between the scaffolder's `AGENTS.md` fragment, the bundled docs, the skill, and the
[`/llms.txt`](/llms.txt) index, an agent working in your codebase has everything it needs to write
correct effract without guessing from stale priors.
