# Working with AI

Set up your coding assistant, give it a clear task, and check the result.

Give your AI a small instruction file so it knows how to find Zenos components and examples. Set it up once in your app, then describe what you want to build.

How a task becomes working UI:

After setup, your assistant follows this path.

1. **You describe the task.** `Add an Edit profile dialog`. Name the page and explain what should happen.
2. **The AI reads the references.** `Instructions → component docs → installed types`. It looks up the parts and props your app can use.
3. **Build, test, and review.** `Working UI + reported checks`. The AI edits and tests. You try the result.

Using **ChatGPT or Claude in a browser**? Skip to [Share a docs page](#share-a-docs-page). The setup below is for coding tools that can read and edit your project.

## Set up your coding assistant

Start in a React app with [Zenos UI installed](/getting-started/installation/). Open a terminal in the folder containing `package.json`.

Run the CLI directly with `bunx`, `npx`, `pnpm dlx`, or `yarn dlx`. You do not need to install it in your project. Choose your package manager in the command tabs below.

### 1. Create the instructions

For Codex or another tool that reads `AGENTS.md`, run:

```bash
pnpm dlx @zentara-co/zenos-cli init --features agents
npx @zentara-co/zenos-cli init --features agents
yarn dlx @zentara-co/zenos-cli init --features agents
bunx @zentara-co/zenos-cli init --features agents
```

You should now have an `AGENTS.md` file with a **Zenos UI agent context** section. If the file already exists, the command updates only the Zenos section.

<details>
<summary>Using Claude Code, Cursor, or several tools?</summary>

**Claude Code** writes `.claude/CLAUDE.md`:

```bash
pnpm dlx @zentara-co/zenos-cli init --features agents --agent claude
npx @zentara-co/zenos-cli init --features agents --agent claude
yarn dlx @zentara-co/zenos-cli init --features agents --agent claude
bunx @zentara-co/zenos-cli init --features agents --agent claude
```

**Cursor** writes `.cursor/rules/zenos.mdc`, an always-applied project rule:

```bash
pnpm dlx @zentara-co/zenos-cli init --features agents --agent cursor
npx @zentara-co/zenos-cli init --features agents --agent cursor
yarn dlx @zentara-co/zenos-cli init --features agents --agent cursor
bunx @zentara-co/zenos-cli init --features agents --agent cursor
```

**A team using several tools** can create all three files:

```bash
pnpm dlx @zentara-co/zenos-cli init --features agents --agent all
npx @zentara-co/zenos-cli init --features agents --agent all
yarn dlx @zentara-co/zenos-cli init --features agents --agent all
bunx @zentara-co/zenos-cli init --features agents --agent all
```

Choose the command for your tool. Every target contains the same Zenos instructions; you do not need to run them all.

</details>

Commit the generated file with your project. Ask your assistant to read it before starting a task.

### 2. Try your first task

Paste this into your coding assistant. Replace the page name with one in your app:

```text
Read this project's AI instructions, including the Zenos section.

On the settings page, add an “Edit profile” button that opens a Zenos
Dialog with a name input, a Save button, and a Cancel button.

Look up Button, Dialog, and Input before writing code. Check their
installed types and match the surrounding page's styling.

Keep the existing save logic. Check keyboard focus, Escape to close,
and the app's tests. Tell me what changed and what you checked.
```

Give the assistant a screenshot or an existing page to match when appearance matters. For a new feature, also explain what saving should do.

## Check that it worked

Review the changes and try the interface:

- The assistant imports components from `@zentara-co/zenos-ui`.
- It checks the docs and installed types before choosing unfamiliar props.
- You can open the dialog, use its controls with the keyboard, and close it.
- The assistant reports which checks passed and anything it could not verify.

If you want to check the setup before letting it edit, ask: “Read the Zenos instructions and look up Button and Dialog. Tell me their import path and available parts. Do not edit files.”

Instructions help the assistant make better choices. Tests and your review still verify the result.

## Add the development skill

The optional `zenos-app-development` skill gives your assistant a workflow for building a feature: inspect the app, look up Zenos APIs, place code with its owner, implement the interaction, and run the relevant checks. It respects existing project conventions and uses feature folders when a new app has no convention yet.

Run this from your app's folder:

```bash
pnpm dlx @zentara-co/zenos-cli init --features skills
npx @zentara-co/zenos-cli init --features skills
yarn dlx @zentara-co/zenos-cli init --features skills
bunx @zentara-co/zenos-cli init --features skills
```

This creates `.agents/skills/zenos-app-development/SKILL.md`, which Codex and Cursor can discover. For Claude Code, append `--agent claude` to write `.claude/skills/zenos-app-development/SKILL.md`. For a team using all three tools, use `--agent all`; Codex and Cursor share the `.agents` copy.

Commit the skill with your project. Start a new assistant session if it has not discovered the new file, then try:

```text
Use zenos-app-development to add a project creation form.
Follow our existing feature structure, reuse our save API and validation,
and check the interaction with the keyboard and the app's tests.
```

Project instructions still define the rules that apply throughout the app. The skill provides the development workflow; CLI topics and installed types provide detailed references. You can keep using the agent instructions without installing the skill.

<details>
<summary>Preview or update the skill</summary>

Add `--dry-run` to preview the destination without writing files. An identical installed skill is left unchanged. If its contents differ, the CLI stops so your edits remain intact.

After upgrading the CLI, review or commit your existing skill before replacing it. Use `--overwrite` to replace the whole `SKILL.md`, and include the same `--agent` target you used when installing. Combine `--overwrite --dry-run` to preview the replacement first.

See [File Organization](/getting-started/file-organization/) for the short visual reference. Skill discovery follows the tool's project directories: [Codex](https://developers.openai.com/codex/skills), [Claude Code](https://code.claude.com/docs/en/skills), and [Cursor](https://cursor.com/docs/skills).

</details>

## Share a docs page

For a question in ChatGPT, Claude, or another browser chat, use **Copy page** at the top of any docs page. Paste that Markdown with your question. The menu also offers **View as Markdown**, **Open in ChatGPT**, and **Open in Claude**.

For example:

```text
Read https://zenos-ui.pages.dev/components/dialog.md.
Show me a dialog with a name input and Save and Cancel buttons.
```

Use the smallest reference that answers your question:

- **One component:** its `.md` page, including examples and the API table.
- **Find the right page:** [/llms.txt](/llms.txt), the documentation index.
- **Whole-library research:** [/llms-full.txt](/llms-full.txt), the complete docs. This is a large file; it is usually unnecessary for a single UI task.

The website describes the published docs. Your installed UI types are the reference for the version in your app.

## Keep the instructions up to date

After upgrading Zenos, run the same `init` command you used during setup. Keep the CLI and UI versions aligned, then review and commit the updated instruction file.

To preview every supported target without changing files:

```bash
pnpm dlx @zentara-co/zenos-cli init --features agents --agent all --dry-run
npx @zentara-co/zenos-cli init --features agents --agent all --dry-run
yarn dlx @zentara-co/zenos-cli init --features agents --agent all --dry-run
bunx @zentara-co/zenos-cli init --features agents --agent all --dry-run
```

<details>
<summary>Where should I put my own project rules?</summary>

Keep them outside the generated markers. For example:

```md
# Project rules

- Match the existing settings pages.
- Keep our current form validation and save logic.
- Run the project's tests after making changes.

<!-- zenos:agent-docs:start -->

Zenos manages the instructions inside this block.
<!-- zenos:agent-docs:end -->
```

Rerunning `init` replaces only the marked section. Your app decides its architecture, naming, and testing conventions. Zenos adds component usage guidance.

</details>

<details>
<summary>What does the generated file teach the assistant?</summary>

It explains public imports, component lookup commands, recipe installation, prop naming, styling tokens, keyboard behavior, and accessibility. More detailed guidance stays in the CLI so the assistant can request it when needed:

```bash
pnpm dlx @zentara-co/zenos-cli component Dialog --dense
npx @zentara-co/zenos-cli component Dialog --dense
yarn dlx @zentara-co/zenos-cli component Dialog --dense
bunx @zentara-co/zenos-cli component Dialog --dense
```

```bash
pnpm dlx @zentara-co/zenos-cli docs api --dense
npx @zentara-co/zenos-cli docs api --dense
yarn dlx @zentara-co/zenos-cli docs api --dense
bunx @zentara-co/zenos-cli docs api --dense
```

`--dense` asks for shorter output. CLI lookups use the catalog shipped with the CLI; they do not inspect your installed UI version. Exact props and available parts come from the installed TypeScript declarations.

See the [CLI guide](/getting-started/cli/#find-a-component) for all lookup topics.

</details>

## If something goes wrong

**The assistant ignores Zenos:** ask it to read the generated file, then look up the components it plans to use. Check that you chose the target for your coding tool.

**It uses a prop that does not exist:** ask it to verify the prop against your installed UI types. Check that the CLI and UI versions match.

**The command reports invalid markers:** keep exactly one `zenos:agent-docs:start` and one `zenos:agent-docs:end`, in that order, then retry. The CLI leaves files unchanged when it finds malformed markers.

**You need help with the commands:** follow the [CLI quick start](/getting-started/cli/#start-here).

Source: https://zenos-ui.pages.dev/getting-started/working-with-ai/