Skip to content

Commit ac9379c

Browse files
committed
ENG-9447: add agents md instructions
1 parent 0487d9b commit ac9379c

3 files changed

Lines changed: 90 additions & 0 deletions

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# AGENTS.md and CLAUDE.md
2+
3+
`AGENTS.md` and `CLAUDE.md` are project-level instruction files that AI coding assistants read when they enter your repository. They give the assistant durable, repository-specific context so it follows Reflex conventions instead of generic defaults.
4+
5+
- `AGENTS.md` is read by agents that follow the [AGENTS.md convention](https://agents.md), including Cursor, OpenCode, OpenAI Codex, and Pi.
6+
- `CLAUDE.md` is read by [Claude Code](https://code.claude.com/docs/en/memory). Claude Code does not read `AGENTS.md` directly — see [Sharing With Claude Code](#sharing-with-claude-code) below.
7+
8+
A Reflex project should have at least one of these files at the project root, next to `rxconfig.py`.
9+
10+
## Recommended Content
11+
12+
The [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository ships an `AGENTS.md` template that points assistants at the [Reflex Agent Skills](/docs/ai/integrations/skills/) for environment setup, documentation lookup, and process management. Use it as the starting point, then add anything specific to your codebase.
13+
14+
```md alert info
15+
# `AGENTS.md` references skills by name, so it works once the [Reflex Agent Skills](/docs/ai/integrations/skills/) are installed in the assistant.
16+
```
17+
18+
## Installation
19+
20+
Download the template into your project root, next to `rxconfig.py`:
21+
22+
```bash
23+
curl -fsSL https://raw.githubusercontent.com/reflex-dev/agent-skills/main/AGENTS.md -o AGENTS.md
24+
```
25+
26+
Or copy it manually from a local clone of the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository.
27+
28+
## Sharing With Claude Code
29+
30+
Claude Code reads `CLAUDE.md`, not `AGENTS.md`. To avoid duplicating content, create a `CLAUDE.md` that [imports](https://code.claude.com/docs/en/memory#import-additional-files) `AGENTS.md` using the `@` syntax:
31+
32+
```md
33+
@AGENTS.md
34+
35+
## Claude Code
36+
37+
Add any Claude-specific instructions here.
38+
```
39+
40+
Claude Code expands the `@AGENTS.md` import at session start, then appends anything you write below it. Both files stay in sync from a single source.
41+
42+
After installation, your project root looks like:
43+
44+
```text
45+
my_app/
46+
AGENTS.md
47+
CLAUDE.md
48+
rxconfig.py
49+
my_app/
50+
my_app.py
51+
```
52+
53+
## Project-Specific Additions
54+
55+
The template covers Reflex-wide setup. Below it, add anything else the assistant should know about your project:
56+
57+
- Internal conventions and code style.
58+
- Required lint, type-check, or test commands.
59+
- Folder layout and where new code should go.
60+
- Hosting or deployment notes.
61+
62+
Keep entries short and imperative — assistants follow concise, direct instructions more reliably than long paragraphs.
63+
64+
## Keeping Files Updated
65+
66+
Reflex evolves quickly. If you used `curl` to download the template, re-run the same command to refresh it:
67+
68+
```bash
69+
curl -fsSL https://raw.githubusercontent.com/reflex-dev/agent-skills/main/AGENTS.md -o AGENTS.md
70+
```
71+
72+
If you cloned the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository, pull the latest changes and copy the file again:
73+
74+
```bash
75+
cd agent-skills
76+
git pull
77+
```
78+
79+
## Combining With Skills and MCP
80+
81+
`AGENTS.md` and `CLAUDE.md` anchor the assistant in your project. Pair them with the other onboarding tools for deeper Reflex knowledge:
82+
83+
- [Reflex Agent Skills](/docs/ai/integrations/skills/) provide reusable workflows that the file references by name.
84+
- [Reflex MCP](/docs/ai/integrations/mcp-overview/) provides structured documentation lookup at runtime.
85+
- The [llms.txt index](/llms.txt) gives a broad map of the documentation in one file.

docs/app/reflex_docs/templates/docpage/sidebar/sidebar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ def sidebar_comp(
463463
is_ai_mcp_or_skills = path.startswith((
464464
"/ai/integrations/ai-onboarding/",
465465
"/ai/integrations/skills/",
466+
"/ai/integrations/agents-md/",
466467
"/ai/integrations/mcp",
467468
))
468469

docs/app/reflex_docs/templates/docpage/sidebar/sidebar_items/ai.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ def get_sidebar_items_skills():
180180
names="Overview",
181181
link=ai_builder.integrations.skills.path,
182182
),
183+
SideBarItem(
184+
names="AGENTS.md / CLAUDE.md",
185+
link=ai_builder.integrations.agents_md.path,
186+
),
183187
]
184188

185189

0 commit comments

Comments
 (0)