Use Swale with an AI coding assistant
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 and Log in with the CLI.
- Node.js is installed, for
npx. Without it, see Install without Node.js. - 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:
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 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 describes.
- Set
SWALE_ACCOUNT_NAMEandSWALE_ACCOUNT_TOKENin the environment your assistant starts in; see Environment variables.
Update the skills
The skills are published again with each release of these docs. To update the ones in your project, run:
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:
## 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.