---
title: "Skills and instructions"
description: "The agent instruction files and skills Baz reads from your repositories, the skills you create in Baz, and how the AI Coding Guidelines agent enforces them."
canonical: "https://baz.ai/docs/brain/skills-and-instructions"
---

# Skills and instructions

The agent instruction files and skills Baz reads from your repositories, the skills you create in Baz, and how the AI Coding Guidelines agent enforces them.

Your team already writes down how code should look, in `AGENTS.md`, `CLAUDE.md`, Cursor rules, and Agent Skills, so coding agents follow it. Baz reads the same files, turns them into review guidelines, and the **AI Coding Guidelines** agent checks pull requests against them. You can also create skills directly in Baz. Together with memories, these files are the written part of what Baz knows about your team.

## Kinds of skills

In **Software Factory → Build**, open **AI Coding Guidelines**. Its scope drawer has a tab for each kind. **Your skills** lists the instruction files and skill folders Baz found in your repositories, plus any files you import. **Baz skills** lists skills that live in Baz itself, with version history.

Baz skills are labeled **Recommended** (suggested by Baz) or **Custom** (created by your team). Filter them with **All types**, **Recommended**, or **Custom**.

## Files Baz reads

Discovery is automatic, and Baz only reads files on a known list of paths. `AGENTS.md` and `CLAUDE.md` are found at any depth, so they work anywhere in your repository. Tool folders such as `.cursor/rules/`, `.claude/`, and `.github/instructions/` are read only at the repository root, along with skill folders such as `.claude/skills/`.

A skill folder counts only if it contains a `SKILL.md`. Slash command folders (`.claude/commands/`, `.cursor/commands/`) are always ignored. The [instruction files reference](/docs/reference/instruction-files) has the full rules.

:::tip
In a monorepo, put per-module rules in an `AGENTS.md` or `CLAUDE.md` inside the module. Those are matched at any depth and scoped to their directory. A `.cursor/rules/` folder inside a subdirectory is not discovered.
:::

## From file to guideline

- **Scan.** A full scan runs when a repository is connected. After that, each push to the default branch rescans the files it touched.
- **Keep what a reviewer can check.** Baz keeps rules that can be verified by reading code (patterns, architecture, security rules, naming, error handling) and rewrites them in review voice. It drops instructions about agent behavior, process steps, and anything that requires running a tool, such as "run the type checker before committing".
- **Default branch only.** Guidelines come from your default branch, never from the pull request under review. A pull request cannot loosen the rules used to review it. Rule changes take effect after they merge.

## How guidelines are applied

There is no precedence between files. Every guideline whose scope covers the change applies.

1. The **AI Coding Guidelines** agent must be enabled for the repository.
2. Files you turned off for review are excluded.
3. A guideline applies only to changed files inside its scope: a root file covers the whole repository, a module file covers its directory.
4. If no guideline is in scope, the agent is skipped for that pull request. It does not guess at conventions.
5. The agent matches the remaining skills to the change, reads each relevant one, and checks it off before it reports anything.
6. Every finding names the guideline file it came from.

## Manage skills

### Import files

Select **Add files** on **Your skills** to open **Import skills and rules**. Pick a **Repository** and a **File glob** (the default is `**/SKILL.md`), or select **Upload files**. Use this to bring in skills that live outside the discovered paths, such as nested skill folders in a monorepo.

### Turn files on or off

Each file has a toggle, and you can select several and choose **Enable selected** or **Disable selected**. Turning a file off removes it from code review only. Other agents, such as Fixer, keep using it.

### Create a Baz skill

On **Baz skills**, select **Create skill**. Give it a short **Skill title** that works as a file name, since Baz stores it as `.baz/<title>.md`. Describe when it applies, starting with "Use this when…", and put the rules the reviewer should check in **Skill content**.

### Versions

Editing a Baz skill and selecting **Create a new version** saves a new version and keeps the history. You can view earlier versions, change which one is active, or delete a version. Updates made by Baz show as **Updated skill by baz**.

## Related

<CardGroup cols={2}>
  <Card title="Skill learning" href="/docs/brain/skill-learning" icon="refresh-cw">
    How Baz keeps skills current as your code changes.
  </Card>
  <Card title="AI Coding Guidelines" href="/docs/agents/build/ai-coding-guidelines" icon="check-check">
    Configure the agent that enforces your skills.
  </Card>
  <Card title="Instruction files" href="/docs/reference/instruction-files" icon="book-open">
    Every path and glob Baz reads.
  </Card>
  <Card title="How memory works" href="/docs/brain/how-memory-works" icon="brain">
    Guidance Baz learns from review discussions.
  </Card>
</CardGroup>
