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

# Code with AI

> Install the Jelou Functions workflow in your AI tool so it understands the define() API, CLI commands, and platform conventions.

With `jelou skill install` you install a `SKILL.md` file in your AI coding tool. This file teaches it everything about Jelou Functions: the `define()` API, the `ctx` object, validation with Zod, cron, testing, and CLI commands. With this, your tool can write correct platform code from the very first prompt.

## Installation

<Steps>
  <Step title="Run the installer">
    From the root of your Jelou Functions project:

    ```bash theme={null}
    jelou skill install
    ```
  </Step>

  <Step title="Verify the output">
    The CLI automatically detects which tools you have installed:

    ```bash theme={null}
    ✓ Installed jelou-functions skill for 4 agents

    ▸ Claude Code
    ▸ Cursor
    ▸ Windsurf
    ▸ Cline

    Installed locally — commit .agents/ to share with your team.
    ```
  </Step>

  <Step title="Open your tool and start coding">
    The workflow activates automatically when the tool detects code related to Jelou Functions (`define()`, `@jelou/functions`, `ctx.env`, etc.).
  </Step>
</Steps>

## Supported tools

The installer detects 12 AI coding tools. Each uses its own workflows directory, but all receive the same content.

<Tabs>
  <Tab title="Claude Code">
    **Directory:** `.claude/skills/jelou-functions/SKILL.md`

    Detected automatically. The workflow appears as available context in your conversations.
  </Tab>

  <Tab title="Cursor">
    **Directory:** `.cursor/skills/jelou-functions/SKILL.md`

    Detected automatically. Cursor loads the workflow when you work on Jelou Functions files.
  </Tab>

  <Tab title="Windsurf">
    **Directory:** `.windsurf/skills/jelou-functions/SKILL.md`

    Detected automatically when the project is opened.
  </Tab>

  <Tab title="Universal">
    **Shared directory:** `.agents/skills/jelou-functions/SKILL.md`

    The following tools read from the universal `.agents/skills/` directory:

    | Tool           | Detection                                 |
    | -------------- | ----------------------------------------- |
    | Amp            | `~/.config/amp`                           |
    | Codex          | `~/.codex`                                |
    | Gemini CLI     | `~/.gemini`                               |
    | GitHub Copilot | `.github/` in the project or `~/.copilot` |
    | OpenCode       | `~/.config/opencode`                      |
    | Kimi Code CLI  | `~/.kimi`                                 |
  </Tab>

  <Tab title="Others">
    The following tools have their own workflows directory:

    | Tool     | Directory           |
    | -------- | ------------------- |
    | Cline    | `.cline/skills/`    |
    | Continue | `.continue/skills/` |
    | Roo Code | `.roo/skills/`      |

    The installer creates a symlink from each directory to the canonical copy in `.agents/skills/`.
  </Tab>
</Tabs>

## How to use it

Once installed, your AI tool understands the full platform. Try prompts like:

```
Create a function that queries a customer's balance by phone
```

```
Add Zod validation to the input with .describe() so MCP has good descriptions
```

```
Configure a cron that runs every hour to clean up old records
```

```
Write tests with createMockContext for the customer query function
```

The workflow activates automatically when the tool detects patterns like `define()`, `@jelou/functions`, `ctx.env`, `ctx.isCron`, `createMockContext`, or `jelou` commands.

## Local vs global

| Mode   | Command                        | Location                         | Use                                  |
| ------ | ------------------------------ | -------------------------------- | ------------------------------------ |
| Local  | `jelou skill install`          | `.agents/skills/` in the project | Per project, share with team via git |
| Global | `jelou skill install --global` | Home directory (`~`)             | Active in all projects               |

**Local** is ideal for teams: by committing `.agents/skills/`, any team member who clones the repo will have the workflow available without running anything.

**Global** is useful if you work on multiple Jelou Functions projects and want the workflow always active.

<Tip>
  Commit `.agents/skills/` to your repository so your entire team automatically gets the workflow when they clone the project.
</Tip>
