# Rules & skills

> Teach the swarm your conventions with project rules, project skills, and skills that follow you between threads.

Rules set your project's conventions. Skills describe reusable techniques: some live in the repo for the team, while personal skills follow the person who sends a turn.

## Rules

Rules are the conventions an agent should always follow on this project. Your repo's `AGENTS.md` / `CLAUDE.md` and every `.cursor/rules/*.mdc` are read **verbatim into the lead agent's system prompt on every turn** — not summarized, not filtered. Write down the architecture invariants, the "one right way," the things that fail review, and the agent carries them into each turn.

Edit rules in the Code tab or in **Settings → Rules**. They live on your repo's default branch, so a change applies to every thread.

## Skills

A **skill** is a reusable technique — "how we write a migration," "how to debug the flaky test" — stored as a `SKILL.md` folder. darting.dev adopts the open [Agent Skills standard](https://agentskills.io).

Skills are **indexed, not pasted**. Every skill's name and one-line description is injected into the prompt as a cheap index; when a task matches a description, the agent reads that one `SKILL.md` on demand and follows it. The full body never sits in the prompt until it's needed.

Where skills come from:

| Location | Scope |
| -------- | ----- |
| `.claude/skills` | **Project** — committed to your repo, shared with the team, editable in Project Settings → Skills. |
| `.cursor/skills`, `.agents/skills` | **Discovered** — conventions your repo already carries. Read-only and treated as untrusted input. |
| Your personal skill set | **Personal** — `SKILL.md` folders imported from your GitHub repos in chat, or uploaded and managed under Account settings → Skills. |

Personal skills follow you into every project and every thread **you send a turn in**, including shared threads. On a teammate's turn, their own skills apply instead. You can inspect, edit, delete, and upload them in **Account settings → Skills**; importing a repo's skills happens in chat, with your choice of which ones to keep. An import is a copy, so re-import after the source changes.

When names collide, `.claude/skills` takes precedence over discovered repo skills, and both take precedence over your personal copy. A fresh project starts with zero project skills; a personal skill can still be available when you work there.

## They maintain themselves

A weekly [Skills automation](https://darting.dev/docs/automations/) keeps the project's skills sharp — pruning stale or duplicate ones, sharpening weak triggers, and adding genuinely reusable techniques. Git history is its audit trail.

## A note on trust

Discovered repo skills and anything fetched from the web are **untrusted input**. Only rely on skills from sources you trust, and never let a skill embed secrets or destructive commands.
