diff --git a/.phive/phars.xml b/.phive/phars.xml
index 3c7dea301a4988056f0c9f9fd81bcf904d83375a..63a030f34ebaa167a4ac0c278a66d42d6f1d11e6 100644
--- a/.phive/phars.xml
+++ b/.phive/phars.xml
@@ -4,4 +4,5 @@
   <phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/>
   <phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/>
   <phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/>
+  <phar name="captainhook" version="^5.23.0" installed="5.23.0" location="./tools/captainhook" copy="false"/>
 </phive>
diff --git a/captainhook.json b/captainhook.json
new file mode 100644
index 0000000000000000000000000000000000000000..30f10640ec4ca996d2989dfc2c17c4fb7136ab3d
--- /dev/null
+++ b/captainhook.json
@@ -0,0 +1,16 @@
+{
+  "config": {
+    "bootstrap": "tests/captainhook-bootstrap.php"
+  },
+  "pre-commit": {
+    "enabled": true,
+    "actions": [
+      {
+        "action": "\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting"
+      },
+      {
+        "action": "composer test"
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/captainhook-bootstrap.php b/tests/captainhook-bootstrap.php
new file mode 100644
index 0000000000000000000000000000000000000000..1b61b73a71ef5fb804addf29a4266548612c8cf0
--- /dev/null
+++ b/tests/captainhook-bootstrap.php
@@ -0,0 +1,3 @@
+<?php
+
+// This file is supposed to be empty, see https://github.com/captainhookphp/captainhook/issues/248