diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c199897c99ba5ee3d4b8e3a40bf254ca44a62a08..940f36c7ddd2a477eb9a7f96efd16e8135a8bbcb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,10 +2,10 @@ image: python:3.7
 
 cache:
     key: "project-${CI_JOB_NAME}"
+      files:
+        - poetry.lock
     paths:
       - .venv
-    files:
-      - poetry.lock
 
 variables:
   TRIGGER_PYPI_NAME: ""
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..320389d93e11fb9cb062acafebdc02c0c4710292
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,26 @@
+exclude: '^examples/'
+repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v4.3.0
+    hooks:
+      # - id: check-yaml
+      - id: end-of-file-fixer
+      - id: trailing-whitespace
+        args: [--markdown-linebreak-ext=md]
+      - id: check-added-large-files
+      - id: check-docstring-first
+      - id: name-tests-test
+        args: [--pytest-test-first]
+  - repo: https://github.com/psf/black
+    rev: 22.6.0
+    hooks:
+      - id: black
+  - repo: https://github.com/PyCQA/isort
+    rev: 5.10.1
+    hooks:
+      - id: isort
+  - repo: https://github.com/PyCQA/flake8
+    rev: 4.0.1
+    hooks:
+      - id: flake8
+        exclude: ^tests/ # Temporarily exclude tests