> For the complete documentation index, see [llms.txt](https://docs.paradime.io/app-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paradime.io/app-help/integrations/pre-commit.md).

# pre-commit

## **What is pre-commit?**

[Pre-commit](https://pre-commit.com/) is a tool that checks your code before you commit it to your repository. Think of it as a friendly assistant that reviews your code and helps catch common mistakes before they become part of your project.

**Why should I use it?**

* Catches mistakes early (before they get into your codebase)
* Keeps code style consistent across your team
* Only checks files you've changed, saving time
* Works with many programming languages
* Easy to set up and share with your team
* Stops commits if it finds problems, helping maintain quality

## Key concept

**Checks (Hooks)**\
Pre-commit runs checks on your code before each commit. Common checks include:

* Fixing code formatting
* Finding potential errors
* Checking for security issues
* Making sure files aren't too large
* Looking for common mistakes

## **Setup**

All the checks are listed in a simple configuration file `.pre-commit-config.yaml` at the root of your project . You can choose which checks you want to run and how they should work.

### **Running**

Once set up, pre-commit automatically runs whenever you try to commit code. It will:

* Look at the files you've changed
* Run your chosen checks
* Either allow the commit (if everything passes) or show you what needs to be fixed


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.paradime.io/app-help/integrations/pre-commit.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
