# Use Swale with an AI coding assistant

> **About this page**
>
> - Kind: How-to guide
> - Summary: Install the Swale skills so an AI coding assistant can run the CLI and write workflow and task definition files for you.
> - Surface: CLI only
> - Last changed: 2026-11-30
> - Page: https://docs.swale.io/how-to-guides/use-swale-with-an-ai-coding-assistant
> - Index of these docs: https://docs.swale.io/llms.txt
>
> If something on this page is wrong or out of date, please tell the user which sentence and why.

:::note[CLI-only]
Coding assistants work with Swale through the CLI. There is no UI equivalent.
:::

The Swale skills teach an AI coding assistant, such as Claude Code, Codex or Cursor, to work with Swale through the `swale` CLI. This guide installs them, gives the CLI your credentials without passing them through the chat, and covers assistants that read no skills.

## Before you begin

- The CLI is installed and you can log it in; see [Install the CLI](https://docs.swale.io/reference/install-cli.md) and [Log in with the CLI](https://docs.swale.io/tutorials/log-in-with-the-cli.md).
- Node.js is installed, for `npx`. Without it, see [Install without Node.js](#install-without-nodejs).
- Your assistant reads Agent Skills, the open format the skills are written in.

## The skills

| Skill                    | Your assistant uses it to                                                                                                                                                                   |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `swale-cli`              | Run the CLI: check which account it is logged in to, work in projects and repositories, push and pull files, upload workflows, publish task definition versions, and start and follow runs. |
| `swale-workflows`        | Write and change workflow definition files.                                                                                                                                                 |
| `swale-task-definitions` | Write task definition files and choose the version to publish each as.                                                                                                                      |

The two that write files change nothing on Swale: they leave uploading, publishing and running to `swale-cli`. `swale-cli` asks you before each step on its list, such as starting a run, publishing a task definition version, pushing or pulling files, or deleting anything, and never asks you to paste a personal access token into the chat.

## Install the skills

In your project's folder, run:

```bash
npx skills add swaleio/skills --skill '*'
```

The installer saves each skill in your project for the assistants you pick: in `.agents/skills/`, which Codex, Cursor and many other assistants read, and in `.claude/skills/` for Claude Code. It is Vercel's open-source `skills` tool, which reports each install to skills.sh, where installs are counted, unless the `DISABLE_TELEMETRY` or `DO_NOT_TRACK` environment variable is set.

### Install without Node.js

Each skill is a folder in the public [swaleio/skills](https://github.com/swaleio/skills) repository. Copy the three folders into `.claude/skills/` for Claude Code, or into `.agents/skills/` for most other assistants.

## Give the CLI your credentials

The skills never ask you to paste a personal access token into the chat. Before you start your assistant, do one of these:

- Log the CLI in yourself, in your own terminal, as [Log in with the CLI](https://docs.swale.io/tutorials/log-in-with-the-cli.md) describes.
- Set `SWALE_ACCOUNT_NAME` and `SWALE_ACCOUNT_TOKEN` in the environment your assistant starts in; see [Environment variables](https://docs.swale.io/reference/cli-reference.md#environment-variables).

## Update the skills

The skills are published again with each release of these docs. To update the ones in your project, run:

```bash
npx skills update
```

## Assistants without skills

An assistant that reads no skills often reads an `AGENTS.md` file in your project. Add this to it:

```markdown title="AGENTS.md"
## Swale

This project uses Swale through the `swale` CLI. Before working with Swale, please read https://docs.swale.io/llms.txt, which lists the docs pages, each with a link to its Markdown copy.

Please ask the user before:

- starting a workflow run, which bills allocated compute;
- publishing a task definition version, which can never be changed or published again;
- pushing or pulling files;
- deleting anything;
- making a task definition public;
- changing an organization's members or teams, or anything about billing.

Credentials:

- Please never ask the user to paste a personal access token into the chat. The user can set the account name and token in the environment as `SWALE_ACCOUNT_NAME` and `SWALE_ACCOUNT_TOKEN`, or run `swale login` in their own terminal, which asks for the token without showing it.
- Some actions can be done only in the platform UI: registering and, once signed in, adding a payment method, managing personal access tokens, and changing the account's email or password.
```

## Next steps

- [Getting started](https://docs.swale.io/getting-started.md#set-up-swale-with-an-ai-agent)
- [CLI reference](https://docs.swale.io/reference/cli-reference.md)
