> Crysk 0.9.0 docs. Index of every page: https://crysk.dev/llms.txt

# Exclude files

Keep generated and vendored files out of Crysk reviews with a `.cryskignore` file.

Crysk does not review excluded files, and does not count them toward the size limit. A `.cryskignore` at your repository root adds your own exclusions. It works with the Crysk GitHub App and with the open-source GitHub Action.

## Built-in exclusions

These are always excluded:

```text
bun.lock
package-lock.json
yarn.lock
pnpm-lock.yaml
Cargo.lock
go.sum
*.min.js
*.min.css
*.snap
```

## Add your own

Create `.cryskignore` at the repository root, one pattern per line:

```text
# generated code
src/generated/
*.pb.go

# vendored
vendor/
third_party/

# keep a built-in excluded file in review
!go.sum
```

Commit it to your default branch.

## How patterns work

The syntax is a subset of `.gitignore`:

- `#` starts a comment, and blank lines are ignored.
- `*`, `?`, `[a-z]` and `**` work as in `.gitignore`.
- A leading or inner `/` anchors the pattern to the repository root. A trailing `/` matches directories only, so `dist/` matches a `dist` directory at any depth and `/dist/` only the one at the root.
- `!pattern` includes a file again. The **last matching line wins**, built-ins first, then your file from top to bottom.
- Matching is case-sensitive: `README.md` does not match `readme.md`.
- `{` and `}` are plain characters, not alternatives.

Only the `.cryskignore` at the repository root is read. A file in a subdirectory is ignored.

## Where it is read from

| Where Crysk runs | Read from |
|---|---|
| In CI | The base branch of the pull request, so a pull request cannot exclude its own changes. |
| Locally | Your working tree. |

A malformed line stops the review before anything is spent, and the error names the file, the line and its text.

## When everything is excluded

If every changed file in a pull request is excluded, there is nothing to review. Crysk posts no comment and spends nothing. The action output `status` is `skipped-excluded`, and in gate mode the `crysk` check turns green with `crysk: nothing to review — every changed file is excluded`. See [The check and the merge gate](https://crysk.dev/docs/reviews/merge-gate.md).
